mirror of
https://github.com/anope/anope.git
synced 2026-06-17 01:04:47 +02:00
Compare commits
776 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b578e32531 | |||
| 4d8e3b847d | |||
| eaade23f9b | |||
| f20bac996d | |||
| 93bfd4cbe1 | |||
| 6620f9e9bd | |||
| dc64cfc940 | |||
| f8829783d2 | |||
| d6e600f74b | |||
| 5f7113bc0e | |||
| dc4daa25a7 | |||
| 0cadaedfbe | |||
| 11ad788dfd | |||
| 38a60d9142 | |||
| e8ad509aa5 | |||
| 37b3ed8ef3 | |||
| a6af422184 | |||
| 53acb73193 | |||
| 57f6d4f49c | |||
| d0467adea2 | |||
| 16924f68c0 | |||
| d280c48e6b | |||
| f0c0daa644 | |||
| 7a2d027e1d | |||
| f627a3bacd | |||
| 5a1257b7f0 | |||
| 866f3f32ab | |||
| 20ce170024 | |||
| 4034b3054a | |||
| e581158645 | |||
| 01021131ca | |||
| 13ea98a02e | |||
| db56a61f86 | |||
| df321a118e | |||
| 1931fcf0e5 | |||
| 63b02b8c97 | |||
| 1c8a77ab9f | |||
| 0c7d53f81e | |||
| bcc3ae5742 | |||
| 4e67e0897a | |||
| 76a9538441 | |||
| 91c7862579 | |||
| 6b6bc81999 | |||
| 1f2c385bb9 | |||
| d79dd0b7d7 | |||
| 8b2e8137f6 | |||
| 732466d8f4 | |||
| 3049916ade | |||
| 0afd666f22 | |||
| 8021a53ac4 | |||
| 0663f5e412 | |||
| 2ee496b8ac | |||
| 3abb18721b | |||
| 4eb0a3bdb7 | |||
| 6a03eb69eb | |||
| 4fa2a00bd5 | |||
| 82008d507c | |||
| 2ab4f175a8 | |||
| c9473bcc67 | |||
| 75ed5a9b59 | |||
| f010ab7dbf | |||
| 00b2cc9ce6 | |||
| d52cc7bcbc | |||
| 63838fa77d | |||
| e36f8143e3 | |||
| 72b26043b2 | |||
| f369157906 | |||
| ba46b8e4ab | |||
| 254901aace | |||
| c1c45a5db9 | |||
| a65e95837f | |||
| 43219d3906 | |||
| 1f8dec4c24 | |||
| fb5c5e3442 | |||
| e357c39774 | |||
| 10732baec2 | |||
| 068c6989de | |||
| 317d55f3f1 | |||
| 1397fda786 | |||
| 4ccc478830 | |||
| 100ecbb9be | |||
| cdf636e696 | |||
| 45878bf182 | |||
| f1bec3999d | |||
| a259244297 | |||
| c1da009de3 | |||
| 4f412bc213 | |||
| 1882916dc4 | |||
| f436ce9912 | |||
| ef9729fb02 | |||
| 296a75f2a9 | |||
| bce7237d9f | |||
| 85834e19dc | |||
| ca6b3723a9 | |||
| 23b1086072 | |||
| 860deb14ce | |||
| 62885fa462 | |||
| 3fef01e35b | |||
| b0597e35ec | |||
| 8d1ad6fbe5 | |||
| 750569201a | |||
| 1a1a781b72 | |||
| 4b5ce8a972 | |||
| 98cfdd26c4 | |||
| 051a42b547 | |||
| 220e278213 | |||
| 547fe0da1a | |||
| 09bec79b47 | |||
| 55a5affcb8 | |||
| a8b4297023 | |||
| 5969362425 | |||
| 3ceae33b16 | |||
| 5de4c1fc97 | |||
| fd109048dd | |||
| a0747516ce | |||
| 605e1f2a03 | |||
| dc23c58869 | |||
| b7e646ec83 | |||
| 4d54358745 | |||
| ed0882ec04 | |||
| 526c4e4659 | |||
| b70f72bf2b | |||
| 2ad4c1906e | |||
| 049760cc7e | |||
| e2ecec31b5 | |||
| fee016bb84 | |||
| d24fb03917 | |||
| 5adc8bfefc | |||
| abcf0cde5a | |||
| 8f3bd314ed | |||
| e2d456d4ce | |||
| 96202ae545 | |||
| 2b0229d4e2 | |||
| beaa3196b3 | |||
| b6d771a114 | |||
| d3ed756bd0 | |||
| f8308841a6 | |||
| 1dfdf36fc3 | |||
| 4ac3ade126 | |||
| 212abeb986 | |||
| 7d4427c313 | |||
| e836be489e | |||
| 1db5c555d6 | |||
| bb1b015103 | |||
| e42684ac39 | |||
| d7de7eee60 | |||
| 0a390ad392 | |||
| aa6b12c5eb | |||
| e2bd08fbff | |||
| 2047934060 | |||
| e07dcbff08 | |||
| e3a8a45a61 | |||
| f1ad7fd582 | |||
| 43f2645b32 | |||
| b6935e706c | |||
| a3c845894d | |||
| 5933a5e9b1 | |||
| 109d8f431f | |||
| 1edb7e776b | |||
| 928e2e1b7c | |||
| 5a140e4898 | |||
| f64393941e | |||
| 0db81ca46a | |||
| 7f7144de1f | |||
| 3883716883 | |||
| 5beea4eb7e | |||
| 2d0fdb74d1 | |||
| 80588fba81 | |||
| ef7dc94f88 | |||
| 7b4eec9748 | |||
| baff417652 | |||
| 7074944810 | |||
| 1c39d25cca | |||
| f1c5c27f3f | |||
| 9c0134ee2c | |||
| 959fee5937 | |||
| 3854a5570f | |||
| ab1e0ebfb3 | |||
| cffe864900 | |||
| bc1575318b | |||
| a71d0f6757 | |||
| 50d7bf710e | |||
| d44bcef31b | |||
| c0ce71e55a | |||
| 0eeb0caf08 | |||
| b13bded620 | |||
| 1b1180fda6 | |||
| a4ecfa5bc0 | |||
| 3c8009b495 | |||
| ca85df2d74 | |||
| 5dfa6598c2 | |||
| f428d61045 | |||
| fc50edf046 | |||
| 269c2786e9 | |||
| 96fc940af7 | |||
| 8c8e6d464a | |||
| 22976b8a7c | |||
| 4dff710361 | |||
| fe80d2cded | |||
| 16dac87841 | |||
| 30c59562e0 | |||
| 6d61a84286 | |||
| f6b8596c7b | |||
| da6760f606 | |||
| ad962ad759 | |||
| 5327becf41 | |||
| f43c99c5cc | |||
| c0a491cb06 | |||
| 66cc965fd7 | |||
| 2440514a7b | |||
| fad1da81a3 | |||
| bb0e2a9a07 | |||
| 4f8c4f8fef | |||
| 25957111b2 | |||
| 9a8895359a | |||
| 53f8db0198 | |||
| f94cb7fb11 | |||
| c30fb13a0c | |||
| 7926238fd2 | |||
| 211a944210 | |||
| cff61617e1 | |||
| 4455d4346c | |||
| 405b41ec87 | |||
| bacb276181 | |||
| 4c1f6b48d8 | |||
| 53a78c2688 | |||
| e61a283c02 | |||
| c3302194eb | |||
| cd184596a2 | |||
| f28b1142f5 | |||
| 87230c17b7 | |||
| a29b7897f0 | |||
| e965bc3049 | |||
| 01780c9e7a | |||
| 4d3363f83f | |||
| 75e27b6a47 | |||
| fbaca3f7a1 | |||
| 81b01bb55b | |||
| 1027ec667a | |||
| 4d9273efa4 | |||
| 67c13b41ee | |||
| 10386a39f0 | |||
| dc19ea3993 | |||
| 2261fa3fe7 | |||
| fab9f0fecc | |||
| df8d85d80a | |||
| 4b192addd2 | |||
| d27594f8a6 | |||
| 43aaaeab7e | |||
| ccae59430a | |||
| 974adb7ce1 | |||
| f3531e7564 | |||
| 15a27c69ba | |||
| 0b0db75ba5 | |||
| b90a9a339a | |||
| 64f9aed761 | |||
| 56f2cbeb62 | |||
| 9a9ca41750 | |||
| e19661e1de | |||
| 09879c5c15 | |||
| 12f55e4711 | |||
| 43c56541d5 | |||
| d3078850d2 | |||
| d4f7db122d | |||
| 201ad9c191 | |||
| 45c0bf8f32 | |||
| d64855b35b | |||
| 4617fdbf3d | |||
| ac204745c8 | |||
| e1ce6174ce | |||
| 2781b6946d | |||
| 1e502c8450 | |||
| 004c4cbe5f | |||
| 072202c181 | |||
| 595dad4ec1 | |||
| a374e245fd | |||
| 6e6543d3ed | |||
| 6124af68cc | |||
| f21b40bfb4 | |||
| 567700b5a6 | |||
| 3b80da9cbd | |||
| c519119197 | |||
| 780bc7ca14 | |||
| 3d12752655 | |||
| 9c0ceed36a | |||
| 187973c16a | |||
| 072631aa38 | |||
| b638b653d2 | |||
| 0fb2b60cff | |||
| 16f3f0cbc0 | |||
| b28db7bc55 | |||
| 9bf9cfcf5e | |||
| 0c9750a22b | |||
| 69c5aeca57 | |||
| 59c3c1326b | |||
| 5829d7da39 | |||
| 2f29c1388c | |||
| fc0e8264c0 | |||
| 19eccf0cae | |||
| dbf5106c09 | |||
| 3029a2db1a | |||
| 53df61b4c2 | |||
| 7d27689d05 | |||
| 421e194c5a | |||
| c442bc18af | |||
| 1c02961b60 | |||
| 268d529078 | |||
| 4bc4b98ac7 | |||
| e8b42607e6 | |||
| e792865a04 | |||
| 2b5a1d8c8f | |||
| 7cf21342f4 | |||
| ba8a646a33 | |||
| fa50252c77 | |||
| 46bb2de866 | |||
| c2e9b8080b | |||
| c0cd76a0a5 | |||
| ab6cd3b26c | |||
| 275f2fd374 | |||
| c4d4107412 | |||
| ae5da11389 | |||
| e6544a06f4 | |||
| 1ab7d53649 | |||
| d709c819d2 | |||
| 2ad4a8667f | |||
| 6ff83c3407 | |||
| adbc5a0e65 | |||
| f9a4a0fbef | |||
| a282a5c9c4 | |||
| 3ddfa2fc1d | |||
| 50f430fb23 | |||
| 1b4d62e2bc | |||
| 43f608ff2b | |||
| f0313a45cb | |||
| 96af354ad5 | |||
| b5966cf99e | |||
| faab2c6793 | |||
| c6f85b9312 | |||
| 5e4d52ad47 | |||
| 6628e714c7 | |||
| 0f9e931fa6 | |||
| 1f6385c095 | |||
| be044c9d6e | |||
| 90aa576fb3 | |||
| 77e5744341 | |||
| e1264a5913 | |||
| 18f423226c | |||
| c967a4ce88 | |||
| 1542937d64 | |||
| 3b8f1cd59f | |||
| fbbdedf17e | |||
| b75faefea4 | |||
| 676db0ba6f | |||
| b2802d0beb | |||
| 826ae9b6c0 | |||
| 2c3e8a76c9 | |||
| 0bb23f3f4d | |||
| b36498149d | |||
| f6cf978d0c | |||
| aeebaed4b2 | |||
| faabff0261 | |||
| cba811bc6b | |||
| dcae3d7bda | |||
| fc69b68891 | |||
| 15e527fa70 | |||
| 3ccf26fda4 | |||
| c0b0ee1b39 | |||
| b353e1db79 | |||
| 3edce88698 | |||
| 9e1fb11f93 | |||
| 316c280a57 | |||
| cc2a999b4e | |||
| 51a9f64adb | |||
| 332fd23927 | |||
| 1aca2922af | |||
| b65fd34a39 | |||
| c9f4c2db1f | |||
| d1248d1249 | |||
| afc5c91a09 | |||
| aa6c3f3474 | |||
| 2a35151d12 | |||
| fa7cee9759 | |||
| 431b2e6768 | |||
| 853e926920 | |||
| 8267407a78 | |||
| a831e5d306 | |||
| b901dfee84 | |||
| 6e8d2bf09d | |||
| 70e9b20274 | |||
| 4ee9021adb | |||
| c8db362bca | |||
| c710625cd3 | |||
| ac2f8bf64d | |||
| 04e7fa493a | |||
| f7692ec77f | |||
| 4a1d32c5fd | |||
| 498da95205 | |||
| 710d4848bd | |||
| bd3bed2118 | |||
| fe31b0a666 | |||
| 1f97d6d879 | |||
| 4bd5649105 | |||
| b5af310f8a | |||
| 2cfc97053f | |||
| 6cde65a57f | |||
| 7cb35eeedf | |||
| f0318fdbe8 | |||
| 93a83da771 | |||
| 0ff1bb9d5b | |||
| c0dea5ef30 | |||
| fd4ac7f6fc | |||
| e635f547d6 | |||
| 7167cff703 | |||
| b844154857 | |||
| 5e56dfdb1a | |||
| e1d460e211 | |||
| 9ea6fb25b9 | |||
| 7755668679 | |||
| 569efbb66b | |||
| 696801430b | |||
| 1b08ba8f41 | |||
| 277f735505 | |||
| f63a2bdfb4 | |||
| feb412bdb1 | |||
| ab856683c7 | |||
| 97d7c21193 | |||
| e5b8435769 | |||
| e589080827 | |||
| 257b10ee91 | |||
| 353ee5cc93 | |||
| b094132c9d | |||
| 82006b868f | |||
| ba5a3f5f00 | |||
| 7b6c08b53a | |||
| 47b692f9ae | |||
| ed06609ae1 | |||
| 32a57150ec | |||
| 2a5e8f1890 | |||
| a04c320b4b | |||
| 4221a507cc | |||
| 44dd8d07d9 | |||
| f7aa69b596 | |||
| d5ecc39104 | |||
| 84a02d2709 | |||
| 4b059beb24 | |||
| b319fb089c | |||
| 17196887ad | |||
| 02d67f682a | |||
| b306108740 | |||
| 12a0311aaa | |||
| cf653fc084 | |||
| 5cc7fc0387 | |||
| 832bc35135 | |||
| 06c5914820 | |||
| bf67b9ee5c | |||
| 829c169063 | |||
| 4948120b69 | |||
| 994471f5a7 | |||
| 80c02740d0 | |||
| df3c0b7b52 | |||
| 45702992ac | |||
| 9756f96b85 | |||
| 6ac0364f74 | |||
| 4f820a7d41 | |||
| 5f7127dd92 | |||
| dcb3ff7d34 | |||
| 1107b92699 | |||
| 3b0b1bc80e | |||
| b60b23fd48 | |||
| 5aac6377c2 | |||
| 20856fb59c | |||
| 7545763cd4 | |||
| 1818b19eba | |||
| abc7e4b423 | |||
| e5ece18ee7 | |||
| 8641b995c4 | |||
| b880240d72 | |||
| 5ce90ba7d1 | |||
| 98bae827e1 | |||
| e3c05efe5e | |||
| 8cbaf7e990 | |||
| 339f41aebc | |||
| 55e4ef9d3a | |||
| f63e4ceebe | |||
| b005089f2f | |||
| 1b42e26642 | |||
| 4691351167 | |||
| 404debf789 | |||
| 752a5ca1b7 | |||
| e1a1cf0e6f | |||
| 3fabc2f831 | |||
| 59ea36c831 | |||
| fac880664c | |||
| 7f890ce98d | |||
| 50e1a3e96c | |||
| 6b79349e6c | |||
| 678f54903d | |||
| 714a4a3004 | |||
| 34826f71c7 | |||
| 847cceaba3 | |||
| 09046e3c99 | |||
| 00a19529c3 | |||
| 446b3a910d | |||
| 76f5d4b316 | |||
| 9b59925144 | |||
| 243d781e99 | |||
| 8be5f53f1f | |||
| cd49bb40c2 | |||
| ef3d115bae | |||
| 9f1178ec58 | |||
| 3bc2db561b | |||
| fad603e7a4 | |||
| 5f006bf139 | |||
| aaa12cc018 | |||
| 2238db8338 | |||
| 4d1492d444 | |||
| 5c4414e4a5 | |||
| 6f9b77e336 | |||
| 154fa25e8f | |||
| 9793062007 | |||
| f86dc247e5 | |||
| 2b1f75a313 | |||
| 5ac0c9a327 | |||
| e8763d5b3c | |||
| ce7a32a994 | |||
| 0c1cc08e28 | |||
| e12e4e6956 | |||
| 52535cf6fb | |||
| 121d0a6e5b | |||
| 34535814e4 | |||
| 8bcc6840ce | |||
| 08d113332c | |||
| 765943062e | |||
| 17cca42d48 | |||
| 760fdc4049 | |||
| ead4aa7ed9 | |||
| 65911dd1be | |||
| 4abfdcbb9c | |||
| de5c8c0d38 | |||
| 8e011bbb78 | |||
| f15a9749f9 | |||
| f1956b039d | |||
| 53d5b7c29e | |||
| 812cb04fde | |||
| 1314d5b4f1 | |||
| 490601de3a | |||
| c7aab50bff | |||
| c507c78d5a | |||
| 58c05687bf | |||
| f8cdcc65c6 | |||
| 10a918f9e1 | |||
| e4d1769a8b | |||
| 7cd80a2131 | |||
| 9d6f88de39 | |||
| b93d650b1f | |||
| c480695369 | |||
| 7f1b5552dc | |||
| 4865a8cfff | |||
| 1efd289488 | |||
| 83e4b183ea | |||
| 1e625b6837 | |||
| 402c624e45 | |||
| fde83f6564 | |||
| f0f43cf426 | |||
| 3dc64bac4d | |||
| 2450a64bf4 | |||
| b48293a632 | |||
| e908dc0dc7 | |||
| 378c9203df | |||
| 779f3788c9 | |||
| 604da89813 | |||
| e11abdc4f0 | |||
| 5aac04dffe | |||
| 7480fbda2b | |||
| 9629ccb374 | |||
| cb70d976ba | |||
| 6db0186947 | |||
| 492eac20a8 | |||
| c8511a625d | |||
| f6b915a169 | |||
| 02c1724d75 | |||
| 7e87bb69fc | |||
| aae522d72b | |||
| 0a821640bb | |||
| 37733dea65 | |||
| eabb9c0c11 | |||
| b103d16eb1 | |||
| e3b6ae3649 | |||
| 0ff48e1538 | |||
| 53038d83bf | |||
| 2ea594d677 | |||
| e957c7b2d2 | |||
| 9a4f27e0a3 | |||
| fccc4a4fa6 | |||
| 4325073524 | |||
| 55199f0a4c | |||
| 7edc76f7fb | |||
| 3fbdde5e18 | |||
| 9f8b4ac382 | |||
| 998925c90a | |||
| 7f971043bc | |||
| c2e1a8a3e2 | |||
| c62b3cb275 | |||
| 1a3d9a016d | |||
| 518182ac92 | |||
| 7d0e063300 | |||
| 5e36d848d5 | |||
| fee461f3d0 | |||
| 1773eef143 | |||
| 7704ee7107 | |||
| 5ac1e9175d | |||
| 5695c9e079 | |||
| f92b0d6ea0 | |||
| fc527b464a | |||
| a93b315bd3 | |||
| 5246424dc0 | |||
| 1316147a8c | |||
| 70319ab8be | |||
| 7dd358972a | |||
| d463ae3b1e | |||
| ebda113f44 | |||
| 6ab6eca0a6 | |||
| b1ba1ec8ac | |||
| 9956da18e3 | |||
| b56e71ab14 | |||
| 6f45d72497 | |||
| f5c01bf617 | |||
| 06bad31b18 | |||
| 576aaff3da | |||
| c5bc8fab32 | |||
| f6e2ebe145 | |||
| 37b3535543 | |||
| c21e8d9204 | |||
| 22658d63bd | |||
| f2dee1e1d6 | |||
| 968ef349d6 | |||
| d6640ed5ee | |||
| aabc217a6b | |||
| d82391e46d | |||
| 7aa02864d2 | |||
| 2a8202c832 | |||
| be4a39ceb6 | |||
| a3dc75c61c | |||
| 14dc142a92 | |||
| 51b7d53108 | |||
| 3253455792 | |||
| 879b310580 | |||
| 5ff3aa7209 | |||
| ca93122a68 | |||
| 2428264315 | |||
| cc4a14b0ba | |||
| 934b584374 | |||
| 4237d49d41 | |||
| 1c36de5ab1 | |||
| da948be089 | |||
| 9384a4f088 | |||
| 4d62c673fa | |||
| 7426b3b04a | |||
| 735e234c2c | |||
| 735f0ba6cf | |||
| 9ee7c825e1 | |||
| 912103ec13 | |||
| f843e7bd90 | |||
| d7e2ab688b | |||
| 5e7085130e | |||
| 9b07e163c0 | |||
| 6859decfb8 | |||
| e23baf4297 | |||
| c7f77b3b66 | |||
| 6578829fa6 | |||
| ef06226521 | |||
| 4c669b947f | |||
| 3fbb493d57 | |||
| 223aa65cfa | |||
| fe54dfb37f | |||
| 3f5f84c92c | |||
| 5b3f81ea78 | |||
| 3e8752fe66 | |||
| 57c2b65f08 | |||
| a118946e65 | |||
| ee2dcf11b8 | |||
| e91de41278 | |||
| 10b5b00db4 | |||
| 2044b4d3ad | |||
| 1d0bb9b26b | |||
| 781defb707 | |||
| 16c124d34e | |||
| f08dbced60 | |||
| baabc91ead | |||
| 81483ae5e7 | |||
| 003140bf60 | |||
| b405484fb9 | |||
| 9a45626379 | |||
| 10d10d057e | |||
| aa2844a3fc | |||
| 42c640a9b5 | |||
| 066fc5801b | |||
| 416eaa1e66 | |||
| ac19a5c24b | |||
| 6f9dd282d2 | |||
| c56d72ba84 | |||
| db4ed1cfaf | |||
| cb64d806c1 | |||
| 4f9b7874d6 | |||
| 207c46c871 | |||
| 957cb2bf93 | |||
| b244c74479 | |||
| b76b2e11c8 | |||
| b35665bb54 | |||
| c3eb5b885d | |||
| 6faf4e3823 | |||
| 325b018ed0 | |||
| 0a3d27a91f | |||
| bcd85ca682 | |||
| ac40c53fe4 | |||
| 2eae82da5c | |||
| 72493b7305 | |||
| 1a37e1c048 | |||
| fb7fef7a84 | |||
| 36602224b8 | |||
| ccecfdf445 | |||
| 32d1184c00 | |||
| 6a46a08a85 | |||
| 7a2e6aa5c2 | |||
| 34b5f9ce6e | |||
| f77eb0a282 | |||
| 302a409136 | |||
| 0b3b9fe128 | |||
| f71c7865fc | |||
| 4ecf20b3f5 | |||
| a5b8788014 | |||
| 3cc7950c4b | |||
| 854bc4db0c | |||
| dbc77279bf | |||
| c4ef566a65 | |||
| 66376335ab | |||
| 823bc01f66 | |||
| 947ad6f73a | |||
| 06c8a1ef50 | |||
| b3fd861b3e | |||
| 62262f4b0d | |||
| 6e0dc0e210 | |||
| 7e7556f064 | |||
| 111d6a9178 | |||
| d23817604c | |||
| 4694c7afb4 | |||
| a52293336f | |||
| f24e17f8b4 | |||
| 2b208de02f | |||
| 4eb5d153c0 | |||
| 0451dd3d0d | |||
| c3e4f1bf7e | |||
| f122f104c4 | |||
| deedb3bdd7 | |||
| d27aa03500 | |||
| dcffa5da6f | |||
| 221e79f50d | |||
| d5a453b663 | |||
| a2d69fa431 | |||
| 6a0e4418f4 | |||
| 68eeac67c9 | |||
| 731912f01e | |||
| 51963915ba | |||
| 810685cb73 | |||
| 1a0e6b0be3 | |||
| 81c89bb708 | |||
| 01620e849a | |||
| 4c74020a69 | |||
| b95b8f0aae | |||
| 1ff7a7c1f1 | |||
| 1d16629a6d | |||
| 72aa27ede5 | |||
| 05223dbe6d | |||
| 06d43baf93 | |||
| 5f74662100 | |||
| 2c68312d72 |
+16
@@ -0,0 +1,16 @@
|
||||
language: cpp
|
||||
|
||||
compiler:
|
||||
- gcc
|
||||
|
||||
before_script:
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake -DINSTDIR:STRING=~/services -DDEFUMASK:STRING=077 -DCMAKE_BUILD_TYPE:STRING=DEBUG -DUSE_RUN_CC_PL:BOOLEAN=ON ..
|
||||
|
||||
script:
|
||||
- make
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
- "irc.anope.org#anope-devel"
|
||||
+12
-5
@@ -162,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")
|
||||
@@ -483,12 +483,13 @@ get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
|
||||
# At install time, create the following additional directories
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${LOGS_DIR}\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/${DB_DIR}/runtime\")")
|
||||
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 \"\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/backups\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${LOGS_DIR}\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/\${DB_DIR}/runtime\")")
|
||||
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\${CMAKE_INSTALL_PREFIX}\")")
|
||||
endif(NOT WIN32 AND RUNGROUP)
|
||||
# On Windows platforms, install extra files
|
||||
@@ -496,8 +497,14 @@ if(WIN32)
|
||||
install(FILES ${Anope_SOURCE_DIR}/src/win32/anope.bat
|
||||
DESTINATION ${BIN_DIR}
|
||||
)
|
||||
|
||||
# Package any DLLs in src/win/
|
||||
file(GLOB EXTRA_DLLS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "${Anope_SOURCE_DIR}/src/win32/*.dll")
|
||||
install(FILES ${EXTRA_DLLS} DESTINATION ${BIN_DIR})
|
||||
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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Configuration script for Services.
|
||||
#
|
||||
# Anope (c) 2003-2011 Anope team
|
||||
# Anope (c) 2003-2014 Anope Team
|
||||
# Contact us at team@anope.org
|
||||
#
|
||||
# This program is free but copyrighted software; see the file COPYING for
|
||||
@@ -130,7 +130,7 @@ export ECHO2 ECHO2SUF
|
||||
INSTDIR=$HOME/services
|
||||
RUNGROUP=
|
||||
UMASK=
|
||||
DEBUG="yes"
|
||||
DEBUG="no"
|
||||
USE_RUN_CC_PL="no"
|
||||
USE_PCH="no"
|
||||
EXTRA_INCLUDE_DIRS=
|
||||
|
||||
+42
-48
@@ -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> <TRUE to output error messages> [<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 VERBOSE)
|
||||
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 3)
|
||||
if(${ARGC} GREATER 1)
|
||||
set(CHECK_ANGLE_INCLUDES TRUE)
|
||||
endif(${ARGC} GREATER 3)
|
||||
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
|
||||
@@ -402,16 +400,16 @@ macro(calculate_depends SRC SKIP VERBOSE)
|
||||
endif(FOUND_DEFAULT)
|
||||
endforeach(DEFAULT_INCLUDE_DIR)
|
||||
if(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
find_in_list(${ARGV3} "${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(${ARGV3} "${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)
|
||||
if(VERBOSE)
|
||||
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.")
|
||||
endif(VERBOSE)
|
||||
# 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")
|
||||
@@ -419,12 +417,12 @@ macro(calculate_depends SRC SKIP VERBOSE)
|
||||
endmacro(calculate_depends)
|
||||
|
||||
###############################################################################
|
||||
# calculate_libraries(<source filename> <output variable set to TRUE on fail> <TRUE to output error messages> <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 VERBOSE 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
|
||||
@@ -433,14 +431,16 @@ macro(calculate_libraries SRC SKIP VERBOSE 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)
|
||||
if(WIN32)
|
||||
read_from_file(${SRC} "/\\\\*[ \t]*RequiredWindowsLibraries:[ \t]*.*[ \t]*\\\\*/" REQUIRED_LIBRARIES)
|
||||
else(WIN32)
|
||||
read_from_file(${SRC} "/\\\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\\\*/" REQUIRED_LIBRARIES)
|
||||
endif(WIN32)
|
||||
# Iterate through those lines
|
||||
foreach(REQUIRED_LIBRARY ${REQUIRED_LIBRARIES})
|
||||
# Strip off the /* RequiredLibraries: and */ from the line
|
||||
string(REGEX REPLACE "/\\*[ \t]*RequiredLibraries:[ \t]*([^ \t]*)[ \t]*\\*/" "\\1" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
|
||||
string(REGEX REPLACE "/\\*[ \t]*Required.*Libraries:[ \t]*([^ \t]*)[ \t]*\\*/" "\\1" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
|
||||
# Replace all commas with semicolons
|
||||
string(REGEX REPLACE "," ";" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
|
||||
# Iterate through the libraries given
|
||||
@@ -464,38 +464,32 @@ macro(calculate_libraries SRC SKIP VERBOSE SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
append_to_list(LIBRARIES "${LIBRARY}")
|
||||
endif(MSVC)
|
||||
else(FOUND_${LIBRARY}_LIBRARY)
|
||||
# Skip this file
|
||||
set(${SKIP} TRUE)
|
||||
if(VERBOSE)
|
||||
# In the case of the library not being found, we fatally error so CMake stops trying to generate
|
||||
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(VERBOSE)
|
||||
# In the case of the library not being found, we fatally error so CMake stops trying to generate
|
||||
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)
|
||||
|
||||
###############################################################################
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Only install example.chk and example.conf from this directory
|
||||
# NOTE: I would've had this just find all files in the directory, but that would include files not needed (like this file)
|
||||
set(DATA example.chk botserv.example.conf example.conf hostserv.example.conf modules.example.conf operserv.example.conf chanserv.example.conf global.example.conf memoserv.example.conf nickserv.example.conf chanstats.example.conf)
|
||||
set(DATA example.chk botserv.example.conf example.conf hostserv.example.conf modules.example.conf operserv.example.conf chanserv.example.conf global.example.conf memoserv.example.conf nickserv.example.conf chanstats.example.conf irc2sql.example.conf stats.standalone.example.conf)
|
||||
install(FILES ${DATA}
|
||||
DESTINATION ${CONF_DIR}
|
||||
)
|
||||
|
||||
+166
-79
@@ -3,13 +3,23 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
* Note that an easy way to rename this service is to define{} the client name to something else.
|
||||
* First, create the service. If you do not want to have a 'BotServ', but do want the ability to have
|
||||
* ChanServ assigned to channels for the use of fantasy commands, you may delete the below 'service' block.
|
||||
*
|
||||
* Note that deleting a 'service' block for a pseudoclient that is already online will not remove the
|
||||
* client, the client becomes no different from a normal service bot, so you will have to use botserv/bot
|
||||
* to manually delete the client.
|
||||
*
|
||||
* You may then waant to map some of the below commands to other services, like placing botserv/bot on
|
||||
* OperServ so you can delete the below client, and mapping assign and unassign to ChanServ so users are
|
||||
* able to control whether or not ChanServ is in the channel. You may also want to map botserv/set/nobot
|
||||
* to OperServ so you can restrict who can assign the other core service clients.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the BotServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the botserv module too.
|
||||
*/
|
||||
nick = "BotServ"
|
||||
|
||||
@@ -56,17 +66,16 @@ 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.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
name = "BotServ"
|
||||
client = "BotServ"
|
||||
|
||||
/*
|
||||
* The default bot options for newly registered channels. Note that changing these options
|
||||
@@ -82,7 +91,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 +100,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 +112,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 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 = "!."
|
||||
#botumodes = "i"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -155,22 +142,27 @@ 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
|
||||
*
|
||||
* Allows service bots to be automatically assigned to channels upon registration.
|
||||
*/
|
||||
#module { name = "bs_autoassign" }
|
||||
bs_autoassign
|
||||
#module
|
||||
{
|
||||
name = "bs_autoassign"
|
||||
|
||||
/*
|
||||
* Automatically assign ChanServ to channels upon registration.
|
||||
*/
|
||||
@@ -184,7 +176,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,53 +238,145 @@ 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 commands:
|
||||
* botserv/set/dontkickops - Used for preventing BotServ from kicking channel operators.
|
||||
* botserv/set/dontkickvoices - Used for preventing BotServ from kicking voices.
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasist commands.
|
||||
* botserv/set/greet - Used for enabling or disabling BotServ's greet messages in a channel.
|
||||
* botserv/set/nobot - Used to prohibit specific channels from being assigned BotServ bots.
|
||||
* botserv/set/private - Used to prohibit specific BotServ bots from being assigned to channels.
|
||||
*
|
||||
* Used for setting options such as kickers and fantasy replies.
|
||||
*/
|
||||
module { name = "bs_set" }
|
||||
command { service = "BotServ"; name = "SET"; command = "botserv/set"; }
|
||||
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops"; }
|
||||
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices"; }
|
||||
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy"; }
|
||||
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet"; }
|
||||
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot"; }
|
||||
command { service = "BotServ"; name = "SET BANEXPIRE"; command = "botserv/set/banexpire"; }
|
||||
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; permission = "botserv/set/private"; }
|
||||
|
||||
/* Fantasy commands
|
||||
/*
|
||||
* greet
|
||||
*
|
||||
* 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 = "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"; }
|
||||
|
||||
/*
|
||||
* GREET privilege.
|
||||
*
|
||||
* Used by 'greet'.
|
||||
*
|
||||
* Users with this privilege have their greet shown when they join channels.
|
||||
*/
|
||||
privilege
|
||||
{
|
||||
name = "GREET"
|
||||
rank = 40
|
||||
level = 5
|
||||
flag = "g"
|
||||
xop = "AOP"
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* fantasy
|
||||
*
|
||||
* Allows 'fantaisist' commands to be used in channels.
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasist commands.
|
||||
*/
|
||||
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"; }
|
||||
|
||||
/*
|
||||
* Fantasy commands
|
||||
*
|
||||
* 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:fantasycharacter.
|
||||
* command with one of the fantasy characters configured in botserv's fantasycharacter
|
||||
* directive.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
fantasy { name = "ACCESS"; command = "chanserv/access"; }
|
||||
fantasy { name = "AKICK"; command = "chanserv/akick"; }
|
||||
fantasy { name = "AOP"; command = "chanserv/aop"; }
|
||||
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/hop"; }
|
||||
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"; }
|
||||
@@ -287,9 +386,13 @@ 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 = "QOP"; command = "chanserv/qop"; }
|
||||
fantasy { name = "MUTE"; command = "chanserv/ban"; kick = no; mode = "QUIET"; }
|
||||
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/sop"; }
|
||||
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"; }
|
||||
@@ -297,21 +400,5 @@ 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 = "VOP"; command = "chanserv/vop"; }
|
||||
|
||||
|
||||
/* Use m_rewrite to rewrite the op, deop, etc. fantasy commands (see chanserv.conf). */
|
||||
fantasy { name = "OWNER"; command = "rewrite"; }
|
||||
fantasy { name = "DEOWNER"; command = "rewrite"; }
|
||||
|
||||
fantasy { name = "PROTECT"; command = "rewrite"; }
|
||||
fantasy { name = "DEPROTECT"; command = "rewrite"; }
|
||||
|
||||
fantasy { name = "OP"; command = "rewrite"; }
|
||||
fantasy { name = "DEOP"; command = "rewrite"; }
|
||||
|
||||
fantasy { name = "HALFOP"; command = "rewrite"; }
|
||||
fantasy { name = "DEHALFOP"; command = "rewrite"; }
|
||||
|
||||
fantasy { name = "VOICE"; command = "rewrite"; }
|
||||
fantasy { name = "DEVOICE"; command = "rewrite"; }
|
||||
fantasy { name = "VOICE"; command = "chanserv/modes"; }
|
||||
fantasy { name = "VOP"; command = "chanserv/xop"; }
|
||||
|
||||
+308
-361
File diff suppressed because it is too large
Load Diff
@@ -3,9 +3,10 @@
|
||||
* 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 an SQL engine block.
|
||||
@@ -25,10 +26,9 @@ chanstats
|
||||
|
||||
/*
|
||||
* Enable Chanstats for newly registered nicks / channels.
|
||||
* Set it to 0 to disable it.
|
||||
*/
|
||||
NSDefChanstats = 1
|
||||
CSDefChanstats = 1
|
||||
ns_def_chanstats = yes
|
||||
cs_def_chanstats = yes
|
||||
}
|
||||
command { service = "ChanServ"; name = "SET CHANSTATS"; command = "chanserv/set/chanstats"; }
|
||||
command { service = "NickServ"; name = "SET CHANSTATS"; command = "nickserv/set/chanstats"; }
|
||||
@@ -37,9 +37,15 @@ command { service = "NickServ"; name = "SASET CHANSTATS"; command = "nickserv/sa
|
||||
module { name = "cs_fantasy_stats" }
|
||||
command { service = "ChanServ"; name = "STATS"; command = "chanserv/stats"; }
|
||||
command { service = "ChanServ"; name = "GSTATS"; command = "chanserv/gstats"; }
|
||||
fantasy { name = "STATS"; command = "chanserv/stats"; }
|
||||
fantasy { name = "GSTATS"; command = "chanserv/gstats"; }
|
||||
|
||||
module { name = "cs_fantasy_top" }
|
||||
command { service = "ChanServ"; name = "TOP"; command = "chanserv/top"; }
|
||||
command { service = "ChanServ"; name = "TOP10"; command = "chanserv/top10"; }
|
||||
command { service = "ChanServ"; name = "GTOP"; command = "chanserv/gtop"; }
|
||||
command { service = "ChanServ"; name = "GTOP10"; command = "chanserv/gtop10"; }
|
||||
fantasy { name = "TOP"; command = "chanserv/top"; }
|
||||
fantasy { name = "TOP10"; command = "chanserv/top10"; }
|
||||
fantasy { name = "GTOP"; command = "chanserv/gtop"; }
|
||||
fantasy { name = "GTOP10"; command = "chanserv/gtop10"; }
|
||||
|
||||
+2
-1
@@ -37,7 +37,8 @@ cd $ANOPATH
|
||||
if [ -f "$ANODATA/$ANOPIDF" ]
|
||||
then
|
||||
ANOPID=`cat "$ANODATA/$ANOPIDF"`
|
||||
if [ `ps auwx | grep $ANOPROG | grep $ANOPID | grep -v -c grep` = 1 ]
|
||||
kill -0 $ANOPID 2>/dev/null
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
exit
|
||||
fi
|
||||
|
||||
+262
-204
@@ -21,6 +21,15 @@
|
||||
* foo = bar
|
||||
* }
|
||||
*
|
||||
* Note that nameless blocks are allowed and are often used with comments to allow
|
||||
* easily commenting an entire block, for example:
|
||||
* #foobar
|
||||
* {
|
||||
* moo = "cow"
|
||||
* foo = bar
|
||||
* }
|
||||
* is an entirely commented block.
|
||||
*
|
||||
* Keys are case insensitive. Values depend on what key - generally, information is
|
||||
* given in the key comment. The quoting of values (and most other syntax) is quite
|
||||
* flexible, however, please do not forget to quote your strings:
|
||||
@@ -40,11 +49,6 @@
|
||||
*
|
||||
* "86400", "86400s", "1440m", "24h", "1d"
|
||||
*
|
||||
* CAUTION:
|
||||
* Please note that your services might _CRASH_ if you add more format-
|
||||
* strings (%s, %d, etc.) to custom messages than Anope needs. Use the
|
||||
* default messages to see how many format-strings are needed.
|
||||
*
|
||||
* In the documentation for each directive, one of the following will be
|
||||
* included to indicate whether an option is required:
|
||||
*
|
||||
@@ -75,17 +79,8 @@
|
||||
/*
|
||||
* [OPTIONAL] Defines
|
||||
*
|
||||
* You can define values to other values, which can be used to easially change
|
||||
* every value in the configuration. For example, use:
|
||||
*
|
||||
* define
|
||||
* {
|
||||
* name = "ChanServ"
|
||||
* value = "ChannelServ"
|
||||
* }
|
||||
*
|
||||
* To replace every occurance of ChanServ with ChannelServ in the configuration file,
|
||||
* and in every included configuration file (such as chanserv.example.conf).
|
||||
* You can define values to other values, which can be used to easily change
|
||||
* many values in the configuration. at once.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -106,19 +101,17 @@ define
|
||||
* the output from it will be included into your configuration.
|
||||
*/
|
||||
|
||||
/*
|
||||
include
|
||||
#include
|
||||
{
|
||||
type = "file"
|
||||
name = "some.conf"
|
||||
}
|
||||
|
||||
include
|
||||
#include
|
||||
{
|
||||
type = "executable"
|
||||
name = "/usr/bin/wget -q -O - http://some.misconfigured.network.com/services.conf"
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* [REQUIRED] IRCd Config
|
||||
@@ -126,6 +119,37 @@ include
|
||||
* This section is used to set up Anope to connect to your IRC network.
|
||||
* This section can be included multiple times, and Anope will attempt to
|
||||
* connect to each server until it finally connects.
|
||||
*
|
||||
* Each uplink IRCd should have a corresponding configuration to allow Services
|
||||
* to link to it.
|
||||
*
|
||||
* An example configuration for InspIRCd that is compatible with the below uplink
|
||||
* and serverinfo configuration would look like:
|
||||
*
|
||||
* <link name="services.localhost.net"
|
||||
* ipaddr="127.0.0.1"
|
||||
* port="7000"
|
||||
* sendpass="mypassword"
|
||||
* recvpass="mypassword">
|
||||
* <uline server="services.localhost.net" silent="yes">
|
||||
* <bind address="127.0.0.1" port="7000" type="servers">
|
||||
*
|
||||
* An example configuration for UnrealIRCd that is compatible with the below uplink
|
||||
* and serverinfo configuration would look like:
|
||||
*
|
||||
* link services.localhost.net
|
||||
* {
|
||||
* username *;
|
||||
* hostname *;
|
||||
* bind-ip "127.0.0.1";
|
||||
* port 7000;
|
||||
* hub *;
|
||||
* password-connect "mypassword";
|
||||
* password-receive "mypassword";
|
||||
* class servers;
|
||||
* };
|
||||
* ulines { services.localhost.net; };
|
||||
* listen 127.0.0.1:7000;
|
||||
*/
|
||||
uplink
|
||||
{
|
||||
@@ -144,7 +168,7 @@ uplink
|
||||
|
||||
/*
|
||||
* Enable if Services should connect using SSL.
|
||||
* You must have m_ssl loaded for this to work.
|
||||
* You must have an SSL module loaded for this to work.
|
||||
*/
|
||||
ssl = no
|
||||
|
||||
@@ -155,7 +179,7 @@ uplink
|
||||
*
|
||||
* Refer to your IRCd documentation for how this is to be done.
|
||||
*/
|
||||
port = 6667
|
||||
port = 7000
|
||||
|
||||
/*
|
||||
* The password to send to the IRC server for authentication.
|
||||
@@ -188,7 +212,7 @@ serverinfo
|
||||
|
||||
/*
|
||||
* The local address that Services will bind to before connecting to the remote
|
||||
* server. This may be useful for multihomed hosts. If ommited, Services will let
|
||||
* server. This may be useful for multihomed hosts. If omitted, Services will let
|
||||
* the Operating System choose the local address. This directive is optional.
|
||||
*
|
||||
* If you don't know what this means or don't need to use it, just leave this
|
||||
@@ -205,13 +229,13 @@ serverinfo
|
||||
|
||||
/*
|
||||
* The filename containing the Services process ID. The path is relative to the
|
||||
* services root directory. If not given, defaults to "data/services.pid".
|
||||
* services root directory.
|
||||
*/
|
||||
pid = "data/services.pid"
|
||||
|
||||
/*
|
||||
* The filename containing the Message of the Day. The path is relative to the
|
||||
* services root directory. If not given, defaults to "conf/services.motd".
|
||||
* services root directory.
|
||||
*/
|
||||
motd = "conf/services.motd"
|
||||
}
|
||||
@@ -224,8 +248,8 @@ serverinfo
|
||||
*
|
||||
* Supported:
|
||||
* - bahamut
|
||||
* - charybdis
|
||||
* - hybrid
|
||||
* - inspircd11
|
||||
* - inspircd12
|
||||
* - inspircd20
|
||||
* - ngircd
|
||||
@@ -233,7 +257,26 @@ serverinfo
|
||||
* - ratbox
|
||||
* - unreal
|
||||
*/
|
||||
module { name = "inspircd12" }
|
||||
module
|
||||
{
|
||||
name = "inspircd20"
|
||||
|
||||
/*
|
||||
* Some protocol modules can enforce mode locks server-side. This reduces the spam caused by
|
||||
* services immediately reversing mode changes for locked modes.
|
||||
*
|
||||
* If the protocol module you have loaded does not support this, this setting will have no effect.
|
||||
*/
|
||||
use_server_side_mlock = yes
|
||||
|
||||
/*
|
||||
* Some protocol modules can enforce topic locks server-side. This reduces the spam caused by
|
||||
* services immediately reversing topic changes.
|
||||
*
|
||||
* If the protocol module you have loaded does not support this, this setting will have no effect.
|
||||
*/
|
||||
use_server_side_topiclock = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] Network Information
|
||||
@@ -251,28 +294,58 @@ networkinfo
|
||||
/*
|
||||
* Set this to the maximum allowed nick length on your network.
|
||||
* Be sure to set this correctly, as setting this wrong can result in
|
||||
* Services being disconnected from the network. This directive is optional,
|
||||
* but recommended.
|
||||
* Services being disconnected from the network.
|
||||
*/
|
||||
nicklen = 31
|
||||
|
||||
/* Set this to the maximum allowed ident length on your network.
|
||||
* Be sure to set this correctly, as setting this wrong can result in
|
||||
* Services being disconnected from the network. This directive is optional,
|
||||
* but recommended.
|
||||
* Services being disconnected from the network.
|
||||
*/
|
||||
userlen = 10
|
||||
|
||||
/* Set this to the maximum allowed hostname length on your network.
|
||||
* Be sure to set this correctly, as setting this wrong can result in
|
||||
* Services being disconnected from the network. This directive is optional,
|
||||
* but recommended.
|
||||
* Services being disconnected from the network.
|
||||
*/
|
||||
hostlen = 64
|
||||
|
||||
/* Set this to the maximum allowed channel length on your network.
|
||||
*/
|
||||
chanlen = 32
|
||||
|
||||
/* The maximum number of list modes settable on a channel (such as b, e, I).
|
||||
* Comment out or set to 0 to disable.
|
||||
*/
|
||||
modelistsize = 100
|
||||
|
||||
/*
|
||||
* The characters allowed in hostnames. This is used for validating hostnames given
|
||||
* to services, such as BotServ bot hostnames and user vhosts. 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.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
*/
|
||||
vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"
|
||||
|
||||
/*
|
||||
* If set to true, 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 = ".-"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -303,11 +376,6 @@ options
|
||||
*/
|
||||
casemap = "ascii"
|
||||
|
||||
/*
|
||||
* The maximum length of passwords
|
||||
*/
|
||||
passlen = 32
|
||||
|
||||
/*
|
||||
* This key is used to initiate the random number generator. This number
|
||||
* MUST be random as you want your passcodes to be random. Don't give this
|
||||
@@ -321,19 +389,6 @@ options
|
||||
*/
|
||||
#seed = 9866235
|
||||
|
||||
/*
|
||||
* Allows Services to continue file write operations (i.e. database saving)
|
||||
* even if the original file cannot be backed up. Enabling this option may
|
||||
* allow Services to continue operation under conditions where it might
|
||||
* otherwise fail, such as a nearly-full disk.
|
||||
*
|
||||
* NOTE: Enabling this option can cause irrecoverable data loss under some
|
||||
* conditions, so make CERTAIN you know what you're doing when you enable it!
|
||||
*
|
||||
* This directive is optional, and you are discouraged against enabling it.
|
||||
*/
|
||||
#nobackupokay = yes
|
||||
|
||||
/*
|
||||
* If set, Services will perform more stringent checks on passwords. If this
|
||||
* isn't set, Services will only disallow a password if it is the same as the
|
||||
@@ -370,15 +425,12 @@ options
|
||||
badpasstimeout = 1h
|
||||
|
||||
/*
|
||||
* Sets the delay between automatic database updates. This time is reset by
|
||||
* the OperServ UPDATE command.
|
||||
* Sets the delay between automatic database updates.
|
||||
*/
|
||||
updatetimeout = 5m
|
||||
|
||||
/*
|
||||
* Sets the delay between checks for expired nicknames and channels. The
|
||||
* OperServ UPDATE command will also cause a check for expiration and reset
|
||||
* this timer.
|
||||
* Sets the delay between checks for expired nicknames and channels.
|
||||
*/
|
||||
expiretimeout = 30m
|
||||
|
||||
@@ -400,40 +452,14 @@ options
|
||||
* will use doing this. Higher values will cause less accurate timing but
|
||||
* less CPU usage.
|
||||
*
|
||||
* This shouldn't be set any higher than 10 seconds, and 1 second is best
|
||||
* if your system is powerful enough (or your network small enough) to
|
||||
* handle it. 0 will cause the timeout list to be checked every time
|
||||
* through the main loop, which will probably slow down Services too much
|
||||
* to be useful on most networks.
|
||||
*
|
||||
* Note that this value is not an absolute limit on the period between
|
||||
* checks of the timeout list; the previous may be as great as readtimeout
|
||||
* (above) during periods of inactivity.
|
||||
*
|
||||
* If this directive is not given, it will default to 0. See the 2nd paragraph
|
||||
* above for performance impacts if you do this.
|
||||
* If this directive is not given, it will default to 0.
|
||||
*/
|
||||
timeoutcheck = 3s
|
||||
|
||||
/*
|
||||
* Sets the number of days backups of databases are kept. If you don't give it,
|
||||
* or if you set it to 0, Services won't backup the databases.
|
||||
*
|
||||
* NOTE: Services must run 24 hours a day for this feature to work.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
keepbackups = 3
|
||||
|
||||
/*
|
||||
* If set, Services will require a reason when a FORBID is added, else the
|
||||
* reason is optional. This directive also applies to SUSPENDed channels as
|
||||
* well.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
forceforbidreason = yes
|
||||
|
||||
/*
|
||||
* If set, this will allow users to let Services send PRIVMSGs to them
|
||||
* instead of NOTICEs. Also see the defmsg option of nickserv:defaults,
|
||||
@@ -452,9 +478,7 @@ options
|
||||
* Nick@ServerName - e.g. NickServ@localhost.net. This should be used in
|
||||
* conjunction with IRCd aliases. This directive is optional.
|
||||
*
|
||||
* When using Bahamut, this option will NOT work if the uplink server is
|
||||
* configured as a services hub. The serviceshub option is not designed to
|
||||
* be used with Anope.
|
||||
* This option will have no effect on some IRCds, such as TS6 IRCds.
|
||||
*/
|
||||
#usestrictprivmsg = yes
|
||||
|
||||
@@ -464,35 +488,6 @@ options
|
||||
*/
|
||||
#hidestatso = yes
|
||||
|
||||
/*
|
||||
* Prevents users from registering their nick if they are not connected
|
||||
* for at least the given number of seconds.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#nickregdelay = 30
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* A space-separated list of ulined servers on your network, it is assumed that
|
||||
* the servers in this list are allowed to set channel modes and Services will
|
||||
@@ -505,27 +500,21 @@ options
|
||||
#ulineservers = "stats.your.network"
|
||||
|
||||
/*
|
||||
* Modes to set on service bots when they join channels, comment this out for no modes
|
||||
*
|
||||
* This directive is optional.
|
||||
* How long to wait between connection retries with the uplink(s).
|
||||
*/
|
||||
botmodes = "ao"
|
||||
retrywait = 60s
|
||||
|
||||
/*
|
||||
* How long to wait between connection retries, in seconds.
|
||||
*/
|
||||
retrywait = 60
|
||||
|
||||
/*
|
||||
* If set, Services will hide commands that users don't have the privileges to execute
|
||||
* If set, Services will hide commands that users don't have the privilege to execute
|
||||
* from HELP output.
|
||||
*/
|
||||
hideprivilegedcommands = yes
|
||||
|
||||
/*
|
||||
* If set, Services do not allow ownership of nick names, only ownership of accounts.
|
||||
* If set, Services will hide commands that users can't execute because they are not
|
||||
* logged in from HELP output.
|
||||
*/
|
||||
nonicknameownership = no
|
||||
hideregisteredcommands = yes
|
||||
|
||||
/* The regex engine to use, as provided by the regex modules.
|
||||
* Leave commented to disable regex matching.
|
||||
@@ -533,6 +522,21 @@ options
|
||||
* Note for this to work the regex module providing the regex engine must be loaded.
|
||||
*/
|
||||
regexengine = "regex/pcre"
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
* Removing .UTF-8 will instead use the default encoding for the language, eg. iso-8859-1 for western European languages.
|
||||
*/
|
||||
languages = "ca_ES.UTF-8 de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 hu_HU.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ru_RU.UTF-8 tr_TR.UTF-8"
|
||||
|
||||
/*
|
||||
* Default language that non- and newly-registered nicks will receive messages in.
|
||||
* Set to "en" to enable English. Defaults to the language the system uses.
|
||||
*/
|
||||
#defaultlanguage = "es_ES.UTF-8"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -603,7 +607,7 @@ include
|
||||
/*
|
||||
* [OPTIONAL] NickServ
|
||||
*
|
||||
* Includes memoserv.example.conf, which is necessary for NickServ functionality.
|
||||
* Includes nickserv.example.conf, which is necessary for NickServ functionality.
|
||||
*
|
||||
* Remove this block to disable NickServ.
|
||||
*/
|
||||
@@ -657,6 +661,12 @@ log
|
||||
*/
|
||||
#source = ""
|
||||
|
||||
/*
|
||||
* The bot used to log generic messages which have no predefined sender if there
|
||||
* is a channel in the target directive.
|
||||
*/
|
||||
bot = "Global"
|
||||
|
||||
/*
|
||||
* The number of days to keep logfiles, only useful if you are logging to a file.
|
||||
* Set to 0 to never delete old logfiles.
|
||||
@@ -699,8 +709,8 @@ log
|
||||
*
|
||||
* Note that modules may add their own values to these options.
|
||||
*/
|
||||
admin = "operserv/*"
|
||||
override = "chanserv/* nickserv/* memoserv/set botserv/* ~botserv/set"
|
||||
admin = "*"
|
||||
override = "chanserv/* nickserv/* memoserv/set ~botserv/set botserv/*"
|
||||
commands = "~operserv/* *"
|
||||
servers = "*"
|
||||
#channels = "~mode *"
|
||||
@@ -716,7 +726,7 @@ log
|
||||
log
|
||||
{
|
||||
target = "globops"
|
||||
admin = "global/* operserv/global operserv/mode operserv/kick operserv/akill operserv/s*line operserv/noop operserv/jupe operserv/oline operserv/set operserv/svsnick operserv/svsjoin operserv/svspart nickserv/getpass */drop"
|
||||
admin = "global/* operserv/mode operserv/kick operserv/akill operserv/s*line operserv/noop operserv/jupe operserv/oline operserv/set operserv/svsnick operserv/svsjoin operserv/svspart nickserv/getpass */drop"
|
||||
servers = "squit"
|
||||
users = "oper"
|
||||
other = "expire/* bados akill/*"
|
||||
@@ -737,18 +747,21 @@ log
|
||||
*
|
||||
* Available privileges:
|
||||
* botserv/administration - Can view and assign private BotServ bots
|
||||
* chanserv/administration - Can modify the settings of any channel (including changing of the owner!)
|
||||
* chanserv/access/modify - Can modify channel access and akick lists, and use /chanserv enforce
|
||||
* chanserv/auspex - Can see any information with /chanserv info
|
||||
* chanserv/no-register-limit - May register an unlimited number of channels and nicknames
|
||||
* chanserv/set - Can modify the settings of any channel (incl. changing of the owner!)
|
||||
* chanserv/kick - Can kick and ban users from channels through ChanServ
|
||||
* memoserv/info - Can see any information with /memoserv info
|
||||
* memoserv/set-limit - Can set the limit of max stored memos on any user and channel
|
||||
* memoserv/no-limit - Can send memos through limits and throttles
|
||||
* nickserv/access - Can modify other users access list
|
||||
* nickserv/alist - Can see the access list of other users
|
||||
* nickserv/access - Can modify other users access and certificate lists
|
||||
* nickserv/alist - Can see the channel access list of other users
|
||||
* nickserv/auspex - Can see any information with /nickserv info
|
||||
* nickserv/confirm - Can confirm other users nicknames
|
||||
* nickserv/drop - Can drop other users nicks
|
||||
* operserv/config - Can modify services's configuration
|
||||
* protected - Can not be kicked from channels by Services
|
||||
*
|
||||
* Available commands:
|
||||
* botserv/bot/del botserv/bot/add botserv/bot/change botserv/set/private
|
||||
@@ -757,7 +770,7 @@ log
|
||||
* chanserv/access/list chanserv/drop chanserv/getkey chanserv/invite
|
||||
* chanserv/list chanserv/suspend chanserv/topic
|
||||
*
|
||||
* chanserv/saset/bantype chanserv/saset/description chanserv/saset/email
|
||||
* chanserv/saset/bantype chanserv/saset/description chanserv/saset/email chanserv/saset/keepmodes
|
||||
* chanserv/saset/founder chanserv/saset/keeptopic chanserv/saset/restricted
|
||||
* chanserv/saset/peace chanserv/saset/persist chanserv/saset/private
|
||||
* chanserv/saset/secure chanserv/saset/securefounder chanserv/saset/secureops
|
||||
@@ -766,12 +779,13 @@ log
|
||||
*
|
||||
* memoserv/sendall memoserv/staff
|
||||
*
|
||||
* nickserv/getpass nickserv/getemail nickserv/suspend
|
||||
* nickserv/resetpass nickserv/release nickserv/list
|
||||
* nickserv/getpass nickserv/getemail nickserv/suspend nickserv/ajoin
|
||||
* nickserv/list
|
||||
*
|
||||
* nickserv/saset/autoop nickserv/saset/email nickserv/saset/greet nickserv/saset/password
|
||||
* nickserv/saset/display nickserv/saset/kill nickserv/saset/language nickserv/saset/message
|
||||
* nickserv/saset/private nickserv/saset/secure nickserv/saset/url nickserv/saset/noexpire
|
||||
* nickserv/saset/autoop nickserv/saset/email nickserv/saset/greet nickserv/saset/password
|
||||
* nickserv/saset/display nickserv/saset/kill nickserv/saset/language nickserv/saset/message
|
||||
* nickserv/saset/private nickserv/saset/secure nickserv/saset/url nickserv/saset/noexpire
|
||||
* nickserv/saset/keepmodes
|
||||
*
|
||||
* hostserv/set hostserv/del hostserv/list
|
||||
*
|
||||
@@ -780,7 +794,7 @@ log
|
||||
* operserv/news operserv/stats operserv/kick operserv/exception operserv/seen
|
||||
* operserv/mode operserv/session operserv/modinfo operserv/ignore operserv/chanlist
|
||||
* operserv/chankill operserv/akill operserv/sqline operserv/snline operserv/userlist
|
||||
* operserv/global operserv/oper operserv/config operserv/umode operserv/logsearch
|
||||
* operserv/oper operserv/config operserv/umode operserv/logsearch
|
||||
* operserv/modload operserv/jupe operserv/set operserv/noop
|
||||
* operserv/quit operserv/update operserv/reload operserv/restart
|
||||
* operserv/shutdown operserv/svs operserv/oline operserv/kill
|
||||
@@ -812,7 +826,7 @@ opertype
|
||||
inherits = "Helper, Another Helper"
|
||||
|
||||
/* What commands (see above) this opertype may use */
|
||||
commands = "chanserv/list chanserv/suspend chanserv/topic memoserv/staff nickserv/list nickserv/resetpass nickserv/suspend operserv/mode operserv/chankill operserv/akill operserv/session operserv/modinfo operserv/sqline operserv/oper operserv/kick operserv/ignore operserv/snline"
|
||||
commands = "chanserv/list chanserv/suspend chanserv/topic memoserv/staff nickserv/list nickserv/suspend operserv/mode operserv/chankill operserv/akill operserv/session operserv/modinfo operserv/sqline operserv/oper operserv/kick operserv/ignore operserv/snline"
|
||||
|
||||
/* What privs (see above) this opertype has */
|
||||
privs = "chanserv/auspex chanserv/no-register-limit memoserv/* nickserv/auspex nickserv/confirm"
|
||||
@@ -834,7 +848,7 @@ opertype
|
||||
|
||||
inherits = "Services Operator"
|
||||
|
||||
commands = "chanserv/access/list chanserv/drop chanserv/getkey chanserv/saset/noexpire memoserv/sendall nickserv/saset/* nickserv/getemail operserv/news operserv/jupe operserv/svs operserv/stats operserv/oline operserv/noop operserv/forbid global/* operserv/global"
|
||||
commands = "chanserv/access/list chanserv/drop chanserv/getkey chanserv/saset/noexpire memoserv/sendall nickserv/saset/* nickserv/getemail operserv/news operserv/jupe operserv/svs operserv/stats operserv/oline operserv/noop operserv/forbid global/*"
|
||||
|
||||
privs = "*"
|
||||
}
|
||||
@@ -858,7 +872,7 @@ opertype
|
||||
* As with all permissions, make sure to only give trustworthy people access to Services.
|
||||
*/
|
||||
|
||||
oper
|
||||
#oper
|
||||
{
|
||||
/* The nickname of this services oper */
|
||||
#name = "nick1"
|
||||
@@ -886,19 +900,17 @@ oper
|
||||
#vhost = "oper.mynet"
|
||||
}
|
||||
|
||||
/*
|
||||
oper
|
||||
#oper
|
||||
{
|
||||
name = "nick2"
|
||||
type = "Services Administrator"
|
||||
}
|
||||
|
||||
oper
|
||||
#oper
|
||||
{
|
||||
name = "nick3"
|
||||
type = "Helper"
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* [OPTIONAL] Mail Config
|
||||
@@ -916,8 +928,8 @@ mail
|
||||
/*
|
||||
* If set, this option enables the mail commands in Services. You may choose
|
||||
* to disable it if you have no Sendmail-compatible mailer installed. Whilst
|
||||
* this directive (and entire block) is optional, it is required if the
|
||||
* nickserv:emailregistration is set to yes.
|
||||
* this directive (and entire block) is optional, it is required if
|
||||
* nickserv:registration is set to yes.
|
||||
*/
|
||||
usemail = yes
|
||||
|
||||
@@ -940,18 +952,6 @@ mail
|
||||
*/
|
||||
sendfrom = "services@localhost.net"
|
||||
|
||||
/*
|
||||
* If set, RESETPASS will be restricted to services operators with access to
|
||||
* nickserv/resetpass in their opertype:commands.
|
||||
* This directive is optional.
|
||||
*
|
||||
* WARNING: If you choose to not enable this option, you should limit the
|
||||
* number of processes that the services user can have at a time (you can
|
||||
* create a special user for this; remember to NEVER launch Services as
|
||||
* root).
|
||||
*/
|
||||
restrict = yes
|
||||
|
||||
/*
|
||||
* This controls the minimum amount of time a user must wait before sending
|
||||
* another e-mail after they have sent one. It also controls the minimum time
|
||||
@@ -1041,80 +1041,90 @@ mail
|
||||
* You should only use this to upgrade old databases to a newer database format by loading
|
||||
* other database modules in addition to this one, which will be used when saving databases.
|
||||
*/
|
||||
#module { name = "db_old" }
|
||||
db_old
|
||||
#module
|
||||
{
|
||||
name = "db_old"
|
||||
|
||||
/*
|
||||
* This is the encryption type used by the databases. This must be set correctly or
|
||||
* your passwords will not work. Valid options are: md5, oldmd5, sha1, and plain.
|
||||
* You must also be sure to load the correct encryption module below in the Encryption
|
||||
* Modules section so that your passwords work.
|
||||
*/
|
||||
#hash = "md5"
|
||||
}
|
||||
|
||||
/*
|
||||
* [DEPRECATED] db_plain
|
||||
*
|
||||
* This is the flatfile database format from Anope-1.9.2 to Anope-1.9.5.
|
||||
* To convert from this format, load both this and db_flatfile. Be sure to name db_flatfile's
|
||||
* target database to something else. Start Anope then shut down so the new database will be written.
|
||||
* Then unload this and restart Anope, loading from the new database.
|
||||
*/
|
||||
#module { name = "db_plain" }
|
||||
db_plain
|
||||
{
|
||||
/*
|
||||
* The database name db_plain should use
|
||||
*/
|
||||
database = "anope.db"
|
||||
}
|
||||
|
||||
/*
|
||||
* db_flatfile
|
||||
* [RECOMMENDED] db_flatfile
|
||||
*
|
||||
* This is the default flatfile database format.
|
||||
*/
|
||||
module { name = "db_flatfile" }
|
||||
db_flatfile
|
||||
module
|
||||
{
|
||||
name = "db_flatfile"
|
||||
|
||||
/*
|
||||
* The database name db_flatfile should use
|
||||
*/
|
||||
database = "anope.db"
|
||||
|
||||
/*
|
||||
* Sets the number of days backups of databases are kept. If you don't give it,
|
||||
* or if you set it to 0, Services won't backup the databases.
|
||||
*
|
||||
* NOTE: Services must run 24 hours a day for this feature to work.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
keepbackups = 3
|
||||
|
||||
/*
|
||||
* Allows Services to continue file write operations (i.e. database saving)
|
||||
* even if the original file cannot be backed up. Enabling this option may
|
||||
* allow Services to continue operation under conditions where it might
|
||||
* otherwise fail, such as a nearly-full disk.
|
||||
*
|
||||
* NOTE: Enabling this option can cause irrecoverable data loss under some
|
||||
* conditions, so make CERTAIN you know what you're doing when you enable it!
|
||||
*
|
||||
* This directive is optional, and you are discouraged against enabling it.
|
||||
*/
|
||||
#nobackupokay = yes
|
||||
|
||||
/*
|
||||
* If enabled, services will fork a child process to save databases.
|
||||
*
|
||||
* This is only useful with very large databases, with hundreds
|
||||
* of thousands of objects, that have a noticeable delay from
|
||||
* writing databases.
|
||||
*
|
||||
* If your database is large enough cause a noticeable delay when
|
||||
* saving you should consider a more powerful alternative such
|
||||
* as db_sql or db_redis, which incrementally update their
|
||||
* databases asynchronously in real time.
|
||||
*/
|
||||
fork = no
|
||||
}
|
||||
|
||||
/*
|
||||
* db_sql
|
||||
* db_sql and db_sql_live
|
||||
*
|
||||
* This module allows saving and loading databases using one of the SQL engines.
|
||||
* db_sql module allows saving and loading databases using one of the SQL engines.
|
||||
* This module loads the databases once on startup, then incrementally updates
|
||||
* objects in the database as they are changed within Anope in real time. Changes
|
||||
* to the SQL tables not done by Anope will have no effect and will be overwritten.
|
||||
*
|
||||
*/
|
||||
#module { name = "db_sql" }
|
||||
|
||||
/*
|
||||
* db_sql_live
|
||||
*
|
||||
* This module allows saving and loading databases using one of the SQL engines.
|
||||
* db_sql_live module allows saving and loading databases using one of the SQL engines.
|
||||
* This module reads and writes to SQL in real time. Changes to the SQL tables
|
||||
* will be immediately reflected into Anope. This module should not be loaded
|
||||
* in conjunction with db_sql, except during the initial import of existing
|
||||
* databases to SQL.
|
||||
* in conjunction with db_sql.
|
||||
*
|
||||
*/
|
||||
#module { name = "db_sql_live" }
|
||||
|
||||
db_sql
|
||||
#module
|
||||
{
|
||||
name = "db_sql"
|
||||
#name = "db_sql_live"
|
||||
|
||||
/*
|
||||
* The SQL service db_sql(_live) should use, these are configured in modules.conf.
|
||||
* For MySQL, this should probably be mysql/main.
|
||||
@@ -1126,6 +1136,39 @@ db_sql
|
||||
* Do not use the same prefix for other programs.
|
||||
*/
|
||||
#prefix = "anope_db_"
|
||||
|
||||
/* Whether or not to import data from another database module in to SQL on startup.
|
||||
* If you enable this, be sure that the database services is configured to use is
|
||||
* empty and that another database module to import from is loaded before db_sql.
|
||||
* After you enable this and do a database import you should disable it for
|
||||
* subsequent restarts.
|
||||
*
|
||||
* Note that you can not import databases using db_sql_live. If you want to import
|
||||
* databases and use db_sql_live you should import them using db_sql, then shut down
|
||||
* and start services with db_sql_live.
|
||||
*/
|
||||
import = false
|
||||
}
|
||||
|
||||
/*
|
||||
* db_redis.
|
||||
*
|
||||
* This module allows using Redis (http://redis.io) as a database backend.
|
||||
* This module requires that m_redis is loaded and configured properly.
|
||||
*
|
||||
* Redis 2.8 supports keyspace notifications which allows Redis to push notifications
|
||||
* to Anope about outside modifications to the database. This module supports this and
|
||||
* will internally reflect any changes made to the database immediately once notified.
|
||||
* See docs/REDIS for more information regarding this.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "db_redis"
|
||||
|
||||
/*
|
||||
* Redis database to use. This must be configured with m_redis.
|
||||
*/
|
||||
engine = "redis/main"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1149,8 +1192,9 @@ db_sql
|
||||
* encrypted by this module. Old passwords stored in another encryption method are
|
||||
* automatically re-encrypted by the primary encryption module on next identify.
|
||||
*
|
||||
* NOTE: enc_old is Anope's previous (broken) MD5 implementation, if your databases
|
||||
* were made using that module, continue to use it and do not use enc_md5.
|
||||
* NOTE: enc_old is Anope's previous (broken) MD5 implementation which is present in
|
||||
* versions prior to Anope 1.7.17. If your databases were made using that module,
|
||||
* use this and not enc_md5.
|
||||
*
|
||||
* NOTE: enc_sha1 relies on how the OS stores 2+ byte data internally, and is
|
||||
* potentially broken when moving between 2 different OSes, such as moving from
|
||||
@@ -1161,6 +1205,7 @@ db_sql
|
||||
*
|
||||
*/
|
||||
|
||||
#module { name = "enc_bcrypt" }
|
||||
module { name = "enc_sha256" }
|
||||
#module { name = "enc_md5" }
|
||||
#module { name = "enc_sha1" }
|
||||
@@ -1191,7 +1236,20 @@ include
|
||||
* Requires a MySQL Database.
|
||||
*/
|
||||
#include
|
||||
#{
|
||||
# type = "file"
|
||||
# name = "chanstats.example.conf"
|
||||
#}
|
||||
{
|
||||
type = "file"
|
||||
name = "chanstats.example.conf"
|
||||
}
|
||||
|
||||
/*
|
||||
* IRC2SQL Gateway
|
||||
* This module collects data about users, channels and servers. It doesn't build stats
|
||||
* itself, however, it gives you the database, it's up to you how you use it.
|
||||
*
|
||||
* Requires a MySQL Database and MySQL version 5.5 or higher
|
||||
*/
|
||||
#include
|
||||
{
|
||||
type = "file"
|
||||
name = "irc2sql.example.conf"
|
||||
}
|
||||
|
||||
+13
-22
@@ -4,12 +4,12 @@
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
* Note that an easy way to rename this service is to define{} the client name to something else.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the Global client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the global module too.
|
||||
*/
|
||||
nick = "Global"
|
||||
|
||||
@@ -56,38 +56,30 @@ 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
|
||||
@@ -120,5 +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"; }
|
||||
|
||||
+29
-41
@@ -4,12 +4,12 @@
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
* Note that an easy way to rename this service is to define{} the client name to something else.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the HostServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the hostserv module too.
|
||||
*/
|
||||
nick = "HostServ"
|
||||
|
||||
@@ -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 to true, 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
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -129,7 +103,20 @@ command { service = "HostServ"; name = "DELALL"; command = "hostserv/delall"; pe
|
||||
*
|
||||
* Used for grouping one vHost to many nicks.
|
||||
*/
|
||||
module { name = "hs_group" }
|
||||
module
|
||||
{
|
||||
name = "hs_group"
|
||||
|
||||
/*
|
||||
* Upon nickserv/group, this option syncs the nick's main vHost to the grouped nick.
|
||||
*/
|
||||
syncongroup = false
|
||||
|
||||
/*
|
||||
* This makes vhosts act as if they are per account.
|
||||
*/
|
||||
synconset = false
|
||||
}
|
||||
command { service = "HostServ"; name = "GROUP"; command = "hostserv/group"; }
|
||||
|
||||
/*
|
||||
@@ -165,17 +152,14 @@ command { service = "HostServ"; name = "ON"; command = "hostserv/on"; }
|
||||
/*
|
||||
* hs_request
|
||||
*
|
||||
* Provides the commands hostserv/request, hostserv/active, hostserv/reject, and hostserv/waiting.
|
||||
* Provides the commands hostserv/request, hostserv/activate, hostserv/reject, and hostserv/waiting.
|
||||
*
|
||||
* 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,6 +171,10 @@ 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
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
/*
|
||||
* Example configuration file for the irc2sql gateway
|
||||
*
|
||||
*/
|
||||
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the StatServ client.
|
||||
*/
|
||||
nick = "StatServ"
|
||||
|
||||
/*
|
||||
* The username of the StatServ client.
|
||||
*/
|
||||
user = "StatServ"
|
||||
|
||||
/*
|
||||
* The hostname of the StatServ client.
|
||||
*/
|
||||
host = "services.host"
|
||||
|
||||
/*
|
||||
* The realname of the StatServ client.
|
||||
*/
|
||||
gecos = "Statistical Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
* Do not modify this unless you know what you are doing.
|
||||
*
|
||||
* 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
|
||||
* unable to do certain things if this option is enabled.
|
||||
*/
|
||||
#modes = "+o"
|
||||
|
||||
/*
|
||||
* An optional comma separated list of channels this service should join. Outside
|
||||
* 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 characters or prefix symbols.
|
||||
*/
|
||||
#channels = "@#services,#mychan"
|
||||
}
|
||||
|
||||
module
|
||||
{
|
||||
name = "irc2sql"
|
||||
|
||||
/*
|
||||
* The name of the client that should send the CTCP VERSION requests.
|
||||
* It must already exist or must be defined in the following service block.
|
||||
*/
|
||||
client = "StatServ"
|
||||
|
||||
/*
|
||||
* The name of the SQL engine to use.
|
||||
* This must be MySQL and must match the name in the mysql{} block
|
||||
*/
|
||||
engine = "mysql/main"
|
||||
|
||||
/*
|
||||
* An optional prefix to prepended to the name of each created table.
|
||||
* Do not use the same prefix for other programs.
|
||||
*/
|
||||
prefix = "anope_"
|
||||
|
||||
/*
|
||||
* GeoIP - Automatically adds users geoip location to the user table.
|
||||
* Tables are created by irc2sql, you have to run the
|
||||
* geoipupdate script after you started Anope to download
|
||||
* and import the GeoIP database.
|
||||
*
|
||||
* The geoip database can be the smaller "country" database or the
|
||||
* larger "city" database. Comment to disable geoip lookup.
|
||||
*/
|
||||
geoip_database = "country"
|
||||
|
||||
/*
|
||||
* Get the CTCP version from users
|
||||
* The users connecting to the network will receive a CTCP VERSION
|
||||
* request from the above configured services client
|
||||
*/
|
||||
ctcpuser = "yes"
|
||||
|
||||
/*
|
||||
* Send out CTCP VERSION requests to users during burst.
|
||||
* Disable this if you restart Anope often and don't want to
|
||||
* annoy your users.
|
||||
*/
|
||||
ctcpeob = "yes"
|
||||
}
|
||||
|
||||
+15
-19
@@ -4,12 +4,12 @@
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
* Note that an easy way to rename this service is to define{} the client name to something else.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the MemoServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the memoserv module too.
|
||||
*/
|
||||
nick = "MemoServ"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -193,7 +179,17 @@ command { service = "MemoServ"; name = "READ"; command = "memoserv/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"; }
|
||||
|
||||
/*
|
||||
|
||||
+369
-219
@@ -4,6 +4,9 @@
|
||||
* The following blocks are used to load all non-core modules, including 3rd-party modules.
|
||||
* Modules can be prevented from loading by commenting out the line, other modules can be added by
|
||||
* adding a module block. These modules will be loaded prior to Services connecting to your network.
|
||||
*
|
||||
* Note that some of these modules are labeled EXTRA, and must be enabled prior to compiling by
|
||||
* running the 'extras' script on Linux and UNIX.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -21,9 +24,10 @@ module { name = "help" }
|
||||
* 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" }
|
||||
dns
|
||||
#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
|
||||
@@ -65,6 +69,14 @@ dns
|
||||
* 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
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -74,9 +86,10 @@ dns
|
||||
* 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.
|
||||
@@ -96,39 +109,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"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -136,9 +151,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"
|
||||
}
|
||||
|
||||
@@ -150,62 +166,71 @@ 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"
|
||||
name = "m_httpd"
|
||||
|
||||
/* IP to listen on. */
|
||||
ip = "0.0.0.0"
|
||||
httpd
|
||||
{
|
||||
/* Name of this service. */
|
||||
name = "httpd/main"
|
||||
|
||||
/* Port to listen on. */
|
||||
port = 8080
|
||||
/* IP to listen on. */
|
||||
ip = "0.0.0.0"
|
||||
|
||||
/* Time before connections to this server are timed out. */
|
||||
timeout = 30
|
||||
/* Port to listen on. */
|
||||
port = 8080
|
||||
|
||||
/* Listen using SSL. Requires m_ssl. */
|
||||
#ssl = yes
|
||||
/* Time before connections to this server are timed out. */
|
||||
timeout = 30
|
||||
|
||||
/* 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"
|
||||
/* Listen using SSL. Requires an SSL module. */
|
||||
#ssl = yes
|
||||
|
||||
/* The header to look for. These probably work as is. */
|
||||
extforward_header = "X-Forwarded-For Forwarded-For"
|
||||
/* 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"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* m_ldap
|
||||
* m_ldap [EXTRA]
|
||||
*
|
||||
* 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"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* m_ldap_authentication
|
||||
* m_ldap_authentication [EXTRA]
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
@@ -220,7 +245,7 @@ m_ldap_authentication
|
||||
|
||||
/*
|
||||
* 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"
|
||||
|
||||
@@ -242,28 +267,30 @@ m_ldap_authentication
|
||||
password_attribute = "userPassword"
|
||||
|
||||
/*
|
||||
* Enable this to have this module disable "/msg 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 "/msg NickServ 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"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_ldap_oper
|
||||
* m_ldap_oper [EXTRA]
|
||||
*
|
||||
* This module dynamically ties users to Anope opertypes when they identify
|
||||
* via LDAP group membership. Requires m_ldap.
|
||||
*
|
||||
* 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.
|
||||
@@ -294,20 +321,100 @@ m_ldap_oper
|
||||
}
|
||||
|
||||
/*
|
||||
* m_mysql
|
||||
* m_mysql [EXTRA]
|
||||
*
|
||||
* 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
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* m_regex_pcre [EXTRA]
|
||||
*
|
||||
* Provides the regex engine regex/pcre, which uses the Perl Compatible Regular Expressions library.
|
||||
*/
|
||||
#module { name = "m_regex_pcre" }
|
||||
|
||||
/*
|
||||
* m_regex_posix [EXTRA]
|
||||
*
|
||||
* Provides the regex engine regex/posix, which uses the POSIX compliant regular expressions.
|
||||
* This is likely the only regex module you will not need extra libraries for.
|
||||
*/
|
||||
#module { name = "m_regex_posix" }
|
||||
|
||||
/*
|
||||
* m_regex_tre [EXTRA]
|
||||
*
|
||||
* Provides the regex engine regex/tre, which uses the TRE regex library.
|
||||
*/
|
||||
#module { name = "m_regex_tre" }
|
||||
|
||||
/*
|
||||
* m_rewrite
|
||||
*
|
||||
* Allows rewriting commands sent to/from clients.
|
||||
*/
|
||||
#module { name = "m_rewrite" }
|
||||
#command
|
||||
{
|
||||
service = "ChanServ"; name = "CLEAR"; command = "rewrite"
|
||||
|
||||
/* Enable m_rewrite. */
|
||||
rewrite = true
|
||||
|
||||
/* Source message to match. A $ can be used to match anything. */
|
||||
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.
|
||||
*/
|
||||
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"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -323,12 +430,13 @@ 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"
|
||||
|
||||
@@ -369,41 +477,129 @@ 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_sasl
|
||||
*
|
||||
* Some IRCds allow "SASL" authentication to let users identify to Services
|
||||
* during the IRCd user registration process. If this module is loaded, Services will allow
|
||||
* authenticating users through this mechanism. Supported mechanisms are:
|
||||
* PLAIN, EXTERNAL.
|
||||
*/
|
||||
proxyscan
|
||||
#module { name = "m_sasl" }
|
||||
|
||||
/*
|
||||
* m_sasl_dh-aes [EXTRA]
|
||||
*
|
||||
* Add the DH-AES mechanism to SASL.
|
||||
* Requires m_sasl to be loaded.
|
||||
* Requires openssl.
|
||||
*/
|
||||
#module { name = "m_sasl_dh-aes" }
|
||||
|
||||
/*
|
||||
* m_sasl_dh-blowfish [EXTRA]
|
||||
*
|
||||
* Add the DH-BLOWFISH mechanism to SASL.
|
||||
* Requires m_sasl to be loaded.
|
||||
* Requires openssl.
|
||||
*/
|
||||
#module { name = "m_sasl_dh-blowfish" }
|
||||
|
||||
/*
|
||||
* m_ssl_gnutls [EXTRA]
|
||||
*
|
||||
* This module provides SSL services to Anope using GnuTLS, for example to
|
||||
* connect to the uplink server(s) via SSL.
|
||||
*
|
||||
* You may only load either m_ssl_gnutls or m_ssl_openssl, bot not both.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
/* 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
|
||||
name = "m_ssl_gnutls"
|
||||
|
||||
/*
|
||||
* 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.
|
||||
* An optional certificate and key for m_ssl_gnutls to give to the uplink.
|
||||
*
|
||||
* You can generate your own certificate and key pair by using:
|
||||
*
|
||||
* certtool --generate-privkey --bits 2048 --outfile anope.key
|
||||
* certtool --generate-self-signed --load-privkey anope.key --outfile anope.crt
|
||||
*
|
||||
*/
|
||||
reason = "You have an open proxy running on your host (%t:%i:%p)"
|
||||
cert = "data/anope.crt"
|
||||
key = "data/anope.key"
|
||||
|
||||
/*
|
||||
* Diffie-Hellman parameters to use when acting as a server. This is only
|
||||
* required for TLS servers that want to use ephemeral DH cipher suites.
|
||||
*
|
||||
* This is NOT required for Anope to connect to the uplink server(s) via SSL.
|
||||
*
|
||||
* You can generate DH parameters by using:
|
||||
*
|
||||
* certtool --generate-dh-params --bits 2048 --outfile dhparams.pem
|
||||
*
|
||||
*/
|
||||
# dhparams = "data/dhparams.pem"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_sql_authentication
|
||||
* m_ssl_openssl [EXTRA]
|
||||
*
|
||||
* This module provides SSL services to Anope using OpenSSL, for example to
|
||||
* connect to the uplink server(s) via SSL.
|
||||
*
|
||||
* You may only load either m_ssl_openssl or m_ssl_gnutls, bot not both.
|
||||
*
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "m_ssl_openssl"
|
||||
|
||||
/*
|
||||
* An optional certificate and key for m_ssl_openssl to give to the uplink.
|
||||
*
|
||||
* You can generate your own certificate and key pair by using:
|
||||
*
|
||||
* openssl genrsa -out anope.key 2048
|
||||
* openssl req -new -x509 -key anope.key -out anope.crt -days 1095
|
||||
*/
|
||||
cert = "data/anope.crt"
|
||||
key = "data/anope.key"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_sql_authentication [EXTRA]
|
||||
*
|
||||
* This module allows authenticating users against an external SQL database using a custom
|
||||
* query.
|
||||
*/
|
||||
#module { name = "m_sql_authentication" }
|
||||
m_sql_authentication
|
||||
#module
|
||||
{
|
||||
name = "m_sql_authentication"
|
||||
|
||||
/* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
|
||||
engine = "mysql/main"
|
||||
|
||||
@@ -433,26 +629,48 @@ m_sql_authentication
|
||||
query = "SELECT `email_addr` AS `email` FROM `my_users` WHERE `username` = @a@ AND `password` = MD5(CONCAT('salt', @p@))"
|
||||
|
||||
/*
|
||||
* Enable this to have this module disable "/msg NickServ REGISTER".
|
||||
*/
|
||||
disable_ns_register = false
|
||||
|
||||
/*
|
||||
* The reason to give the users who try to "/msg NickServ REGISTER" if
|
||||
* disable_ns_register is enabled.
|
||||
* If set, the reason to give the users who try to "/msg NickServ REGISTER".
|
||||
* If not set, then registration is not blocked.
|
||||
*/
|
||||
#disable_reason = "To register on this network visit http://some.misconfigured.site/register"
|
||||
|
||||
/*
|
||||
* 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_email_reason = "To change your email address visit http://some.misconfigured.site"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_sql_oper
|
||||
* m_sql_log [EXTRA]
|
||||
*
|
||||
* 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 [EXTRA]
|
||||
*
|
||||
* 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" }
|
||||
m_sql_oper
|
||||
#module
|
||||
{
|
||||
name = "m_sql_oper"
|
||||
|
||||
/* SQL engine to use. Should be configured elsewhere with m_mysql, m_sqlite, etc. */
|
||||
engine = "mysql/main"
|
||||
|
||||
@@ -470,90 +688,46 @@ m_sql_oper
|
||||
}
|
||||
|
||||
/*
|
||||
* m_sqlite
|
||||
* m_sqlite [EXTRA]
|
||||
*
|
||||
* This module allows other modules to use SQLite.
|
||||
*/
|
||||
#module { name = "m_sqlite" }
|
||||
sqlite
|
||||
#module
|
||||
{
|
||||
/* The name of this service. */
|
||||
name = "sqlite/main"
|
||||
name = "m_sqlite"
|
||||
|
||||
/* The database name, it will be created if it does not exist. */
|
||||
database = "anope.db"
|
||||
/* 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_regex_pcre
|
||||
* webcpanel
|
||||
*
|
||||
* Provides the regex engine regex/pcre, which uses the Perl Compatible Regular Expressions library.
|
||||
*/
|
||||
module { name = "m_regex_pcre" }
|
||||
|
||||
/*
|
||||
* m_regex_posix
|
||||
* This module creates a web configuration panel that allows users and operators to perform any task
|
||||
* as they could over IRC. If you are using the default configuration you should be able to access
|
||||
* this panel by visiting http://127.0.0.1:8080 in your web browser from the machine Anope is running on.
|
||||
*
|
||||
* Provides the regex engine regex/posix, which uses the POSIX compliant regular expressions.
|
||||
* This is likely the only regex module you will not need extra libraries for.
|
||||
* This module requires m_httpd.
|
||||
*/
|
||||
#module { name = "m_regex_posix" }
|
||||
|
||||
/*
|
||||
* m_regex_tre
|
||||
*
|
||||
* Provides the regex engine regex/tre, which uses the TRE regex library.
|
||||
*/
|
||||
#module { name = "m_regex_tre" }
|
||||
|
||||
/*
|
||||
* m_rewrite
|
||||
*
|
||||
* Allows rewriting commands sent to/from clients.
|
||||
*/
|
||||
module { name = "m_rewrite" }
|
||||
#command
|
||||
#{
|
||||
# service = "ChanServ"; name = "CLEAR"; command = "rewrite"
|
||||
#
|
||||
# /* Enable m_rewrite. */
|
||||
# rewrite = true
|
||||
#
|
||||
# /* Source message to match. A $ can be used to match anything. */
|
||||
# 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.
|
||||
# */
|
||||
# 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).
|
||||
*/
|
||||
#module { name = "m_ssl" }
|
||||
ssl
|
||||
#module
|
||||
{
|
||||
/*
|
||||
* An optional certificate and key for m_ssl to give to the uplink.
|
||||
*
|
||||
* You can generate your own certificate and key pair by using:
|
||||
*
|
||||
* openssl genrsa -out anope.key 2048
|
||||
* openssl req -new -x509 -key anope.key -out anope.crt -days 1095
|
||||
*/
|
||||
cert = "data/anope.crt"
|
||||
key = "data/anope.key"
|
||||
name = "webcpanel"
|
||||
|
||||
/* Web server to use. */
|
||||
server = "httpd/main";
|
||||
|
||||
/* Template to use. */
|
||||
template = "default";
|
||||
|
||||
/* Page title. */
|
||||
title = "Anope IRC Services";
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -562,9 +736,10 @@ ssl
|
||||
* 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
|
||||
{
|
||||
name = "m_xmlrpc"
|
||||
|
||||
/* Web service to use. Requires m_httpd. */
|
||||
server = "httpd/main"
|
||||
}
|
||||
@@ -576,28 +751,3 @@ m_xmlrpc
|
||||
* Requires m_xmlrpc.
|
||||
*/
|
||||
#module { name = "m_xmlrpc_main" }
|
||||
|
||||
/*
|
||||
* webcpanel
|
||||
*
|
||||
* This module creates a web configuration panel that allows users and operators to perform any task
|
||||
* as they could over IRC. If you are using the default configuration you should be able to access
|
||||
* this panel by visiting http://127.0.0.1:8080 in your web browser from the machine Anope is running on.
|
||||
*
|
||||
* This module requires m_httpd.
|
||||
*/
|
||||
#module { name = "webcpanel" }
|
||||
webcpanel
|
||||
{
|
||||
/* Web server to use. */
|
||||
server = "httpd/main";
|
||||
|
||||
/* Template to use. */
|
||||
template = "default";
|
||||
|
||||
/* Page title. */
|
||||
title = "Anope IRC Services";
|
||||
|
||||
/* Whether or not to use https on redirecting URLs. */
|
||||
ssl = no
|
||||
}
|
||||
|
||||
+240
-191
@@ -4,12 +4,12 @@
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
* Note that an easy way to rename this service is to define{} the client name to something else.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the NickServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the nickserv module too.
|
||||
*/
|
||||
nick = "NickServ"
|
||||
|
||||
@@ -56,38 +56,28 @@ 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 use an unregistered nick.
|
||||
*
|
||||
@@ -101,40 +91,27 @@ 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
|
||||
* - 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
|
||||
* - 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
|
||||
* - memo_mail: Notify user if they have a new memo by mail
|
||||
* - 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, memo_signon, and
|
||||
* 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 memo_signon memo_receive 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.
|
||||
*
|
||||
* Removing .UTF-8 will instead use the default encoding for the language, eg. iso-8859-1 for western European languages.
|
||||
*/
|
||||
languages = "ca_ES.UTF-8 de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 hu_HU.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ru_RU.UTF-8 tr_TR.UTF-8"
|
||||
|
||||
/*
|
||||
* Default language that non- and newly-registered nicks will receive messages in.
|
||||
* Leave empty to default to English.
|
||||
*/
|
||||
#defaultlanguage = "es_ES.UTF-8"
|
||||
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
|
||||
@@ -142,13 +119,6 @@ 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's registration expires.
|
||||
*
|
||||
@@ -157,87 +127,13 @@ nickserv
|
||||
expire = 21d
|
||||
|
||||
/*
|
||||
* The length of time before a suspended nick becomes unsuspended.
|
||||
*
|
||||
* This directive is optional. If not set, the default is 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.
|
||||
*/
|
||||
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.
|
||||
@@ -247,17 +143,17 @@ 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
|
||||
@@ -267,32 +163,53 @@ nickserv
|
||||
kill = 60s
|
||||
|
||||
/*
|
||||
* If set, Services will set these user modes on any user who identifies.
|
||||
* 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.
|
||||
*/
|
||||
#modesonid = "+R"
|
||||
#restrictopernicks = yes
|
||||
|
||||
/*
|
||||
* 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.
|
||||
* The username, and possibly hostname, used for fake users created when Services needs to
|
||||
* hold a nickname.
|
||||
*/
|
||||
enforceruser = "enforcer"
|
||||
enforcerhost = "services.host"
|
||||
|
||||
/*
|
||||
* The length of time Services hold nicknames.
|
||||
*
|
||||
* This directive is opional.
|
||||
* This directive is optional, but recommended. If not set it defaults to 1 minute.
|
||||
*/
|
||||
restoreonrecover = yes
|
||||
releasetimeout = 1m
|
||||
|
||||
/*
|
||||
* Some IRCds allow "SASL" authentication to let users identify to Services
|
||||
* during the IRCd user registration process. If set, Services will allow
|
||||
* authenticating users through this mechanism.
|
||||
* 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.
|
||||
* Make sure this is a valid nick and Nicklen+7 is not longer than the allowed Nicklen on your ircd.
|
||||
*
|
||||
* This directive is optional. If not set it defaults to "Guest"
|
||||
*/
|
||||
sasl = yes
|
||||
guestnickprefix = "Guest"
|
||||
|
||||
/*
|
||||
* If set, Services will not show netsplits in the last quit message field
|
||||
* of NickServ's INFO command.
|
||||
* If set, Services do not allow ownership of nick names, only ownership of accounts.
|
||||
*/
|
||||
hidenetsplitquit = no
|
||||
nonicknameownership = no
|
||||
|
||||
/*
|
||||
* The maximum length of passwords
|
||||
*
|
||||
* This directive is optional. If not set it defaults to 32.
|
||||
*/
|
||||
passlen = 32
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -314,7 +231,7 @@ nickserv
|
||||
command_group
|
||||
{
|
||||
name = "nickserv/admin"
|
||||
description = "Services Operator commands"
|
||||
description = _("Services Operator commands")
|
||||
}
|
||||
|
||||
/* Give it a help command. */
|
||||
@@ -327,7 +244,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.
|
||||
* If not set, the default is 32. This number cannot be set to 0.
|
||||
*/
|
||||
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"; }
|
||||
|
||||
/*
|
||||
@@ -337,7 +271,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"; }
|
||||
|
||||
/*
|
||||
@@ -357,7 +299,16 @@ 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"
|
||||
|
||||
/*
|
||||
* The maximum number of entries allowed on a nickname's certificate fingerprint list.
|
||||
* The default is 5. This number cannot be set to 0.
|
||||
*/
|
||||
max = 5
|
||||
}
|
||||
command { service = "NickServ"; name = "CERT"; command = "nickserv/cert"; }
|
||||
|
||||
/*
|
||||
@@ -399,7 +350,26 @@ command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"
|
||||
*
|
||||
* 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 changes. This is recommended to
|
||||
* prevent users from accidentally dropping their nicks, as it forces users to explicitly
|
||||
* drop their nicks before adding it to another group.
|
||||
*
|
||||
* 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"; }
|
||||
@@ -418,22 +388,40 @@ 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"; command = "nickserv/admin"; }
|
||||
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"; }
|
||||
|
||||
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
|
||||
@@ -452,9 +440,20 @@ command { service = "NickServ"; name = "LOGOUT"; command = "nickserv/logout"; }
|
||||
*
|
||||
* 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, recover, and release.
|
||||
# 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"; }
|
||||
|
||||
@@ -465,7 +464,38 @@ 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"; }
|
||||
@@ -488,57 +518,58 @@ command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpas
|
||||
* 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/greet, nickserv/saset/greet - Used for changing a users greet message, which is displayed when they enter channels.
|
||||
* nicksrev/set/hide, nickserv/saset/hide - Used for configuring which options are publically shown in nickserv/info for users account.
|
||||
* 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 greet password.
|
||||
* nickserv/set/private, nickserv/saset/private - Used for configuring whether or a users account shows up in nickserv/list.
|
||||
* 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.
|
||||
*
|
||||
* This is a dummy command to provide a help wrapper for the various SET and SASET commands.
|
||||
*/
|
||||
module { name = "ns_set" }
|
||||
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"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET AUTOOP"; command = "nickserv/set/autoop"; }
|
||||
command { service = "NickServ"; name = "SASET AUTOOP"; command = "nickserv/saset/autoop"; permission = "nickserv/saset/autoop"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET AUTOOP"; command = "nickserv/saset/autoop"; permission = "nickserv/saset/autoop"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET DISPLAY"; command = "nickserv/set/display"; }
|
||||
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET EMAIL"; command = "nickserv/set/email"; }
|
||||
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet"; }
|
||||
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet"; group = "nickserv/admin"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET HIDE"; command = "nickserv/set/hide"; }
|
||||
command { service = "NickServ"; name = "SASET HIDE"; command = "nickserv/saset/hide"; permission = "nickserv/saset/hide"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SET KEEPMODES"; command = "nickserv/set/keepmodes"; }
|
||||
command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/saset/keepmodes"; permission = "nickserv/saset/keepmodes"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/kill"; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/kill"; permission = "nickserv/saset/kill"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/kill"; permission = "nickserv/saset/kill"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET LANGUAGE"; command = "nickserv/set/language"; }
|
||||
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET MESSAGE"; command = "nickserv/set/message"; }
|
||||
command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET PASSWORD"; command = "nickserv/set/password"; }
|
||||
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password"; 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"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET SECURE"; command = "nickserv/set/secure"; }
|
||||
command { service = "NickServ"; name = "SASET SECURE"; command = "nickserv/saset/secure"; permission = "nickserv/saset/secure"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SASET SECURE"; command = "nickserv/saset/secure"; permission = "nickserv/saset/secure"; }
|
||||
|
||||
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire"; }
|
||||
|
||||
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire"; group = "nickserv/admin"; }
|
||||
|
||||
/*
|
||||
* ns_set_misc
|
||||
@@ -575,7 +606,24 @@ command { service = "NickServ"; name = "STATUS"; command = "nickserv/status"; }
|
||||
*
|
||||
* Used to suspend and unsuspend nicknames. Suspended nicknames can not be used but their settings are preserved.
|
||||
*/
|
||||
module { name = "ns_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
|
||||
|
||||
/*
|
||||
* Settings to show to non-opers in NickServ's INFO output.
|
||||
* Comment to completely disable showing any information about
|
||||
* suspended nicknames to non-opers.
|
||||
*/
|
||||
show = "suspended, by, reason, on, expires"
|
||||
}
|
||||
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"; }
|
||||
|
||||
@@ -600,13 +648,14 @@ command { service = "NickServ"; name = "UPDATE"; command = "nickserv/update"; }
|
||||
* Limits how many times the same email address may be used in Anope
|
||||
* to register accounts.
|
||||
*/
|
||||
module { name = "ns_maxemail" }
|
||||
ns_maxemail
|
||||
#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
|
||||
maxemails = 1
|
||||
}
|
||||
|
||||
+140
-116
@@ -4,12 +4,12 @@
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
* Note that an easy way to rename this service is to define{} the client name to something else.
|
||||
*/
|
||||
service
|
||||
{
|
||||
/*
|
||||
* The name of the OperServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the operserv module too.
|
||||
*/
|
||||
nick = "OperServ"
|
||||
|
||||
@@ -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,
|
||||
@@ -98,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.
|
||||
@@ -108,87 +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 IP %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
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
session_ipv4_cidr = 32
|
||||
session_ipv6_cidr = 128
|
||||
killonsqline = yes
|
||||
|
||||
/*
|
||||
* Adds the nickname of the IRC Operator issuing an AKILL to the kill reason.
|
||||
@@ -204,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.
|
||||
*/
|
||||
@@ -254,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
|
||||
@@ -338,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,
|
||||
@@ -352,6 +260,7 @@ defcon
|
||||
*/
|
||||
#akillreason = "This network is currently not accepting connections, please try again later."
|
||||
}
|
||||
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; }
|
||||
|
||||
/*
|
||||
* os_dns
|
||||
@@ -384,10 +293,10 @@ defcon
|
||||
*
|
||||
* Finally set a NS record for irc.example.com. to BIND or services.
|
||||
*/
|
||||
#module { name = "os_dns" }
|
||||
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }
|
||||
os_dns
|
||||
#module
|
||||
{
|
||||
name = "os_dns"
|
||||
|
||||
/* TTL for records. This should be very low if your records change often. */
|
||||
ttl = 1m
|
||||
|
||||
@@ -412,6 +321,7 @@ os_dns
|
||||
*/
|
||||
readd_connected_servers = no
|
||||
}
|
||||
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }
|
||||
|
||||
/*
|
||||
* os_config
|
||||
@@ -443,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
|
||||
*
|
||||
@@ -502,15 +422,16 @@ command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout"; }
|
||||
*
|
||||
* Used to search services log files.
|
||||
*/
|
||||
module { name = "os_logsearch" }
|
||||
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch"; }
|
||||
logsearch
|
||||
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.
|
||||
*/
|
||||
name = "services.log"
|
||||
logname = "services.log"
|
||||
}
|
||||
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch"; }
|
||||
|
||||
/*
|
||||
* os_mode
|
||||
@@ -553,7 +474,24 @@ 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 not 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"; }
|
||||
@@ -604,9 +542,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 its session limit, all clients attempting
|
||||
* to connect from that host will be killed.
|
||||
*
|
||||
* This directive is required if os_session is loaded.
|
||||
*/
|
||||
defaultsessionlimit = 3
|
||||
|
||||
/*
|
||||
* The maximum session limit that may be set for a host in an exception.
|
||||
*
|
||||
* This directive is required if os_session is loaded.
|
||||
*/
|
||||
maxsessionlimit = 100
|
||||
|
||||
/*
|
||||
* Sets the default expiry time for session exceptions.
|
||||
*
|
||||
* This directive is required 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"; }
|
||||
|
||||
@@ -617,7 +630,18 @@ 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"; }
|
||||
|
||||
/*
|
||||
@@ -659,7 +683,7 @@ command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart";
|
||||
*
|
||||
* 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"; }
|
||||
|
||||
@@ -0,0 +1,513 @@
|
||||
/*
|
||||
* Example configuration file for Services. After making the appropriate
|
||||
* changes to this file, place it in the Services conf directory (as
|
||||
* specified in the "configure" script, default /home/username/services/conf)
|
||||
* under the name "services.conf".
|
||||
*
|
||||
* The format of this file is fairly simple: three types of comments are supported:
|
||||
* - All text after a '#' on a line is ignored, as in shell scripting
|
||||
* - All text after '//' on a line is ignored, as in C++
|
||||
* - A block of text like this one is ignored, as in C
|
||||
*
|
||||
* Outside of comments, there are three structures: blocks, keys, and values.
|
||||
*
|
||||
* A block is a named container, which contains a number of key to value pairs
|
||||
* - you may think of this as an array.
|
||||
*
|
||||
* A block is created like so:
|
||||
* foobar
|
||||
* {
|
||||
* moo = "cow"
|
||||
* foo = bar
|
||||
* }
|
||||
*
|
||||
* Note that nameless blocks are allowed and are often used with comments to allow
|
||||
* easily commenting an entire block, for example:
|
||||
* #foobar
|
||||
* {
|
||||
* moo = "cow"
|
||||
* foo = bar
|
||||
* }
|
||||
* is an entirely commented block.
|
||||
*
|
||||
* Keys are case insensitive. Values depend on what key - generally, information is
|
||||
* given in the key comment. The quoting of values (and most other syntax) is quite
|
||||
* flexible, however, please do not forget to quote your strings:
|
||||
*
|
||||
* "This is a parameter string with spaces in it"
|
||||
*
|
||||
* If you need to include a double quote inside a quoted string, precede it
|
||||
* by a backslash:
|
||||
*
|
||||
* "This string has \"double quotes\" in it"
|
||||
*
|
||||
* Time parameters can be specified either as an integer representing a
|
||||
* number of seconds (e.g. "3600" = 1 hour), or as an integer with a unit
|
||||
* specifier: "s" = seconds, "m" = minutes, "h" = hours, "d" = days.
|
||||
* Combinations (such as "1h30m") are not permitted. Examples (all of which
|
||||
* represent the same length of time, one day):
|
||||
*
|
||||
* "86400", "86400s", "1440m", "24h", "1d"
|
||||
*
|
||||
* In the documentation for each directive, one of the following will be
|
||||
* included to indicate whether an option is required:
|
||||
*
|
||||
* [REQUIRED]
|
||||
* Indicates a directive which must be given. Without it, Services will
|
||||
* not start.
|
||||
*
|
||||
* [RECOMMENDED]
|
||||
* Indicates a directive which may be omitted, but omitting it may cause
|
||||
* undesirable side effects.
|
||||
*
|
||||
* [OPTIONAL]
|
||||
* Indicates a directive which is optional. If not given, the feature
|
||||
* will typically be disabled. If this is not the case, more
|
||||
* information will be given in the documentation.
|
||||
*
|
||||
* [DISCOURAGED]
|
||||
* Indicates a directive which may cause undesirable side effects if
|
||||
* specified.
|
||||
*
|
||||
* [DEPRECATED]
|
||||
* Indicates a directive which will disappear in a future version of
|
||||
* Services, usually because its functionality has been either
|
||||
* superseded by that of other directives or incorporated into the main
|
||||
* program.
|
||||
*/
|
||||
|
||||
/*
|
||||
* [OPTIONAL] Defines
|
||||
*
|
||||
* You can define values to other values, which can be used to easily change
|
||||
* many values in the configuration. at once.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The services.host define is used in multiple different locations throughout the
|
||||
* configuration for services clients hostnames.
|
||||
*/
|
||||
define
|
||||
{
|
||||
name = "services.host"
|
||||
value = "services.localhost.net"
|
||||
}
|
||||
|
||||
/*
|
||||
* [OPTIONAL] Additional Includes
|
||||
*
|
||||
* You can include additional configuration files here.
|
||||
* You may also include executable files, which will be executed and
|
||||
* the output from it will be included into your configuration.
|
||||
*/
|
||||
|
||||
#include
|
||||
{
|
||||
type = "file"
|
||||
name = "some.conf"
|
||||
}
|
||||
|
||||
#include
|
||||
{
|
||||
type = "executable"
|
||||
name = "/usr/bin/wget -q -O - http://some.misconfigured.network.com/services.conf"
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] IRCd Config
|
||||
*
|
||||
* This section is used to set up Anope to connect to your IRC network.
|
||||
* This section can be included multiple times, and Anope will attempt to
|
||||
* connect to each server until it finally connects.
|
||||
*
|
||||
* Each uplink IRCd should have a corresponding configuration to allow Services
|
||||
* to link to it.
|
||||
*
|
||||
* An example configuration for InspIRCd that is compatible with the below uplink
|
||||
* and serverinfo configuration would look like:
|
||||
*
|
||||
* <link name="services.localhost.net"
|
||||
* ipaddr="127.0.0.1"
|
||||
* port="7000"
|
||||
* sendpass="mypassword"
|
||||
* recvpass="mypassword">
|
||||
* <uline server="services.localhost.net" silent="yes">
|
||||
* <bind address="127.0.0.1" port="7000" type="servers">
|
||||
*
|
||||
* An example configuration for UnrealIRCd that is compatible with the below uplink
|
||||
* and serverinfo configuration would look like:
|
||||
*
|
||||
* link services.localhost.net
|
||||
* {
|
||||
* username *;
|
||||
* hostname *;
|
||||
* bind-ip "127.0.0.1";
|
||||
* port 7000;
|
||||
* hub *;
|
||||
* password-connect "mypassword";
|
||||
* password-receive "mypassword";
|
||||
* class servers;
|
||||
* };
|
||||
* ulines { services.localhost.net; };
|
||||
* listen 127.0.0.1:7000;
|
||||
*/
|
||||
uplink
|
||||
{
|
||||
/*
|
||||
* The IP or hostname of the IRC server you wish to connect Services to.
|
||||
* Usually, you will want to connect Services over 127.0.0.1 (aka localhost).
|
||||
*
|
||||
* NOTE: On some shell providers, this will not be an option.
|
||||
*/
|
||||
host = "127.0.0.1"
|
||||
|
||||
/*
|
||||
* Enable if Services should connect using IPv6.
|
||||
*/
|
||||
ipv6 = no
|
||||
|
||||
/*
|
||||
* Enable if Services should connect using SSL.
|
||||
* You must have an SSL module loaded for this to work.
|
||||
*/
|
||||
ssl = no
|
||||
|
||||
/*
|
||||
* The port to connect to.
|
||||
* The IRCd *MUST* be configured to listen on this port, and to accept
|
||||
* server connections.
|
||||
*
|
||||
* Refer to your IRCd documentation for how this is to be done.
|
||||
*/
|
||||
port = 7000
|
||||
|
||||
/*
|
||||
* The password to send to the IRC server for authentication.
|
||||
* This must match the link block on your IRCd.
|
||||
*
|
||||
* Refer to your IRCd documentation for more information on link blocks.
|
||||
*/
|
||||
password = "mypassword"
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] Server Information
|
||||
*
|
||||
* This section contains information about the Services server.
|
||||
*/
|
||||
serverinfo
|
||||
{
|
||||
/*
|
||||
* The hostname that Services will be seen as, it must have no conflicts with any
|
||||
* other server names on the rest of your IRC network. Note that it does not have
|
||||
* to be an existing hostname, just one that isn't on your network already.
|
||||
*/
|
||||
name = "stats.localhost.net"
|
||||
|
||||
/*
|
||||
* The text which should appear as the server's information in /whois and similar
|
||||
* queries.
|
||||
*/
|
||||
description = "Stats for IRC Networks"
|
||||
|
||||
/*
|
||||
* The local address that Services will bind to before connecting to the remote
|
||||
* server. This may be useful for multihomed hosts. If omitted, Services will let
|
||||
* the Operating System choose the local address. This directive is optional.
|
||||
*
|
||||
* If you don't know what this means or don't need to use it, just leave this
|
||||
* directive commented out.
|
||||
*/
|
||||
#localhost = "nowhere."
|
||||
|
||||
/*
|
||||
* What Server ID to use for this connection?
|
||||
* Note: This should *ONLY* be used for TS6/P10 IRCds. Refer to your IRCd documentation
|
||||
* to see if this is needed.
|
||||
*/
|
||||
#id = "00A"
|
||||
|
||||
/*
|
||||
* The filename containing the Services process ID. The path is relative to the
|
||||
* services root directory.
|
||||
*/
|
||||
pid = "data/services.pid"
|
||||
|
||||
/*
|
||||
* The filename containing the Message of the Day. The path is relative to the
|
||||
* services root directory.
|
||||
*/
|
||||
motd = "conf/services.motd"
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] Protocol module
|
||||
*
|
||||
* This directive tells Anope which IRCd Protocol to speak when connecting.
|
||||
* You MUST modify this to match the IRCd you run.
|
||||
*
|
||||
* Supported:
|
||||
* - bahamut
|
||||
* - charybdis
|
||||
* - hybrid
|
||||
* - inspircd12
|
||||
* - inspircd20
|
||||
* - ngircd
|
||||
* - plexus
|
||||
* - ratbox
|
||||
* - unreal
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "inspircd20"
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] Network Information
|
||||
*
|
||||
* This section contains information about the IRC network that Services will be
|
||||
* connecting to.
|
||||
*/
|
||||
networkinfo
|
||||
{
|
||||
/*
|
||||
* This is the name of the network that Services will be running on.
|
||||
*/
|
||||
networkname = "LocalNet"
|
||||
|
||||
/*
|
||||
* Set this to the maximum allowed nick length on your network.
|
||||
* Be sure to set this correctly, as setting this wrong can result in
|
||||
* Services being disconnected from the network.
|
||||
*/
|
||||
nicklen = 31
|
||||
|
||||
/* Set this to the maximum allowed ident length on your network.
|
||||
* Be sure to set this correctly, as setting this wrong can result in
|
||||
* Services being disconnected from the network.
|
||||
*/
|
||||
userlen = 10
|
||||
|
||||
/* Set this to the maximum allowed hostname length on your network.
|
||||
* Be sure to set this correctly, as setting this wrong can result in
|
||||
* Services being disconnected from the network.
|
||||
*/
|
||||
hostlen = 64
|
||||
|
||||
/* Set this to the maximum allowed channel length on your network.
|
||||
*/
|
||||
chanlen = 32
|
||||
|
||||
/* The maximum number of list modes settable on a channel (such as b, e, I).
|
||||
* Comment out or set to 0 to disable.
|
||||
*/
|
||||
modelistsize = 100
|
||||
|
||||
/*
|
||||
* The characters allowed in hostnames. This is used for validating hostnames given
|
||||
* to services, such as BotServ bot hostnames and user vhosts. 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.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
*/
|
||||
vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-"
|
||||
|
||||
/*
|
||||
* If set to true, 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 = ".-"
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] Services Options
|
||||
*
|
||||
* This section contains various options which determine how Services will operate.
|
||||
*/
|
||||
options
|
||||
{
|
||||
/*
|
||||
* On Linux/UNIX systems Anope can setuid and setgid to this user and group
|
||||
* after starting up. This is useful if Anope has to bind to privileged ports
|
||||
*/
|
||||
#user = "anope"
|
||||
#group = "anope"
|
||||
|
||||
/*
|
||||
* The case mapping used by services. This must be set to a valid locale name
|
||||
* installed on your machine. Services use this case map to compare, with
|
||||
* case insensitivity, things such as nick names, channel names, etc.
|
||||
*
|
||||
* We provide two special casemaps shipped with Anope, ascii and rfc1459.
|
||||
*
|
||||
* This value should be set to what your IRCd uses, which is probably rfc1459,
|
||||
* however Anope has always used ascii for comparison, so the default is ascii.
|
||||
*
|
||||
* Changing this value once set is not recommended.
|
||||
*/
|
||||
casemap = "ascii"
|
||||
|
||||
/*
|
||||
* Sets the timeout period for reading from the uplink.
|
||||
*/
|
||||
readtimeout = 5s
|
||||
|
||||
/*
|
||||
* Sets the interval between sending warning messages for program errors via
|
||||
* WALLOPS/GLOBOPS.
|
||||
*/
|
||||
warningtimeout = 4h
|
||||
|
||||
/*
|
||||
* If set, Services will only show /stats o to IRC Operators. This directive
|
||||
* is optional.
|
||||
*/
|
||||
#hidestatso = yes
|
||||
|
||||
/*
|
||||
* A space-separated list of ulined servers on your network, it is assumed that
|
||||
* the servers in this list are allowed to set channel modes and Services will
|
||||
* not attempt to reverse their mode changes.
|
||||
*
|
||||
* WARNING: Do NOT put your normal IRC user servers in this directive.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#ulineservers = "services.your.network"
|
||||
|
||||
/*
|
||||
* How long to wait between connection retries with the uplink(s).
|
||||
*/
|
||||
retrywait = 60s
|
||||
}
|
||||
|
||||
/*
|
||||
* [RECOMMENDED] Logging Configuration
|
||||
*
|
||||
* This section is used for configuring what is logged and where it is logged to.
|
||||
* You may have multiple log blocks if you wish. Remember to properly secure any
|
||||
* channels you choose to have Anope log to!
|
||||
*/
|
||||
log
|
||||
{
|
||||
/*
|
||||
* Target(s) to log to, which may be one of the following:
|
||||
* - a channel name
|
||||
* - a filename
|
||||
* - globops
|
||||
*/
|
||||
target = "stats.log"
|
||||
|
||||
/* Log to both services.log and the channel #services
|
||||
*
|
||||
* Note that some older IRCds, such as Ratbox, require services to be in the
|
||||
* log channel to be able to message it. To do this, configure service:channels to
|
||||
* join your logging channel.
|
||||
*/
|
||||
#target = "stats.log #services"
|
||||
|
||||
/*
|
||||
* The source(s) to only accept log messages from. Leave commented to allow all sources.
|
||||
* This can be a users name, a channel name, one of our clients (eg, OperServ), or a server name.
|
||||
*/
|
||||
#source = ""
|
||||
|
||||
/*
|
||||
* The bot used to log generic messages which have no predefined sender if there
|
||||
* is a channel in the target directive.
|
||||
*/
|
||||
bot = "Global"
|
||||
|
||||
/*
|
||||
* The number of days to keep logfiles, only useful if you are logging to a file.
|
||||
* Set to 0 to never delete old logfiles.
|
||||
*
|
||||
* Note that Anope must run 24 hours a day for this feature to work correctly.
|
||||
*/
|
||||
logage = 7
|
||||
|
||||
/*
|
||||
* What types of log messages should be logged by this block. There are nine general categories:
|
||||
*
|
||||
* servers - Server actions, linking, squitting, etc.
|
||||
* channels - Actions in channels such as joins, parts, kicks, etc.
|
||||
* users - User actions such as connecting, disconnecting, changing name, etc.
|
||||
* other - All other messages without a category.
|
||||
* rawio - Logs raw input and output from services
|
||||
* debug - Debug messages (log files can become VERY large from this).
|
||||
*
|
||||
* These options determine what messages from the categories should be logged. Wildcards are accepted, and
|
||||
* you can also negate values with a ~. For example, "~operserv/akill operserv/*" would log all operserv
|
||||
* messages except for operserv/akill. Note that processing stops at the first matching option, which
|
||||
* means "* ~operserv/*" would log everything because * matches everything.
|
||||
*
|
||||
* Valid server options are:
|
||||
* connect, quit, sync, squit
|
||||
*
|
||||
* Valid channel options are:
|
||||
* create, destroy, join, part, kick, leave, mode
|
||||
*
|
||||
* Valid user options are:
|
||||
* connect, disconnect, quit, nick, ident, host, mode, maxusers, oper
|
||||
*
|
||||
* Rawio and debug are simple yes/no answers, there are no types for them.
|
||||
*
|
||||
* Note that modules may add their own values to these options.
|
||||
*/
|
||||
servers = "*"
|
||||
#channels = "~mode *"
|
||||
users = "connect disconnect nick"
|
||||
other = "*"
|
||||
rawio = no
|
||||
debug = no
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] MySQL Database configuration.
|
||||
*
|
||||
* m_mysql
|
||||
*
|
||||
* This module allows other modules to use MySQL.
|
||||
*/
|
||||
module
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* IRC2SQL Gateway
|
||||
* This module collects data about users, channels and servers. It doesn't build stats
|
||||
* itself, however, it gives you the database, it's up to you how you use it.
|
||||
*
|
||||
* Requires a MySQL Database and MySQL version 5.5 or higher
|
||||
*/
|
||||
include
|
||||
{
|
||||
type = "file"
|
||||
name = "irc2sql.example.conf"
|
||||
}
|
||||
|
||||
-3822
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
git log --pretty=format:"Revision %h - %cD - %s" > version.log
|
||||
@@ -1,3 +1,33 @@
|
||||
Anope Version 2.0.1
|
||||
-------------------
|
||||
Fix access entries on accounts sometimes not updating when a user's display name changes
|
||||
Fix ns_group to properly validate the account of the user against the target
|
||||
Fix os_stats not saving max user count and time when using SQL
|
||||
Fix nickalias's 'nc' field sometimes not being updated when using SQL
|
||||
Fix several crashes on Windows related to being unable to load modules
|
||||
Fix bs_bot change not properly reintroducing bots after changing their ident, host, or realname
|
||||
|
||||
Add English language file to allow users to easily modify language strings
|
||||
Add configuring which mode cs_ban sets, and added a MUTE command to BotServ's fantasy
|
||||
Allow SVSPART to take an optional reason
|
||||
Allow cs_list to search channel topics and descriptions
|
||||
|
||||
Anope Version 2.0.0
|
||||
-------------------
|
||||
Added irc2sql stats module
|
||||
|
||||
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
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
Anope Version 2.0.1
|
||||
-------------------
|
||||
Add MUTE command to BotServ fantasy configuration
|
||||
Document memo_mail option in nickserv.conf
|
||||
Add 'show' setting to ns_info and cs_info to control which fields are shown to non opers
|
||||
|
||||
Anope Version 2.0.0
|
||||
-------------------
|
||||
options:passlen, enforceruser, enforcerhost, releasetimeout, and guestnickprefix moved to nickserv's module configuration
|
||||
options:hideregisteredcommands added
|
||||
m_ssl renamed to m_ssl_openssl
|
||||
mail:restrict removed
|
||||
|
||||
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
|
||||
|
||||
+14
-21
@@ -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.
|
||||
|
||||
|
||||
+19
-71
@@ -44,6 +44,10 @@ Note: You should also read the README and FAQ files!
|
||||
Next, unpack the package in your home directory, and go into the created
|
||||
directory.
|
||||
|
||||
If there are any extra modules you want to enable, such as m_mysql, run
|
||||
the 'extras' script to enable them. If you do not know you can come back
|
||||
later and enable them.
|
||||
|
||||
Now type ./Config to start the configuration script. It will ask you a
|
||||
few questions, and figure out how to compile Anope on your system. If
|
||||
you are unsure about the answer to a question, use the default value.
|
||||
@@ -63,32 +67,20 @@ Note: You should also read the README and FAQ files!
|
||||
cause trouble on your network if passwords are not encrypted, or read
|
||||
the memos of any user.
|
||||
|
||||
If you see errors during this process, please mail us with the *complete*
|
||||
error output, and don't forget to mention your OS, compiler and C++ library
|
||||
versions.
|
||||
|
||||
Now go into the data directory (by default, ~/services/data). Copy the example
|
||||
Now go into the conf directory (by default, ~/services/conf). Copy the example
|
||||
configuration file (example.conf) to services.conf, and open the latter
|
||||
with your favorite text editor. It contains all the configuration
|
||||
directives Anope will use at startup. Read the instructions contained in
|
||||
the file carefully. Using the default values is NOT a good idea, and will
|
||||
most likely not work!
|
||||
|
||||
If you need help, you should subscribe to the Anope mailing list and mail
|
||||
there to get help from other users. See the README file for more
|
||||
information.
|
||||
If you need help, you should visit http://forum.anope.org/ or #anope on
|
||||
irc.anope.org. Provide *complete* error output, along with other relevant
|
||||
information eg. OS, compiler and C++ library versions.
|
||||
See the README file for more information.
|
||||
|
||||
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 +91,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
|
||||
|
||||
@@ -183,7 +131,7 @@ Note: You should also read the README and FAQ files!
|
||||
still running, and restart it if not.
|
||||
|
||||
First rename the example.chk script that is in Anope path (by default,
|
||||
this is ~/services/data) to services.chk and edit it. You'll need to
|
||||
this is ~/services/conf) to services.chk and edit it. You'll need to
|
||||
modify the CONFIGURATION part of the file. Then ensure that the file is
|
||||
marked as executable by typing chmod +x services.chk, and try to launch the
|
||||
script to see if it works (Anope must not be running when you do this ;))
|
||||
@@ -192,7 +140,7 @@ Note: You should also read the README and FAQ files!
|
||||
This will open the default text editor with the crontab file. Enter the
|
||||
following (with correct path):
|
||||
|
||||
*/5 * * * * /home/ircd/services/data/services.chk >/dev/null 2>&1
|
||||
*/5 * * * * /home/ircd/services/conf/services.chk >/dev/null 2>&1
|
||||
|
||||
The */5 at the beginning means "check every 5 minutes". You may replace
|
||||
the 5 with other another number if you want (but less than 60). Consult
|
||||
|
||||
+114
-165
@@ -1,209 +1,158 @@
|
||||
Installation et instructions d'anope
|
||||
Instructions d'installation d'Anope
|
||||
------------------------------------
|
||||
|
||||
1) Instalation d'anope
|
||||
2) Mise à jour d'anope
|
||||
3) Configuration de l'ircd
|
||||
4) Mise en route de anope
|
||||
5) Mise en place d'un fichier crontab
|
||||
1) Installation d'Anope
|
||||
2) Mettre à jour Anope
|
||||
3) Configuration de l'IRCd
|
||||
4) Mettre en route Anope
|
||||
5) Mettre en place un crontab
|
||||
|
||||
Note: Vous devrez également lire les fichiers README et FAQ !
|
||||
Note : Vous devrez également lire les fichiers README et FAQ !
|
||||
|
||||
1) Installation de anope
|
||||
1) Installation d'Anope
|
||||
|
||||
Note importante: il n'est pas recommandé d'utiliser (et même d'installer)
|
||||
Anope en tant que root.
|
||||
Utilisez un utilisateur non privilégié,
|
||||
NOTE IMPORTANTE : il n'est pas recommandé d'utiliser (et même d'installer)
|
||||
Anope en tant que root. Utilisez un utilisateur non
|
||||
privilégié. Celui que vous utilisez pour l'IRCd ou un
|
||||
utilisateur dédié suffira.
|
||||
|
||||
La première chose que vous devez faire est d'obtenir le package Anope (si ce
|
||||
n'est déjà fait). Vous pouvez le trouver ici :
|
||||
|
||||
La première chose que vous devez faire est d'obtenir le package Anope (si ce n'est déjà fait).
|
||||
http://www.anope.org/
|
||||
|
||||
Vous pouvez le trouver ici http://www.anope.org/
|
||||
Anope peut être installé de deux façons. La méthode recommandée est
|
||||
d'utiliser CMake. Vous pouvez vérifier si CMake est déjà installé
|
||||
sur votre système en utilisant la commande :
|
||||
|
||||
cmake --version
|
||||
|
||||
Si CMake est installé, vous aurez une ligne qui dit quelque chose similaire
|
||||
à "cmake version 2.6 cmake-patch 1". Si la version est inférieure à 2.4 ou
|
||||
si vous obtenez une erreur disant que la commande n'a pas été trouvée,
|
||||
vous ne serez pas en mesure d'utiliser CMake, sauf si vous l'installez
|
||||
vous-même dans votre répertoire home. CMake peut être téléchargé ici :
|
||||
|
||||
Anope peut être installer de deux façons.
|
||||
http://www.cmake.org/cmake/resources/software.html
|
||||
|
||||
1. La méthode recommandée est d'utiliser CMake.
|
||||
Vous pouvez vérifier si CMake est déjà installé sur votre système en utilisant la
|
||||
Si vous n'arrivez pas à l'installer (soit en raison du manque d'espace
|
||||
ou de restrictions par votre fournisseur d'hébergement), vous pouvez encore
|
||||
utiliser le script de configuration fourni. Cette option n'est pas
|
||||
recommandée et finira par être retirée, mais est fournie pour la
|
||||
compatibilité de ceux à qui il manque CMake.
|
||||
|
||||
commande: cmake --version ( sur votre vps ou dedier etre loggué en root )
|
||||
Ensuite, décompressez le package dans votre répertoire home, et allez dans
|
||||
le répértoire qui vient d'être créé.
|
||||
|
||||
Maintenant, tapez ./Config pour lancer le script de configuration. Il va
|
||||
vous poser quelques questions, et compiler Anope sur votre système. Si vous
|
||||
ne savez pas répondre à une question, utilisez la valeur par défaut. La
|
||||
question d'utiliser CMake ou configure dépend de la décision que vous avez
|
||||
prise précedemment. Si vous avez CMake et que vous souhaitez l'utiliser,
|
||||
répondez avec cmake, sinon répondez avec configure.
|
||||
|
||||
Si c'est installé, vous aurez une ligne qui dit quelque chose qui ressemble à
|
||||
Vous pouvez maintenant taper make pour compiler Anope. S'il y'a des erreurs
|
||||
dans le Makefile, *essayez d'utiliser* gmake à la place. Si cela ne
|
||||
fonctionne toujours pas, vous (ou votre administrateur système) devriez
|
||||
installer GNU make.
|
||||
Vous pouvez le trouver ici : ftp://prep.ai.mit.edu/pub/gnu/.
|
||||
|
||||
«version 2.6 cmake-patch 1".
|
||||
Maintenant, tapez make install (ou gmake install ; voir ci-dessus). Cela
|
||||
permet d'installer tous les fichiers nécessaires dans les chemins que vous
|
||||
avez spécifié au script configure, et de régler les permissions des fichiers.
|
||||
Vous devez vous assurer que le répertoire data n'est pas accessible par les
|
||||
autres utilisateurs, des utilisateurs malveillants pourraient causer des
|
||||
problèmes sur votre réseau, si les mots de passe ne sont pas chiffrés,
|
||||
ou lire les mémos de tout utilisateur.
|
||||
|
||||
Si la version est inférieure à 2,4 ou si vous obtenez une erreur disant que la commande n'a pas été trouvé,
|
||||
vous ne serez pas en mesure d'utiliser CMake,
|
||||
Si vous voyez des erreurs lors de ce processus, merci de nous envoyer un
|
||||
e-mail avec la sortie d'erreur *complète* et n'oubliez pas de mentionner
|
||||
les versions de votre système, compilateur et bibliothèque C++.
|
||||
|
||||
sauf si vous installez vous-même dans votre répertoire home. CMake
|
||||
vous pouvez le téléchargé ici > http://www.cmake.org/cmake/resources/software.html
|
||||
Allez maintenant dans le répertoire de données (par défaut, ~/services/data).
|
||||
Copiez l'exemple de fichier de configuration (example.conf) en services.conf
|
||||
et ouvrez ce dernier avec votre éditeur de texte favori. Il contient toute
|
||||
les directives de configuration. Anope va l'utiliser au démarrage.
|
||||
Lisez attentivement les instructions contenues dans le fichier.
|
||||
L'utilisation des valeurs par défaut n'est pas recommendé et Anope ne
|
||||
fonctionnera probablement pas.
|
||||
|
||||
Si vous avez besoin d'aide, abonnez-vous à la liste de diffusion Anope
|
||||
et envoyez-y vos e-mails pour obtenir de l'aide de la part des autres
|
||||
utilisateurs. Voir le fichier README pour plus d'informations.
|
||||
|
||||
Si vous n'arrivez pas à installer (soit en raison du manque d'espace
|
||||
ou de restrictions par votre fournisseur d'hébergement),
|
||||
vous pouvez encore utiliser le script de configuration fournis.
|
||||
Cette option n'est pas recommandée et finira par être retiré, mais il est fourni pour la compatibilité de ces
|
||||
manque de CMake.
|
||||
2) Mettre à jour Anope
|
||||
|
||||
Pour mettre à jour Anope, suivez simplement les instructions d'installation
|
||||
décrites dans la section 1. Il y a cependant une ligne de conduite
|
||||
spécifique :
|
||||
|
||||
* IMPORTANT : Sauvegardez vos anciennes bases de données !
|
||||
* Si vous mettez à jour vers une nouvelle version majeure, toujours
|
||||
redémarrer avec un fichier de configuration neuf depuis example.conf.
|
||||
|
||||
Ensuite, décompressez le package dans votre répertoire home, et allez dans le répértoire
|
||||
qui viens d'être crée.
|
||||
3) Configuration de l'IRCd
|
||||
|
||||
Maintenant, tapez ./Config pour lancer le script de configuration. Il va vous poser
|
||||
quelques questions, et compiler Anope sur votre système.
|
||||
Les Services agissent comme un serveur IRC avec des pseudo-clients.
|
||||
Pour les relier à votre réseau, vous aurez besoin de configurer votre IRCd
|
||||
pour permettre aux services de linker.
|
||||
|
||||
Si vous ne savez pas repondre à une question, utilisez la valeur par défaut.
|
||||
La configuration varie selon les IRCd, mais vous aurez probablement besoin
|
||||
d'un block link (aussi appelé connect block, ou C line), un U line (aussi
|
||||
appelé shared block) et assurez-vous que l'IRCd écoute sur le port donné
|
||||
dans le block link.
|
||||
|
||||
Des exemples de configurations de link peuvent être trouvés dans le fichier
|
||||
example.conf pour certains des IRCd les plus populaires.
|
||||
|
||||
Vous pouvez maintenant taper make pour compiler Anope. S'il ya des erreurs dans la
|
||||
Makefile, * essayez d'utiliser * gmake au lieu. Si cela ne fonctionne toujours pas, vous (ou
|
||||
votre fournisseur ) doit installer GNU make. Vous pouvez
|
||||
le Trouvez sur ftp://prep.ai.mit.edu/pub/gnu/.
|
||||
Souvenez-vous de /rehash votre IRCd pour appliquer les changements.
|
||||
|
||||
Maintenant, tapez make install (ou gmake install; voir ci-dessus). Cela permet d'installer
|
||||
tous les fichiers nécessaires dans les chemins que vous avez spécifié dans la configuration
|
||||
script, et les permissions du fichier de configuration. Vous devez vous assurer que les données
|
||||
répertoire ne sont pas accessible par d'autres utilisateurs, que des utilisateurs malveillants peuvent
|
||||
causer des problèmes sur votre réseau, si les mots de passe ne sont pas cryptés, ou de lire
|
||||
les mémos de tout utilisateur.
|
||||
|
||||
Si vous voyez des erreurs lors de ce processus, s'il vous plaît nous envoyer un mail avec le * complet *
|
||||
sortie d'erreur, et n'oubliez pas de mentionner votre OS, compilateur et bibliothèque C + +
|
||||
versions.
|
||||
|
||||
Maintenant, allez dans le répertoire de données (par défaut, cd ~/services/data). ouvrer exemple.conf
|
||||
avec votre éditeur de texte favori. Il contient toute la configuration
|
||||
directives. Anope va l'utiliser au démarrage. Lisez attentivement les instructions contenues dans
|
||||
le fichier. l'utilisation des valeurs par defauld n'est pas recomment et anope ne risque pas de fonctionner
|
||||
|
||||
|
||||
Si vous avez besoin d'aide, vous devez vous abonner à la mailing list et par courrier Anope
|
||||
pour se faire aider par d'autres utilisateurs. Voir le fichier README pour plus de
|
||||
informations.
|
||||
|
||||
2) Mise à jour Anope
|
||||
|
||||
Si vous avez un fichier .Diff et que vous voulez patcher les ancienne sources Anope avec,
|
||||
effectuer les opérations suivantes:
|
||||
|
||||
* Copiez le fichier .Diff dans le répertoire racine des sources Anope.
|
||||
* Type de patch-p1 <file.diff
|
||||
|
||||
Notez que la mise à jour anope avec un fichier patch n'est pas recommandé.
|
||||
Vous devez télécharger une nouvelle source propre, car cela vous donnera les meilleurs résultats..
|
||||
|
||||
Pour mettre à jour Anope, suivez simplement les instructions d'installation décrites dans
|
||||
l'article 1. Il y a cependant quelques règles spécifiques:
|
||||
|
||||
* IMPORTANT: Sauvegardez vos anciennes bases de données!
|
||||
* Si vous mettez à jour vers une nouvelle version majeure, toujours redémarrer avec un
|
||||
fichier de configuration neuve example.conf.
|
||||
|
||||
|
||||
|
||||
3) Mise en place du IRCd
|
||||
|
||||
Ce Services agit comme un serveur IRC avec des pseudo-clients sur elle. Pour les relier à
|
||||
votre réseau, vous aurez besoin d'ajouter quelques lignes dans le ircd.conf de leur plate-forme
|
||||
serveur (comme indiqué dans la directive de configuration RemoteServer).
|
||||
|
||||
Pour les échantillons ci-dessous, nous allons prendre services.localhost.net que le nom de la
|
||||
Services (comme indiqué dans la directive de configuration ServerName). Notez que
|
||||
présente des échantillons sont faites pour être aussi générique que possible, mais il pourrait y avoir
|
||||
de petites variations, en fonction de votre IRCd. Pour IRCd aide spécifique aux
|
||||
de configuration, lire près de la fin de cette section.
|
||||
|
||||
Tout d'abord, les lignes C / N, qui permettent aux services de crée un lien. Ils ont également besoin d'un
|
||||
Y: ligne fonctionne correctement.
|
||||
|
||||
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
|
||||
|
||||
"mot de pass" est le même mot de passe que vous avez mentionné dans le RemoteServer
|
||||
directive de configuration. 127.0.0.1 est l'adresse IP à partir de laquelle les services se connecterons
|
||||
à partir de (reliant en localhost est le moyen le plus efficace pour exécuter les services).
|
||||
|
||||
Ensuite, vous avez à mettre en place un U:ligne, qui permettra aux services de changer
|
||||
modes de canal, de sujets, et bien plus encore, sans être op sur le canal.
|
||||
|
||||
U: services.localhost.net: *: *
|
||||
|
||||
REMARQUE: si vous avez plus d'un serveur dans votre réseau, cette ligne doit
|
||||
être ajouté sur tous les autres serveurs, où cela ne risque pas de fonctionner correctement.
|
||||
|
||||
Enfin, vous aurez besoin d'ajouter un H:ligne, pour permttre la commande OperServ JUPE
|
||||
de fonctionner correctement.
|
||||
|
||||
H:*::Services.LocalHost.Net
|
||||
|
||||
Ne pas oublier de /rehash votre IRCd pour appliquer les modifications.
|
||||
|
||||
Une nouvelle tendance dans la configuration ircd hybride, Unreal et Bahamut, qui utilisent une approche plus
|
||||
«Lisibles» sous forme de configuration. Pour ceux, utiliser quelque chose comme:
|
||||
|
||||
link services.localhost.net
|
||||
{
|
||||
username *;
|
||||
hostname localhost;
|
||||
bind-ip *;
|
||||
port 6667;
|
||||
hub *;
|
||||
password-connect "mypass";
|
||||
password-receive "mypass";
|
||||
class servers;
|
||||
};
|
||||
|
||||
Notez que ce bloc de fichiers de configuration de style est diffèrent
|
||||
sur le IRCd. Consultez le fabricant de lien interactif (le lien est ci-dessous) pour plus
|
||||
détails sur la configuration exacte utilisée par votre IRCd.
|
||||
|
||||
Si vous êtes incapable d'obtenir un lien avec votre IRCd après la lecture de cet article,
|
||||
vous pouvez essayer le fabricant lien interactif, qui est situé au:
|
||||
Vous pouvez également essayer notre créateur de link interactif situé ici :
|
||||
|
||||
http://anope.org/ilm.php
|
||||
|
||||
4) A partir Anope
|
||||
4) Mettre en route Anope
|
||||
|
||||
Allez dans le répertoire où les fichiers binaires ont été installés (par défaut, ce n'est
|
||||
~/ Services/ bin). Tapez. /Services à lancer Anope.
|
||||
Allez dans le répertoire où les fichiers binaires ont été installés (par
|
||||
défaut, ~/services/bin). Tapez ./services pour lancer Anope.
|
||||
|
||||
S'il ya des erreurs de syntaxe dans le fichier de configuration, ils seront
|
||||
affiche sur l'écran. Corrigez-les jusqu'à ce qu'il n'y à plus d'erreur.
|
||||
S'il ya des erreurs de syntaxe dans le fichier de configuration, elles
|
||||
seront affichées sur l'écran. Corrigez-les jusqu'à ce qu'il n'y en ait plus.
|
||||
Un démarrage réussi ne générera pas de message.
|
||||
|
||||
Donner aux services au moins une minute pour se connecté à votre réseau, comme certains
|
||||
IRCds sur certains OS peut être très lent pour le processus de liaison. Si rien n'arrive après environ une minute,
|
||||
il y a probablement un problème de configuration. Essayez
|
||||
de lancer Anope en mode debug ./services-debug-nofork pour voir toutes les erreurs qu'il
|
||||
rencontres, et d'essayer de les corriger.
|
||||
Donnez aux services au moins une minute pour se connecter à votre réseau.
|
||||
Certains IRCds sur certains systèmes peuvent être très lents pour le
|
||||
processus de liaison. Si rien n'arrive après environ une minute, il y a
|
||||
probablement un problème de configuration. Essayez de lancer Anope en mode
|
||||
debug ./services -debug -nofork pour voir toutes les erreurs rencontrées
|
||||
et essayez de les corriger.
|
||||
|
||||
Si vous avez besoin d'aide pour résoudre des erreurs, n'hésitez pas à vous abonner à la Anope
|
||||
liste de diffusion et de poser là. Voir le fichier README pour plus de détails.
|
||||
Si vous avez besoin d'aide pour résoudre des erreurs, n'hésitez pas à vous
|
||||
abonner à la liste de diffusion Anope et d'y poser vos question.
|
||||
Voir le fichier README pour plus de détails.
|
||||
|
||||
5) Mettre en place un crontab
|
||||
|
||||
Une entrée crontab vous permettra de vérifier périodiquement que Anope est
|
||||
toujours en cours, et redémarrez-le s'il n'est pas.
|
||||
Une entrée crontab vous permettra de vérifier périodiquement si Anope est
|
||||
toujours en cours d'exécution et de le redémarrer s'il n'est pas.
|
||||
|
||||
D'abord renommer le script example.chk qui est dans le chemin de Anope (par défaut,
|
||||
cela est ~/services/data) pour services.chk et le modifier. Vous aurez besoin de
|
||||
modifier la partie configuration du fichier. Assurez-vous ensuite que le fichier est
|
||||
marqué comme exécutable en tapant chmod + x services.chk, et essayer de lancer le
|
||||
script pour voir si cela fonctionne (Anope ne doit pas être en marche lorsque vous faites cela ;))
|
||||
D'abord renommez le script example.chk qui est dans le chemin d'Anope
|
||||
(par défaut, ~/services/data) en services.chk et modifiez-le. Vous aurez
|
||||
besoin de modifier la partie CONFIGURATION du fichier. Assurez-vous ensuite
|
||||
que le fichier est marqué comme exécutable en tapant chmod +x services.chk
|
||||
et essayez de lancer le script pour voir si cela fonctionne (Anope ne doit
|
||||
pas être en marche lorsque vous faites cela ;))
|
||||
|
||||
Lorsque cela est fait, vous devrez ajouter l'entrée crontab. Type de crontab-e.
|
||||
Cela va ouvrir l'éditeur de texte par défaut avec le fichier crontab. Entrez le chemin
|
||||
suivant (avec le chemin correct):
|
||||
Lorsque c'est fait, vous devrez ajouter l'entrée crontab. Tapez crontab -e.
|
||||
Cela va ouvrir l'éditeur de texte par défaut avec le fichier crontab.
|
||||
Entrez la ligne suivante (avec le chemin correct) :
|
||||
|
||||
* / 5 * * * * /home/ircd/services/data/services.chk> /dev/nul 2> & 1
|
||||
*/5 * * * * /home/ircd/services/data/services.chk > /dev/null 2>&1
|
||||
|
||||
Le * / 5 au commencement signifie "vérifier toutes les 5 minutes". Vous pouvez remplacer
|
||||
le 5 avec un autre numéro si vous voulez (mais moins de 60). Consulter
|
||||
pages de manuel de votre système pour plus de détails sur la syntaxe de la crontab
|
||||
fichier. Intéressant pages de manuel sont crontab (5), crontab (1) et cron (8).
|
||||
Le */5 au début signifie "vérifier toutes les 5 minutes". Vous pouvez
|
||||
remplacer le 5 par un autre numéro si vous voulez (mais moins de 60).
|
||||
Consultez pages de manuel de votre système pour plus de détails sur la
|
||||
syntaxe du fichier crontab. Les pages de manuel intéressantes sont
|
||||
crontab(5), crontab(1) et cron(8).
|
||||
|
||||
Sauvegarder et quitter, et il est installé.
|
||||
Sauvegardez, quittez et c'est installé.
|
||||
|
||||
@@ -1,202 +0,0 @@
|
||||
How To Add IRCd Support
|
||||
-----------------------
|
||||
|
||||
1) Files to Edit
|
||||
2) The Code
|
||||
3) The IRCDVar struct
|
||||
4) Modes
|
||||
5) Functions / Events
|
||||
6) CAPAB/PROTOCTL
|
||||
7) IRCDProto Class
|
||||
|
||||
1) Files to Edit
|
||||
|
||||
When preparing to add supprt to Anope for your IRCd, you need to edit
|
||||
the following files
|
||||
|
||||
A) Make a copy of the .cpp file of the IRCd that matches the IRCd that
|
||||
you are attempting to add support for best.
|
||||
B) Add your IRCd into the supported IRCds in example.conf
|
||||
|
||||
2) The Code
|
||||
|
||||
Here is where the code of the .cpp file comes in. Be prepared to spend at
|
||||
least an hour, if not longer, going over the code and getting it right;
|
||||
Especially if you are setting up an ircd that is completely different
|
||||
than the one you used as a base. This section covers the majority of the
|
||||
code that is in use.
|
||||
|
||||
The first bit of code you will face is the IRCDVar structure, This is one
|
||||
of two structs which holds your IRCd information; This allows you to quickly
|
||||
setup your specific ircd.
|
||||
|
||||
IRCDVar myIrcd[] = { };
|
||||
|
||||
This struct contains your basic IRCd functions. Your base source file has
|
||||
the list of all available variables; note that you should not swap any
|
||||
around, or you will break stuff. Here is a brief description of the usage
|
||||
of each.
|
||||
|
||||
1) Name: This member tells Anope about the IRCD's name. It may contain
|
||||
text about it's name and version. This is used to identify the
|
||||
build on startup.
|
||||
|
||||
2) Pseudo Client Mode: This is the user mode set by Anope on all BotServ
|
||||
bots. Normally you want this to be a some form of
|
||||
service or bot flag; you can use + for no mode at
|
||||
all.
|
||||
|
||||
3) Max Channelmode Symbols: This is the total number of possible channel
|
||||
modes that can appear before a nick. Do
|
||||
remember to count each possible mode, so +ov
|
||||
is 2.
|
||||
|
||||
4) SVSNICK: Can the ircd use SVSNICK to change some ones nick? Otherwise,
|
||||
KILL is used. Use 1 for yes, 0 for no.
|
||||
|
||||
5) VHOST: Can a user's host be changed on the fly? Enabling this allow
|
||||
HostServ online. Use 1 for yes, 0 for no.
|
||||
|
||||
6) SNLINE: Does the IRCd support realname (geocs) bans? Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
7) SQLINE: Does the IRCd support nick bans? Use 1 for yes, 0 for no.
|
||||
|
||||
8) SZLINE: Does the IRCd support SZLINES? Use 1 for yes, 0 for no.
|
||||
|
||||
10) Join to Message: Services must join a channel to send any message to
|
||||
that channel (cannot override +n). Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
11) SQline Channels: The IRCd's supports banning channel names via
|
||||
SQLINES. Use 1 for yes, 0 for no.
|
||||
|
||||
12) Quit On Kill: When we (SVS)KILL a user, does the IRCd send back a
|
||||
QUIT message for that user? Use 1 for yes, 0 for no.
|
||||
|
||||
13) SVSMODE UNBAN: We can use SVSMODE to unban hosts from a channel. Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
14) Reverse: We can do a reverse check when unbanning. For use with
|
||||
DreamForge based IRCd's. Use 1 for yes, 0 for no.
|
||||
|
||||
15) vIdent: Support for including a user's ident in their vHost. Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
16) SVSHOLD: Support for temporarily 'holding' a nick, instead of using
|
||||
a nick enforcer client. Use 1 for yes, 0 for no.
|
||||
|
||||
17) TS on MODE: We need to send a timestamp when modes are being changed.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
18) Umode: We can use OperServ to change a user's mode. Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
19) OMODE: We can use OperServ to give some user a temporary O:LINE.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
20) No Knock Requires +i: Does the No Knock channel mode require invite
|
||||
only channels? Use 1 for yes, 0 for no.
|
||||
|
||||
21) SVSMODE UCMODE: Can we clear user channel modes with SVSMODE? Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
22) SGline Enforce: Does the IRCd enforce SNLINES for us or do we need to
|
||||
do so? Use 1 for yes, 0 for no.
|
||||
|
||||
23) TS6: Does the IRCd support TS6? Use 1 for yes, 0 for no.
|
||||
|
||||
24) Global TLD Prefix: Prefix used to send global messages, should probably
|
||||
be "$"
|
||||
|
||||
25) Max Modes: The max number of mode changes we can send in one line
|
||||
|
||||
3) Modes
|
||||
|
||||
Anope is told about modes in the protocol module.
|
||||
For the most part, the syntax for adding channel and user modes are:
|
||||
|
||||
ModeManager::AddUserMode(new UserMode(UMODE_NETADMIN, "UMODE_NETADMIN", 'N'));
|
||||
Where 'N' is the char for the mode, and UMODE_NETADMIN shows what the
|
||||
mode does. Or:
|
||||
|
||||
ModeManager::AddChannelMode(new ChannelMode(CMODE_BLOCKCOLOR, "CMODE_BLOCKCOLOR", 'c'));
|
||||
Where 'c' is the char for the mode and CMODE_BLOCKCOLOR shows what
|
||||
the mode does
|
||||
|
||||
A full list of valid mode names for the second param can be found
|
||||
in services.h in the enum for ChannelModeName and UserModeName
|
||||
If necessary, you can add additional modes to this list.
|
||||
|
||||
Adding simple modes with parameters is similar, instead adding a
|
||||
'new ChannelMode', use 'new ChannelModeParam', set the third optional
|
||||
arg of ChannelModeParam to false if the param should NOT be sent when unsetting
|
||||
it. Eg:
|
||||
|
||||
ModeManager::AddChannelMode(new ChannelModeParam(CMODE_JOINFLOOD, "CMODE_JOINFLOOD", 'j', true));
|
||||
|
||||
Anope will internally track the params, and they can be retrieved through
|
||||
Channel::GetParam();
|
||||
|
||||
If you want to make param validity checking for a mode, you must create a new
|
||||
class which inherits from ChannelModeParam and overload the IsValid function.
|
||||
Modes CMODE_OPERONLY, CMODE_ADMINONLY, and CMODE_REGISTERED already exist
|
||||
internally as classes, to overload the CanSet function to disable non opers
|
||||
from mlocking (or in CMODE_REGISTERED's case, anyone) from setting them.
|
||||
This should be added like:
|
||||
|
||||
ModeManager::AddChannelMode(new ChannelModeOper('O'));
|
||||
|
||||
4) Functions and Events
|
||||
|
||||
A brief word about functions and events. All events are captured by creating a Message struct
|
||||
with the name of the message and the callback function:
|
||||
|
||||
Message my_message("MESSAGE", do_my_messsage);
|
||||
|
||||
Each message should have a message handler if its important enough to be
|
||||
processed by services. All event functions should be formed like this:
|
||||
|
||||
bool do_my_message(const Anope::string &source, const std::vector<Anope::string> ¶ms)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
They will receive the source; this can be empty at times depending on the
|
||||
event. Next, params holds the arguments for the event. Events are likely to
|
||||
pass to various upper level event handlers; see the previous ircd source for
|
||||
how they handle these events.
|
||||
|
||||
5) CAPAB/PROTOCTL
|
||||
|
||||
Most IRCDs send a CAPAB or PROTOCTL line so that they can work out what
|
||||
the other end of the connection is capable of doing. The protocol module should
|
||||
handle all of these without the cores knowledge with the exception of the following:
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
Define | Description
|
||||
----------------|---------------------------------------------------------
|
||||
CAPAB_NOQUIT | NOQUIT protocol support
|
||||
CAPAB_TSMODE | Chanmodes are timestamped
|
||||
CAPAB_UNCONNECT | UNCONNECT protocol support
|
||||
CAPAB_QS | Quitstorm - same as NOQUIT
|
||||
|
||||
You can override the default OnCapab method in IRCdMessage if required.
|
||||
|
||||
6) IRCDProto Class
|
||||
|
||||
The IRCDProto class is set up like:
|
||||
|
||||
class MyIRCdProto : public IRCDProto { } ircdproto;
|
||||
|
||||
And told to Anope through the
|
||||
|
||||
pmodule_ircd_proto(&ircd_proto);
|
||||
|
||||
function.
|
||||
|
||||
This is used for sending out specific messages from Anope to your IRCd.
|
||||
A list of all of the valid function names to overload and their args
|
||||
are in services.h. If the protocol module you are editing is similar enough
|
||||
to the IRCd you are adding support for, many of these probably won't need to
|
||||
be changed.
|
||||
+10
-3
@@ -8,8 +8,15 @@ Anope Mutli Language Support
|
||||
1) Building Anope with gettext support
|
||||
|
||||
To build Anope with gettext support, gettext and its development libraries must be installed on the system.
|
||||
Anope does not require locales to be installed or enabled on the system, but does require the locales-all
|
||||
package on Debian and Debian based systems.
|
||||
|
||||
On Debian install the locales-all package.
|
||||
|
||||
On Ubuntu run locale-gen for each language you want to enable.
|
||||
For example:
|
||||
locale-gen es_ES.UTF-8
|
||||
|
||||
Then execute:
|
||||
dpkg-reconfigure locales
|
||||
|
||||
Building Anope on Windows with gettext support is explained in docs/WIN32.txt
|
||||
|
||||
@@ -31,7 +38,7 @@ 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
|
||||
|
||||
+15
-16
@@ -1,7 +1,7 @@
|
||||
Anope -- a set of IRC services for IRC networks
|
||||
-----------------------------------------------
|
||||
|
||||
Anope is 2003-2013 Anope Team <team@anope.org>.
|
||||
Anope is 2003-2014 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,20 +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:
|
||||
|
||||
* Thomas Edwards <thomas.edwards@ilkotech.co.uk>
|
||||
* Luke Thompson <luke.thompson@ilkotech.co.uk>
|
||||
* Matthew M. <mcm@they-got.us>
|
||||
* Denis M. (Phr33d0m) <god@politeia.in>
|
||||
|
||||
2) Presentation
|
||||
|
||||
@@ -171,8 +169,9 @@ Table of Contents
|
||||
Anope currently works with:
|
||||
|
||||
* Bahamut 1.4.27 or later (including 1.8)
|
||||
* Hybrid 8.0 or later
|
||||
* 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
|
||||
@@ -203,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
@@ -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.
|
||||
+6
-7
@@ -71,14 +71,13 @@ Anope for Windows
|
||||
our IRC Support channel for assistance.
|
||||
|
||||
Some Anope modules require third party libraries, such as m_mysql and
|
||||
m_ssl. If these libraries are installed in nonstandard locations, cmake
|
||||
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:
|
||||
the SSL modules. If these libraries are installed in nonstandard
|
||||
locations, cmake 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* XMLRPC Functions
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
*/
|
||||
@@ -74,7 +74,7 @@ class AnopeXMLRPC
|
||||
*/
|
||||
function DoChannel($Channel)
|
||||
{
|
||||
return $this->RunXMLRPC("channel", NULL);
|
||||
return $this->RunXMLRPC("channel", array($Channel));
|
||||
}
|
||||
|
||||
/* Like DoChannel(), but different.
|
||||
|
||||
@@ -0,0 +1,173 @@
|
||||
#!/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/CMakeFiles") {
|
||||
if (-e "cmake-bin") {
|
||||
my $cmake_path = `find cmake-bin -name cmake -print0`;
|
||||
system($cmake_path, "build/.");
|
||||
} else {
|
||||
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)
|
||||
}
|
||||
}
|
||||
+23
-6
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -74,12 +74,22 @@ class CoreExport AccessProvider : public Service
|
||||
/* Represents one entry of an access list on a channel. */
|
||||
class CoreExport ChanAccess : public Serializable
|
||||
{
|
||||
Anope::string mask;
|
||||
/* account this access entry is for, if any */
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
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;
|
||||
/* Channel this access entry is on */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
Anope::string mask;
|
||||
Anope::string creator;
|
||||
time_t last_seen;
|
||||
time_t created;
|
||||
@@ -87,14 +97,19 @@ class CoreExport ChanAccess : public Serializable
|
||||
ChanAccess(AccessProvider *p);
|
||||
virtual ~ChanAccess();
|
||||
|
||||
void SetMask(const Anope::string &mask, ChannelInfo *ci);
|
||||
const Anope::string &Mask() const;
|
||||
NickCore *GetAccount() const;
|
||||
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
/** 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) const;
|
||||
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
|
||||
@@ -113,8 +128,8 @@ class CoreExport ChanAccess : public Serializable
|
||||
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;
|
||||
virtual bool operator>(const ChanAccess &other) const;
|
||||
virtual bool operator<(const ChanAccess &other) const;
|
||||
bool operator>=(const ChanAccess &other) const;
|
||||
bool operator<=(const ChanAccess &other) const;
|
||||
};
|
||||
@@ -125,8 +140,10 @@ class CoreExport ChanAccess : public Serializable
|
||||
class CoreExport AccessGroup : public std::vector<ChanAccess *>
|
||||
{
|
||||
public:
|
||||
/* Channel these access entries are on */
|
||||
/* 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;
|
||||
/* super_admin always gets all privs. founder is a special case where ci->founder == nc */
|
||||
|
||||
+7
-87
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -27,15 +27,6 @@ extern CoreExport Serialize::Checker<nickcore_map> NickCoreList;
|
||||
|
||||
/* A registered nickname.
|
||||
* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*
|
||||
* Possible flags:
|
||||
* NO_EXPIRE - Nick never expires
|
||||
* HELD - This nick is being held after a kill by an enforcer client
|
||||
* or is being SVSHeld.
|
||||
* COLLIDED - We are taking over this nick, either by SVSNICK or KILL
|
||||
* and are waiting for the confirmation of either of these actions to
|
||||
* proceed. This is checked in NickAlias::OnCancel
|
||||
*
|
||||
*/
|
||||
class CoreExport NickAlias : public Serializable, public Extensible
|
||||
{
|
||||
@@ -65,18 +56,6 @@ class CoreExport NickAlias : public Serializable, public Extensible
|
||||
void Serialize(Serialize::Data &data) 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);
|
||||
|
||||
/** Set a vhost for the user
|
||||
* @param ident The ident
|
||||
* @param host The host
|
||||
@@ -124,26 +103,6 @@ class CoreExport NickAlias : public Serializable, public Extensible
|
||||
/* 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)
|
||||
*
|
||||
* Possible flags:
|
||||
* KILLPROTECT - Kill other users who try to take this nick
|
||||
* SECURE - Don't recognize unless identified
|
||||
* MSG - Use PRIVMSG instead of notice
|
||||
* MEMO_HARDMAX - Don't allow user to change memo limit
|
||||
* MEMO_SIGNON - Notify of memos at signon and unaway
|
||||
* MEMO_RECEIEVE - Notify of new memos when sent
|
||||
* PRIVATE - Don't show in LIST to non-servadmins
|
||||
* HIDE_EMAIL - Don't show email in INFO
|
||||
* HIDE_MASK - Don't show last seen address in INFO
|
||||
* HIDE_QUIT - Don't show last quit message in INFO
|
||||
* KILL_QUICK - Kill quicker
|
||||
* KILL_IMMED - Kill immediately
|
||||
* MEMO_MAIL - User gets email on memo
|
||||
* HIDE_STATUS - Don't show services access status
|
||||
* SUSPEND - Nickname is suspended
|
||||
* AUTOOP - Autoop nickname in channels
|
||||
* UNCONFIRMED - Account has not had email address confirmed
|
||||
* STATS - ChanStats is enabled for this user
|
||||
*/
|
||||
class CoreExport NickCore : public Serializable, public Extensible
|
||||
{
|
||||
@@ -155,16 +114,13 @@ class CoreExport NickCore : public Serializable, public Extensible
|
||||
/* User password in form of hashm:data */
|
||||
Anope::string pass;
|
||||
Anope::string email;
|
||||
/* Greet associated with the account, sometimes sent when the user joins a channel */
|
||||
Anope::string greet;
|
||||
/* 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;
|
||||
/* SSL certificate list. Users who have a matching certificate may be automatically logged in */
|
||||
std::vector<Anope::string> cert;
|
||||
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.
|
||||
@@ -219,6 +175,10 @@ class CoreExport NickCore : public Serializable, public Extensible
|
||||
*/
|
||||
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
|
||||
@@ -250,46 +210,6 @@ class CoreExport NickCore : public Serializable, public Extensible
|
||||
*/
|
||||
bool IsOnAccess(const User *u) const;
|
||||
|
||||
/** 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.
|
||||
*/
|
||||
void AddCert(const Anope::string &entry);
|
||||
|
||||
/** 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.
|
||||
*/
|
||||
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();
|
||||
|
||||
/** Finds an account
|
||||
* @param nick The account name to find
|
||||
* @return The account, if it exists
|
||||
@@ -302,7 +222,7 @@ class CoreExport NickCore : public Serializable, public Extensible
|
||||
};
|
||||
|
||||
/* A request to check if an account/password is valid. These can exist for
|
||||
* extended periods of time due to some authentication modules take.
|
||||
* extended periods due to the time some authentication modules take.
|
||||
*/
|
||||
class CoreExport IdentifyRequest
|
||||
{
|
||||
|
||||
+42
-35
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -115,6 +115,7 @@ namespace Anope
|
||||
* The following functions return the various types of strings.
|
||||
*/
|
||||
inline const char *c_str() const { return this->_string.c_str(); }
|
||||
inline const char *data() const { return this->_string.data(); }
|
||||
inline std::string &str() { return this->_string; }
|
||||
inline const std::string &str() const { return this->_string; }
|
||||
inline ci::string ci_str() const { return ci::string(this->_string.c_str()); }
|
||||
@@ -159,24 +160,24 @@ namespace Anope
|
||||
* Trim leading and trailing white spaces from the string.
|
||||
*/
|
||||
|
||||
inline string& ltrim()
|
||||
inline string& ltrim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
while (!this->_string.empty() && isspace(this->_string[0]))
|
||||
while (!this->_string.empty() && what.find(this->_string[0]) != Anope::string::npos)
|
||||
this->_string.erase(this->_string.begin());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline string& rtrim()
|
||||
inline string& rtrim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
while (!this->_string.empty() && isspace(this->_string[this->_string.length() - 1]))
|
||||
while (!this->_string.empty() && what.find(this->_string[this->_string.length() - 1]) != Anope::string::npos)
|
||||
this->_string.erase(this->_string.length() - 1);
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline string& trim()
|
||||
inline string& trim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
this->ltrim();
|
||||
this->rtrim();
|
||||
this->ltrim(what);
|
||||
this->rtrim(what);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -225,7 +226,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();
|
||||
@@ -236,7 +237,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();
|
||||
@@ -255,7 +256,7 @@ namespace Anope
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -266,7 +267,7 @@ namespace Anope
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -312,7 +313,7 @@ namespace Anope
|
||||
{
|
||||
inline size_t operator()(const string &s) const
|
||||
{
|
||||
return std::tr1::hash<std::string>()(s.lower().str());
|
||||
return TR1NS::hash<std::string>()(s.lower().str());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -320,7 +321,7 @@ namespace Anope
|
||||
{
|
||||
inline size_t operator()(const string &s) const
|
||||
{
|
||||
return std::tr1::hash<std::string>()(s.str());
|
||||
return TR1NS::hash<std::string>()(s.str());
|
||||
}
|
||||
};
|
||||
|
||||
@@ -333,7 +334,8 @@ namespace Anope
|
||||
};
|
||||
|
||||
template<typename T> class map : public std::map<string, T, ci::less> { };
|
||||
template<typename T> class hash_map : public std::tr1::unordered_map<string, T, hash_ci, compare> { };
|
||||
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__;
|
||||
|
||||
@@ -498,21 +500,21 @@ namespace Anope
|
||||
|
||||
/** 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
|
||||
* @param nc The account to use language 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
|
||||
* @param nc The account to use language 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 nc The account to use language 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);
|
||||
@@ -534,6 +536,11 @@ namespace Anope
|
||||
* @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.
|
||||
@@ -547,19 +554,19 @@ 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);
|
||||
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
|
||||
@@ -570,7 +577,7 @@ class CoreExport sepstream
|
||||
/** 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 detched
|
||||
* @return True if the token was able to be fetched
|
||||
*/
|
||||
bool GetToken(Anope::string &token, int num);
|
||||
|
||||
@@ -588,7 +595,7 @@ class CoreExport sepstream
|
||||
/** 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 detched
|
||||
* @return True if the token was able to be fetched
|
||||
*/
|
||||
bool GetTokenRemainder(Anope::string &token, int num);
|
||||
|
||||
@@ -615,7 +622,7 @@ class commasepstream : public sepstream
|
||||
public:
|
||||
/** Initialize with comma seperator
|
||||
*/
|
||||
commasepstream(const Anope::string &source) : sepstream(source, ',') { }
|
||||
commasepstream(const Anope::string &source, bool allowempty = false) : sepstream(source, ',', allowempty) { }
|
||||
};
|
||||
|
||||
/** A derived form of sepstream, which seperates on spaces
|
||||
@@ -715,8 +722,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)
|
||||
{
|
||||
@@ -757,17 +763,18 @@ template<typename T> inline T convertTo(const Anope::string &s, bool failIfLefto
|
||||
*/
|
||||
#ifdef DEBUG_BUILD
|
||||
# include <typeinfo>
|
||||
#endif
|
||||
template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
|
||||
{
|
||||
#ifdef DEBUG_BUILD
|
||||
T ret = dynamic_cast<T>(ptr);
|
||||
if (ptr != NULL && ret == NULL)
|
||||
throw CoreException(Anope::string("anope_dynamic_static_cast<") + typeid(T).name() + ">(" + typeid(O).name() + ") fail");
|
||||
return ret;
|
||||
#else
|
||||
return static_cast<T>(ptr);
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
|
||||
{
|
||||
return static_cast<T>(ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ANOPE_H
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* Copyright (C) 2008-2013 Anope Team <team@anope.org>
|
||||
* Copyright (C) 2008-2014 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
|
||||
+7
-6
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* Copyright (C) 2008-2013 Anope Team <team@anope.org>
|
||||
* Copyright (C) 2008-2014 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
@@ -23,6 +23,8 @@ extern CoreExport Serialize::Checker<botinfo_map> BotListByNick, BotListByUID;
|
||||
/* 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;
|
||||
/* Last time this bot said something (via privmsg) */
|
||||
@@ -58,15 +60,16 @@ class CoreExport BotInfo : public User, public Serializable
|
||||
|
||||
void GenerateUID();
|
||||
|
||||
void OnKill();
|
||||
|
||||
/** Change the nickname for the bot.
|
||||
* @param newnick The nick to change to
|
||||
*/
|
||||
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
|
||||
@@ -130,6 +133,4 @@ class CoreExport BotInfo : public User, public Serializable
|
||||
static BotInfo* Find(const Anope::string &nick, bool nick_only = false);
|
||||
};
|
||||
|
||||
extern CoreExport BotInfo *BotServ, *ChanServ, *Global, *HostServ, *MemoServ, *NickServ, *OperServ;
|
||||
|
||||
#endif // BOTS_H
|
||||
|
||||
+34
-25
@@ -1,6 +1,6 @@
|
||||
/* Channel support
|
||||
*
|
||||
* (C) 2008-2013 Anope Team
|
||||
* (C) 2008-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -30,16 +30,6 @@ struct ChanUserContainer : public Extensible
|
||||
ChanUserContainer(User *u, Channel *c) : user(u), chan(c) { }
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
class CoreExport Channel : public Base, public Extensible
|
||||
{
|
||||
public:
|
||||
@@ -56,10 +46,13 @@ class CoreExport Channel : public Base, public Extensible
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
/* When the channel was created */
|
||||
time_t creation_time;
|
||||
std::set<ChannelFlag> flags;
|
||||
/* 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::list<ChanUserContainer *> ChanUserList;
|
||||
typedef std::map<User *, ChanUserContainer *> ChanUserList;
|
||||
ChanUserList users;
|
||||
|
||||
/* Current topic of the channel */
|
||||
@@ -80,12 +73,14 @@ class CoreExport Channel : public Base, public Extensible
|
||||
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();
|
||||
@@ -103,11 +98,16 @@ class CoreExport Channel : public Base, public Extensible
|
||||
*/
|
||||
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
|
||||
*/
|
||||
ChanUserContainer* JoinUser(User *u);
|
||||
ChanUserContainer* JoinUser(User *u, const ChannelStatus *status);
|
||||
|
||||
/** Remove a user internally from the channel
|
||||
* @param u The user
|
||||
@@ -118,14 +118,14 @@ class CoreExport Channel : public Base, public Extensible
|
||||
* @param u The user
|
||||
* @return A user container if found, else NULL
|
||||
*/
|
||||
ChanUserContainer *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
|
||||
@@ -133,7 +133,7 @@ class CoreExport Channel : public Base, public Extensible
|
||||
* @param name The mode name, eg CMODE_OP, CMODE_VOICE
|
||||
* @return true or false
|
||||
*/
|
||||
bool HasUserStatus(const User *u, const Anope::string &name) const;
|
||||
bool HasUserStatus(User *u, const Anope::string &name);
|
||||
|
||||
/** See if a channel has a mode
|
||||
* @param name The mode name
|
||||
@@ -225,7 +225,7 @@ class CoreExport Channel : public Base, public Extensible
|
||||
* @param nick The nick being kicked
|
||||
* @param reason The reason for the kick
|
||||
*/
|
||||
void KickInternal(MessageSource &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
|
||||
@@ -267,30 +267,39 @@ class CoreExport Channel : public Base, public Extensible
|
||||
*/
|
||||
void ChangeTopic(const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
|
||||
|
||||
/** Hold the channel open using ChanServ
|
||||
*/
|
||||
void Hold();
|
||||
|
||||
/** 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
|
||||
* @param check_noop if true, CI_NOAUTOOP is checked before giving modes
|
||||
*/
|
||||
void SetCorrectModes(User *u, bool give_mode, bool check_noop);
|
||||
void SetCorrectModes(User *u, bool give_modes);
|
||||
|
||||
/** Unbans a user from this channel.
|
||||
* @param u The user to unban
|
||||
* @param mode The mode 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(const User *u, bool full = false);
|
||||
bool Unban(User *u, const Anope::string &mode, 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);
|
||||
};
|
||||
|
||||
#endif // CHANNELS_H
|
||||
|
||||
+20
-7
@@ -1,6 +1,6 @@
|
||||
/* Declarations for command data.
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -46,7 +46,7 @@ struct CommandInfo
|
||||
struct CoreExport CommandReply
|
||||
{
|
||||
virtual ~CommandReply() { }
|
||||
virtual void SendMessage(const BotInfo *source, const Anope::string &msg) = 0;
|
||||
virtual void SendMessage(BotInfo *source, const Anope::string &msg) = 0;
|
||||
};
|
||||
|
||||
/* The source for a command */
|
||||
@@ -55,7 +55,7 @@ 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 */
|
||||
Reference<NickCore> nc;
|
||||
@@ -126,7 +126,6 @@ class CoreExport Command : public Service
|
||||
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);
|
||||
@@ -136,9 +135,10 @@ class CoreExport Command : public Service
|
||||
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
|
||||
@@ -163,8 +163,21 @@ class CoreExport Command : public Service
|
||||
* @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
|
||||
|
||||
+116
-747
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -16,319 +16,130 @@
|
||||
#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);
|
||||
if (!value.empty())
|
||||
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();
|
||||
~Conf();
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* a long unsigned int
|
||||
*/
|
||||
typedef ValueContainer<long unsigned *> ValueContainerLUInt;
|
||||
void LoadConf(File &file);
|
||||
void Post(Conf *old);
|
||||
|
||||
/** 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;
|
||||
BotInfo *GetClient(const Anope::string &name);
|
||||
|
||||
/** 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 &);
|
||||
|
||||
/** 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;
|
||||
Block *GetCommand(CommandSource &);
|
||||
};
|
||||
|
||||
struct Uplink
|
||||
{
|
||||
@@ -338,350 +149,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;
|
||||
/* Max length of channel names */
|
||||
unsigned ChanLen;
|
||||
|
||||
/* User and group to run as */
|
||||
Anope::string User;
|
||||
Anope::string Group;
|
||||
|
||||
/* 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;
|
||||
/* Use server side topic lock */
|
||||
bool UseServerSideTopicLock;
|
||||
/* The max length for reasons (cs_kick, cs_ban, etc) */
|
||||
unsigned CSReasonMax;
|
||||
/* Default botmodes on channels, defaults to ao */
|
||||
Anope::string BotModes;
|
||||
/* 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 MailEmailchangeSubject, MailEmailchangeMessage;
|
||||
Anope::string MailMemoSubject, MailMemoMessage;
|
||||
|
||||
/* 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 */
|
||||
std::set<Anope::string> 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;
|
||||
/* Kill & killquick delays before force changing off users */
|
||||
time_t NSKillQuick;
|
||||
time_t NSKill;
|
||||
/* Modes set on a user when they identify */
|
||||
Anope::string NSModesOnID;
|
||||
/* Restore nick/channels on recover */
|
||||
bool NSRestoreOnRecover;
|
||||
/* Whether or not to use SASL */
|
||||
bool NSSASL;
|
||||
/* If set, hides netsplits in the last_quit field of nicks */
|
||||
bool NSHideNetSplitQuit;
|
||||
|
||||
/* Core ChanServ modules */
|
||||
Anope::string ChanCoreModules;
|
||||
/* Default flags for newly registered channels */
|
||||
std::set<Anope::string> 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 */
|
||||
std::set<Anope::string> 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;
|
||||
/* Number of bits to use when comparing session IPs */
|
||||
unsigned SessionIPv4CIDR;
|
||||
unsigned SessionIPv6CIDR;
|
||||
/* 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;
|
||||
|
||||
/* Map of fantasy commands */
|
||||
CommandInfo::map Fantasy;
|
||||
|
||||
std::vector<CommandGroup> CommandGroups;
|
||||
};
|
||||
}
|
||||
|
||||
/** 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
|
||||
@@ -705,109 +176,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 (services.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 <test tag="blah" data="foo"> then this
|
||||
* function would return 2. Spaces and newlines both qualify as valid seperators
|
||||
* between values.
|
||||
*/
|
||||
int EnumerateValues(const Anope::string &, int);
|
||||
};
|
||||
|
||||
extern ConfigurationFile ServicesConf;
|
||||
extern CoreExport ServerConfig *Config;
|
||||
extern Configuration::File ServicesConf;
|
||||
extern CoreExport Configuration::Conf *Config;
|
||||
|
||||
#endif // CONFIG_H
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -13,25 +13,25 @@
|
||||
|
||||
class AccessGroup;
|
||||
class AutoKick;
|
||||
namespace Anope { class String; }
|
||||
class BotInfo;
|
||||
class CallBack;
|
||||
class ChanAccess;
|
||||
class Channel;
|
||||
class ChannelInfo;
|
||||
class ChannelStatus;
|
||||
struct ChanUserContainer;
|
||||
class ClientSocket;
|
||||
class Command;
|
||||
class CommandSource;
|
||||
namespace Configuration { struct Conf; }
|
||||
class ConnectionSocket;
|
||||
namespace DNS { class Packet; }
|
||||
namespace DNS { struct Query; }
|
||||
class Entry;
|
||||
class IdentifyRequest;
|
||||
class InfoFormatter;
|
||||
class IRCDProto;
|
||||
class ListenSocket;
|
||||
class Log;
|
||||
class LogInfo;
|
||||
class Memo;
|
||||
class MessageSource;
|
||||
class Module;
|
||||
@@ -42,7 +42,6 @@ class ReferenceBase;
|
||||
class Regex;
|
||||
class Serializable;
|
||||
class Server;
|
||||
class ServerConfig;
|
||||
class Socket;
|
||||
class Thread;
|
||||
class User;
|
||||
@@ -53,4 +52,5 @@ struct Exception;
|
||||
struct MemoInfo;
|
||||
struct ModeLock;
|
||||
struct Oper;
|
||||
namespace SASL { struct Message; }
|
||||
|
||||
|
||||
+223
-81
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -12,109 +12,251 @@
|
||||
|
||||
#include "anope.h"
|
||||
#include "serialize.h"
|
||||
#include "service.h"
|
||||
#include "logger.h"
|
||||
|
||||
/* All items added to Extensible must inherit from this.
|
||||
*/
|
||||
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:
|
||||
virtual ~ExtensibleItem() { }
|
||||
virtual void Unset(Extensible *obj) = 0;
|
||||
|
||||
virtual const Anope::string *Serialize() { return NULL; }
|
||||
/* 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 &) { }
|
||||
};
|
||||
|
||||
/** Common class used to Extensible::Extend as it inherits from both ExtensibleItem
|
||||
* and whatever basic object you're trying to store.
|
||||
* Eg, obj->Extend(key, new ExtensibleItemClass<Anope::string>(value));
|
||||
*/
|
||||
template<typename T> struct CoreExport ExtensibleItemClass : T, ExtensibleItem
|
||||
{
|
||||
ExtensibleItemClass(const T& t) : T(t) { }
|
||||
};
|
||||
|
||||
/* Used to attach metadata to this object that is automatically saved
|
||||
* when the object is saved (assuming the object's Serialize method
|
||||
* correcly calls Extensible::ExtensibleSerialize).
|
||||
*/
|
||||
struct CoreExport ExtensibleMetadata : ExtensibleItemClass<Anope::string>
|
||||
{
|
||||
ExtensibleMetadata(const Anope::string &t) : ExtensibleItemClass<Anope::string>(t) { }
|
||||
|
||||
const Anope::string *Serialize() anope_override { return this; }
|
||||
};
|
||||
|
||||
/* Used to attach arbitrary objects to this object using unique keys */
|
||||
class CoreExport Extensible
|
||||
{
|
||||
private:
|
||||
typedef std::map<Anope::string, ExtensibleItem *> extensible_map;
|
||||
extensible_map *extension_items;
|
||||
|
||||
public:
|
||||
/** Default constructor
|
||||
*/
|
||||
Extensible();
|
||||
std::set<ExtensibleBase *> extension_items;
|
||||
|
||||
/** Destructor, deletes all of the extensible items in this object
|
||||
* then clears the map
|
||||
*/
|
||||
virtual ~Extensible();
|
||||
|
||||
/** 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, it will be overwritten.
|
||||
*/
|
||||
void Extend(const Anope::string &key, ExtensibleItem *p = NULL);
|
||||
template<typename T> T* GetExt(const Anope::string &name) const;
|
||||
bool HasExt(const Anope::string &name) const;
|
||||
|
||||
void ExtendMetadata(const Anope::string &key, const Anope::string &value = "");
|
||||
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);
|
||||
|
||||
/** 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);
|
||||
static void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &data);
|
||||
static void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &data);
|
||||
};
|
||||
|
||||
/** 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
|
||||
template<typename T>
|
||||
class BaseExtensibleItem : public ExtensibleBase
|
||||
{
|
||||
protected:
|
||||
virtual T *Create(Extensible *) = 0;
|
||||
|
||||
public:
|
||||
BaseExtensibleItem(Module *m, const Anope::string &n) : ExtensibleBase(m, n) { }
|
||||
|
||||
~BaseExtensibleItem()
|
||||
{
|
||||
if (this->extension_items)
|
||||
while (!items.empty())
|
||||
{
|
||||
extensible_map::const_iterator it = this->extension_items->find(key);
|
||||
if (it != this->extension_items->end())
|
||||
return anope_dynamic_static_cast<T>(it->second);
|
||||
}
|
||||
std::map<Extensible *, void *>::iterator it = items.begin();
|
||||
Extensible *obj = it->first;
|
||||
T *value = static_cast<T *>(it->second);
|
||||
|
||||
obj->extension_items.erase(this);
|
||||
items.erase(it);
|
||||
delete value;
|
||||
}
|
||||
}
|
||||
|
||||
T* Set(Extensible *obj, const T &value)
|
||||
{
|
||||
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 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)
|
||||
{
|
||||
T* t = Get(obj);
|
||||
if (t)
|
||||
return t;
|
||||
|
||||
void ExtensibleSerialize(Serialize::Data &data) const;
|
||||
void ExtensibleUnserialize(Serialize::Data &data);
|
||||
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);
|
||||
else
|
||||
this->Unset(e);
|
||||
}
|
||||
};
|
||||
|
||||
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);
|
||||
else
|
||||
this->Unset(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
|
||||
|
||||
+10
-4
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2002-2011 InspIRCd Development Team
|
||||
* Copyright (C) 2009-2013 Anope Team <team@anope.org>
|
||||
* Copyright (C) 2009-2014 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
@@ -13,10 +13,12 @@
|
||||
#include <string>
|
||||
#include <locale>
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <tr1/unordered_map>
|
||||
#else
|
||||
#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"
|
||||
@@ -28,6 +30,10 @@ namespace Anope
|
||||
/* Casemap in use by Anope. ci::string's comparation functions use this (and thus Anope::string) */
|
||||
extern std::locale casemap;
|
||||
|
||||
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>
|
||||
|
||||
+11
-25
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2013 Anope Team
|
||||
* (C) 2008-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -55,7 +55,7 @@ namespace Language
|
||||
extern CoreExport const char *Translate(const NickCore *nc, const char *string);
|
||||
|
||||
/** Translatesa string to the given language.
|
||||
* @param lang The language to trnalsate to
|
||||
* @param lang The language to translate to
|
||||
* @param string The string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
@@ -85,12 +85,9 @@ namespace Language
|
||||
#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" \
|
||||
@@ -99,45 +96,34 @@ namespace Language
|
||||
#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.")
|
||||
#define CHAN_EXCEPTED _("\002%s\002 matches an except on %s and cannot be banned until the except has been removed.")
|
||||
#define MEMO_NEW_X_MEMO_ARRIVED _("There is a new memo on channel %s.\n" \
|
||||
"Type \002%s%s READ %s %d\002 to read it.")
|
||||
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s.\n" \
|
||||
"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")
|
||||
|
||||
|
||||
+4
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -67,9 +67,11 @@ 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(NickCore *nc);
|
||||
ListFormatter &AddColumn(const Anope::string &name);
|
||||
void AddEntry(const ListEntry &entry);
|
||||
bool IsEmpty() const;
|
||||
@@ -87,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
|
||||
|
||||
+34
-27
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -45,7 +45,8 @@ struct LogFile
|
||||
std::ofstream stream;
|
||||
|
||||
LogFile(const Anope::string &name);
|
||||
Anope::string GetName() const;
|
||||
~LogFile();
|
||||
const Anope::string &GetName() const;
|
||||
};
|
||||
|
||||
/* Represents a single log message */
|
||||
@@ -53,15 +54,15 @@ class CoreExport Log
|
||||
{
|
||||
public:
|
||||
/* Bot that should log this message */
|
||||
const BotInfo *bi;
|
||||
/* For commands, the user executing the command */
|
||||
Anope::string nick;
|
||||
BotInfo *bi;
|
||||
/* For commands, the user executing the command, but might not always exist */
|
||||
const User *u;
|
||||
/* For commands, the account executing teh command, but will not always exist */
|
||||
const NickCore *nc;
|
||||
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 */
|
||||
@@ -72,30 +73,34 @@ class CoreExport Log
|
||||
Module *m;
|
||||
LogType type;
|
||||
Anope::string category;
|
||||
std::list<Anope::string> sources;
|
||||
|
||||
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, 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(Module *m, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
~Log();
|
||||
|
||||
private:
|
||||
Anope::string FormatSource() const;
|
||||
Anope::string FormatCommand() const;
|
||||
|
||||
public:
|
||||
Anope::string BuildPrefix() const;
|
||||
|
||||
template<typename T> Log &operator<<(T val)
|
||||
@@ -109,17 +114,19 @@ class CoreExport Log
|
||||
class CoreExport LogInfo
|
||||
{
|
||||
public:
|
||||
std::list<Anope::string> targets;
|
||||
std::map<Anope::string, LogFile *> logfiles;
|
||||
std::list<Anope::string> sources;
|
||||
BotInfo *bot;
|
||||
std::vector<Anope::string> targets;
|
||||
std::vector<LogFile *> logfiles;
|
||||
int last_day;
|
||||
std::vector<Anope::string> sources;
|
||||
int log_age;
|
||||
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;
|
||||
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;
|
||||
|
||||
@@ -127,7 +134,7 @@ class CoreExport LogInfo
|
||||
|
||||
~LogInfo();
|
||||
|
||||
void AddType(std::list<Anope::string> &list, const Anope::string &type);
|
||||
void OpenLogFiles();
|
||||
|
||||
bool HasType(LogType ltype, const Anope::string &type) const;
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
namespace Mail
|
||||
{
|
||||
extern CoreExport bool Send(User *from, NickCore *to, const BotInfo *service, const Anope::string &subject, const Anope::string &message);
|
||||
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);
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+20
-6
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -9,14 +9,14 @@
|
||||
* 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
|
||||
{
|
||||
|
||||
@@ -40,6 +40,13 @@ namespace Message
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) 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> ¶ms) anope_override;
|
||||
};
|
||||
|
||||
struct CoreExport Join : IRCDMessage
|
||||
{
|
||||
@@ -75,7 +82,7 @@ namespace Message
|
||||
|
||||
struct CoreExport Mode : IRCDMessage
|
||||
{
|
||||
Mode(Module *creator, const Anope::string &mname = "MODE") : IRCDMessage(creator, mname, 2) { }
|
||||
Mode(Module *creator, const Anope::string &mname = "MODE") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_SOFT_LIMIT); }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override;
|
||||
};
|
||||
@@ -87,6 +94,13 @@ namespace Message
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) 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> ¶ms) 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); }
|
||||
@@ -117,7 +131,7 @@ namespace Message
|
||||
|
||||
struct CoreExport SQuit : IRCDMessage
|
||||
{
|
||||
SQuit(Module *creator, const Anope::string &mname = "SQUIT") : IRCDMessage(creator, mname, 2) { SetFlag(IRCDMESSAGE_REQUIRE_SERVER); }
|
||||
SQuit(Module *creator, const Anope::string &mname = "SQUIT") : IRCDMessage(creator, mname, 2) { }
|
||||
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms) anope_override;
|
||||
};
|
||||
|
||||
+93
-115
@@ -1,7 +1,7 @@
|
||||
/* Mode support
|
||||
*
|
||||
* Copyright (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* Copyright (C) 2008-2013 Anope Team <team@anope.org>
|
||||
* Copyright (C) 2008-2014 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
@@ -56,6 +56,11 @@ class CoreExport Mode : public Base
|
||||
*/
|
||||
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
|
||||
@@ -68,7 +73,6 @@ class CoreExport UserMode : public Mode
|
||||
* @param mc The mode char
|
||||
*/
|
||||
UserMode(const Anope::string &name, char mc);
|
||||
virtual ~UserMode();
|
||||
};
|
||||
|
||||
class CoreExport UserModeParam : public UserMode
|
||||
@@ -84,7 +88,7 @@ class CoreExport UserModeParam : public UserMode
|
||||
* @param value The param
|
||||
* @return true or false
|
||||
*/
|
||||
virtual bool IsValid(const Anope::string &value) const { return true; }
|
||||
virtual bool IsValid(Anope::string &value) const { return true; }
|
||||
};
|
||||
|
||||
/** This class is a channel mode, all channel modes use this/inherit from this
|
||||
@@ -92,20 +96,29 @@ class CoreExport UserModeParam : public UserMode
|
||||
class CoreExport ChannelMode : public Mode
|
||||
{
|
||||
public:
|
||||
/* channel modes that can posssibly unwrap this mode */
|
||||
std::vector<ChannelMode *> listeners;
|
||||
|
||||
/** constructor
|
||||
* @param name The mode name
|
||||
* @param mc The mode char
|
||||
*/
|
||||
ChannelMode(const Anope::string &name, char mc);
|
||||
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
|
||||
bool CanSet(User *u) const anope_override;
|
||||
|
||||
/** 'wrap' this channel mode and param to the underlying mode and param
|
||||
*/
|
||||
virtual bool CanSet(User *u) const;
|
||||
};
|
||||
virtual ChannelMode *Wrap(Anope::string ¶m);
|
||||
|
||||
/** 'unwrap' this mode to our internal representation
|
||||
*/
|
||||
ChannelMode *Unwrap(Anope::string ¶m);
|
||||
|
||||
/** called when a mode is being unwrapped, and is asking us if we can unwrap it
|
||||
*/
|
||||
virtual ChannelMode *Unwrap(ChannelMode *, Anope::string ¶m);
|
||||
};
|
||||
|
||||
/** This is a mode for lists, eg b/e/I. These modes should inherit from this
|
||||
*/
|
||||
@@ -118,15 +131,11 @@ class CoreExport ChannelModeList : public ChannelMode
|
||||
*/
|
||||
ChannelModeList(const Anope::string &name, char mc);
|
||||
|
||||
/** destructor
|
||||
*/
|
||||
virtual ~ChannelModeList();
|
||||
|
||||
/** Is the mask valid
|
||||
* @param mask The mask
|
||||
* @return true for yes, false for no
|
||||
*/
|
||||
virtual bool IsValid(const Anope::string &mask) const { return true; }
|
||||
virtual bool IsValid(Anope::string &mask) const;
|
||||
|
||||
/** Checks if mask affects user
|
||||
* Should only be used for extbans or other weird ircd-specific things.
|
||||
@@ -134,7 +143,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
|
||||
@@ -161,10 +170,6 @@ class CoreExport ChannelModeParam : public ChannelMode
|
||||
*/
|
||||
ChannelModeParam(const Anope::string &name, char mc, bool minus_no_arg = false);
|
||||
|
||||
/** destructor
|
||||
*/
|
||||
virtual ~ChannelModeParam();
|
||||
|
||||
/* Should we send an arg when unsetting this mode? */
|
||||
bool minus_no_arg;
|
||||
|
||||
@@ -172,7 +177,7 @@ class CoreExport ChannelModeParam : public ChannelMode
|
||||
* @param value The param
|
||||
* @return true for yes, false for no
|
||||
*/
|
||||
virtual bool IsValid(const Anope::string &value) const { return true; }
|
||||
virtual bool IsValid(Anope::string &value) const { return true; }
|
||||
};
|
||||
|
||||
/** This is a mode that is a channel status, eg +v/h/o/a/q.
|
||||
@@ -181,7 +186,7 @@ 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.
|
||||
*/
|
||||
@@ -190,25 +195,63 @@ class CoreExport ChannelModeStatus : public ChannelMode
|
||||
/** constructor
|
||||
* @param name The mode name
|
||||
* @param mc The mode char
|
||||
* @param mSymbol The symbol for the mode, eg @ %
|
||||
* @param msymbol The symbol for the mode, eg @ %
|
||||
* @param mlevel A level for the mode, which is usually determined by the PREFIX capab
|
||||
*/
|
||||
ChannelModeStatus(const Anope::string &name, char mc, char mSymbol, short mlevel = 0);
|
||||
ChannelModeStatus(const Anope::string &name, char mc, char msymbol, short mlevel);
|
||||
};
|
||||
|
||||
/** destructor
|
||||
*/
|
||||
virtual ~ChannelModeStatus();
|
||||
/** A virtual mode. This mode doesn't natively exist on the IRCd (like extbans),
|
||||
* but we still have a representation for it.
|
||||
*/
|
||||
template<typename T>
|
||||
class CoreExport ChannelModeVirtual : public T
|
||||
{
|
||||
Anope::string base;
|
||||
ChannelMode *basech;
|
||||
|
||||
public:
|
||||
ChannelModeVirtual(const Anope::string &mname, const Anope::string &basename);
|
||||
|
||||
~ChannelModeVirtual();
|
||||
|
||||
ChannelMode *Wrap(Anope::string ¶m) anope_override;
|
||||
|
||||
ChannelMode *Unwrap(ChannelMode *cm, Anope::string ¶m) = 0;
|
||||
};
|
||||
|
||||
/* The status a user has on a channel (+v, +h, +o) etc */
|
||||
class CoreExport ChannelStatus
|
||||
{
|
||||
Anope::string modes;
|
||||
public:
|
||||
std::set<Anope::string> modes;
|
||||
Anope::string BuildCharPrefixList() const;
|
||||
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)
|
||||
*/
|
||||
class CoreExport ChannelModeKey : public ChannelModeParam
|
||||
@@ -216,63 +259,30 @@ class CoreExport ChannelModeKey : public ChannelModeParam
|
||||
public:
|
||||
ChannelModeKey(char mc) : ChannelModeParam("KEY", mc) { }
|
||||
|
||||
bool IsValid(const Anope::string &value) const anope_override;
|
||||
bool IsValid(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 mc) : ChannelMode("ADMINONLY", mc) { }
|
||||
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 mc) : ChannelMode("OPERONLY", mc) { }
|
||||
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 mc) : ChannelMode("REGISTERED", mc) { }
|
||||
|
||||
/* 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 ¶m);
|
||||
};
|
||||
|
||||
/** This is the mode manager
|
||||
* It contains functions for adding modes to Anope so Anope can track them
|
||||
* and do things such as MLOCK.
|
||||
@@ -281,30 +291,11 @@ class StackerInfo
|
||||
*/
|
||||
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
|
||||
*/
|
||||
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;
|
||||
|
||||
/* Number of generic channel and user modes we are tracking */
|
||||
static unsigned GenericChannelModes;
|
||||
static unsigned GenericUserModes;
|
||||
/* Default channel mode lock */
|
||||
static std::list<std::pair<Anope::string, Anope::string> > ModeLockOn;
|
||||
static std::list<Anope::string> ModeLockOff;
|
||||
/* Default modes bots have on channels */
|
||||
static ChannelStatus DefaultBotModes;
|
||||
|
||||
/** Add a user mode to Anope
|
||||
* @param um A UserMode or UserMode derived class
|
||||
@@ -358,6 +349,11 @@ class CoreExport ModeManager
|
||||
*/
|
||||
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
|
||||
@@ -365,7 +361,7 @@ class CoreExport ModeManager
|
||||
* @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 ¶m = "");
|
||||
static void StackerAdd(BotInfo *bi, Channel *c, ChannelMode *cm, bool set, const Anope::string ¶m = "");
|
||||
|
||||
/** Add a mode to the stacker to be set on a user
|
||||
* @param bi The client to set the modes from
|
||||
@@ -374,7 +370,7 @@ class CoreExport ModeManager
|
||||
* @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 ¶m = "");
|
||||
static void StackerAdd(BotInfo *bi, User *u, UserMode *um, bool set, const Anope::string ¶m = "");
|
||||
|
||||
/** Process all of the modes in the stacker and send them to the IRCd to be set on channels/users
|
||||
*/
|
||||
@@ -385,25 +381,6 @@ class CoreExport ModeManager
|
||||
static void StackerDel(User *u);
|
||||
static void StackerDel(Channel *c);
|
||||
static void StackerDel(Mode *m);
|
||||
|
||||
/** Updates the default mode locks and default bot modes
|
||||
* @param config The configuration to read from. This is often called
|
||||
* during a config reload.
|
||||
*/
|
||||
static void UpdateDefaultMLock(ServerConfig *config);
|
||||
};
|
||||
|
||||
/** Entry flags
|
||||
*/
|
||||
enum EntryType
|
||||
{
|
||||
ENTRYTYPE_CIDR,
|
||||
ENTRYTYPE_NICK_WILD,
|
||||
ENTRYTYPE_NICK,
|
||||
ENTRYTYPE_USER_WILD,
|
||||
ENTRYTYPE_USER,
|
||||
ENTRYTYPE_HOST_WILD,
|
||||
ENTRYTYPE_HOST
|
||||
};
|
||||
|
||||
/** Represents a mask set on a channel (b/e/I)
|
||||
@@ -411,29 +388,30 @@ enum EntryType
|
||||
class CoreExport Entry
|
||||
{
|
||||
Anope::string name;
|
||||
public:
|
||||
std::set<EntryType> types;
|
||||
unsigned char cidr_len;
|
||||
Anope::string mask;
|
||||
Anope::string nick, user, host;
|
||||
public:
|
||||
unsigned short cidr_len;
|
||||
Anope::string nick, user, host, real;
|
||||
|
||||
/** Constructor
|
||||
* @param mode What mode this host is for, can be empty for unknown/no mode
|
||||
* @param host A full nick!ident@host/cidr mask
|
||||
* @param host A full or poartial nick!ident@host/cidr#real name mask
|
||||
*/
|
||||
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;
|
||||
|
||||
const Anope::string GetNUHMask() 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
|
||||
|
||||
+5
-5
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -12,7 +12,6 @@
|
||||
#ifndef MODULE_H
|
||||
#define MODULE_H
|
||||
|
||||
/* Just include everything for now */
|
||||
#include "access.h"
|
||||
#include "account.h"
|
||||
#include "anope.h"
|
||||
@@ -47,8 +46,9 @@
|
||||
#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
|
||||
|
||||
+328
-285
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2014 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;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2014 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;
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*/
|
||||
|
||||
struct EntryMsg
|
||||
{
|
||||
Anope::string chan;
|
||||
Anope::string creator;
|
||||
Anope::string message;
|
||||
time_t when;
|
||||
|
||||
virtual ~EntryMsg() { }
|
||||
protected:
|
||||
EntryMsg() { }
|
||||
};
|
||||
|
||||
struct EntryMessageList : Serialize::Checker<std::vector<EntryMsg *> >
|
||||
{
|
||||
protected:
|
||||
EntryMessageList() : Serialize::Checker<std::vector<EntryMsg *> >("EntryMsg") { }
|
||||
|
||||
public:
|
||||
virtual ~EntryMessageList()
|
||||
{
|
||||
for (unsigned i = (*this)->size(); i > 0; --i)
|
||||
delete (*this)->at(i - 1);
|
||||
}
|
||||
|
||||
virtual EntryMsg* Create() = 0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2014 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;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2014 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 ¶m, 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 ¶m = "", 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 ¶m = "") = 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 ¶m = "") = 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;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -34,15 +34,18 @@ namespace DNS
|
||||
/* IPv6 AAAA lookup */
|
||||
QUERY_AAAA = 28,
|
||||
/* Zone transfer */
|
||||
QUERY_AXFR = 252
|
||||
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,
|
||||
@@ -76,9 +79,18 @@ namespace DNS
|
||||
|
||||
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 : public Question
|
||||
struct ResourceRecord : Question
|
||||
{
|
||||
unsigned int ttl;
|
||||
Anope::string rdata;
|
||||
@@ -98,16 +110,6 @@ namespace DNS
|
||||
Query(const Question &q) : error(ERROR_NONE) { questions.push_back(q); }
|
||||
};
|
||||
|
||||
class Packet : public Query
|
||||
{
|
||||
public:
|
||||
static const int POINTER = 0xC0;
|
||||
static const int LABEL = 0x3F;
|
||||
static const int HEADER_LENGTH = 12;
|
||||
|
||||
virtual ~Packet() { }
|
||||
};
|
||||
|
||||
class ReplySocket;
|
||||
class Request;
|
||||
|
||||
@@ -125,6 +127,7 @@ namespace DNS
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -131,11 +131,12 @@ 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) : ListenSocket(i, p, i.find(':') != Anope::string::npos), Service(c, "HTTPProvider", n), 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
|
||||
{
|
||||
@@ -147,6 +148,11 @@ class HTTPProvider : public ListenSocket, public Service
|
||||
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;
|
||||
@@ -0,0 +1,71 @@
|
||||
/* NickServ core functions
|
||||
*
|
||||
* (C) 2003-2014 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;
|
||||
};
|
||||
|
||||
class CertService : public Service
|
||||
{
|
||||
public:
|
||||
CertService(Module *c) : Service(c, "CertService", "certs") { }
|
||||
|
||||
virtual NickCore* FindAccountFromCert(const Anope::string &cert) = 0;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
#ifndef OS_FORBID_H
|
||||
#define OS_FORBID_H
|
||||
|
||||
enum ForbidType
|
||||
{
|
||||
FT_NICK = 1,
|
||||
FT_CHAN,
|
||||
FT_EMAIL,
|
||||
FT_REGISTER,
|
||||
FT_SIZE
|
||||
};
|
||||
|
||||
struct ForbidData
|
||||
{
|
||||
Anope::string mask;
|
||||
Anope::string creator;
|
||||
Anope::string reason;
|
||||
time_t created;
|
||||
time_t expires;
|
||||
ForbidType type;
|
||||
|
||||
virtual ~ForbidData() { }
|
||||
protected:
|
||||
ForbidData() : created(0), expires(0) { }
|
||||
};
|
||||
|
||||
class ForbidService : public Service
|
||||
{
|
||||
public:
|
||||
ForbidService(Module *m) : Service(m, "ForbidService", "forbid") { }
|
||||
|
||||
virtual void AddForbid(ForbidData *d) = 0;
|
||||
|
||||
virtual void RemoveForbid(ForbidData *d) = 0;
|
||||
|
||||
virtual ForbidData* CreateForbid() = 0;
|
||||
|
||||
virtual ForbidData *FindForbid(const Anope::string &mask, ForbidType type) = 0;
|
||||
|
||||
virtual std::vector<ForbidData *> GetForbids() = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid");
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/* OperServ ignore interface
|
||||
*
|
||||
* (C) 2003-2014 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 IgnoreData
|
||||
{
|
||||
Anope::string mask;
|
||||
Anope::string creator;
|
||||
Anope::string reason;
|
||||
time_t time; /* When do we stop ignoring them? */
|
||||
|
||||
virtual ~IgnoreData() { }
|
||||
protected:
|
||||
IgnoreData() : time(0) { }
|
||||
};
|
||||
|
||||
class IgnoreService : public Service
|
||||
{
|
||||
protected:
|
||||
IgnoreService(Module *c) : Service(c, "IgnoreService", "ignore") { }
|
||||
|
||||
public:
|
||||
virtual void AddIgnore(IgnoreData *) = 0;
|
||||
|
||||
virtual void DelIgnore(IgnoreData *) = 0;
|
||||
|
||||
virtual void ClearIgnores() = 0;
|
||||
|
||||
virtual IgnoreData *Create() = 0;
|
||||
|
||||
virtual IgnoreData *Find(const Anope::string &mask) = 0;
|
||||
|
||||
virtual std::vector<IgnoreData *> &GetIgnores() = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<IgnoreService> ignore_service("IgnoreService", "ignore");
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
#ifndef OS_NEWS
|
||||
#define OS_NEWS
|
||||
|
||||
enum NewsType
|
||||
{
|
||||
NEWS_LOGON,
|
||||
NEWS_RANDOM,
|
||||
NEWS_OPER
|
||||
};
|
||||
|
||||
struct NewsMessages
|
||||
{
|
||||
NewsType type;
|
||||
Anope::string name;
|
||||
const char *msgs[10];
|
||||
};
|
||||
|
||||
struct NewsItem : Serializable
|
||||
{
|
||||
NewsType type;
|
||||
Anope::string text;
|
||||
Anope::string who;
|
||||
time_t time;
|
||||
|
||||
NewsItem() : Serializable("NewsItem") { }
|
||||
};
|
||||
|
||||
class NewsService : public Service
|
||||
{
|
||||
public:
|
||||
NewsService(Module *m) : Service(m, "NewsService", "news") { }
|
||||
|
||||
virtual NewsItem *CreateNewsItem() = 0;
|
||||
|
||||
virtual void AddNewsItem(NewsItem *n) = 0;
|
||||
|
||||
virtual void DelNewsItem(NewsItem *n) = 0;
|
||||
|
||||
virtual std::vector<NewsItem *> &GetNewsList(NewsType t) = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<NewsService> news_service("NewsService", "news");
|
||||
|
||||
#endif // OS_NEWS
|
||||
|
||||
@@ -7,7 +7,7 @@ struct 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) { }
|
||||
Session(const sockaddrs &ip, int len) : addr(ip, len), count(1), hits(0) { }
|
||||
};
|
||||
|
||||
struct Exception : Serializable
|
||||
@@ -27,11 +27,13 @@ struct Exception : Serializable
|
||||
class SessionService : public Service
|
||||
{
|
||||
public:
|
||||
typedef std::tr1::unordered_map<cidr, Session *, cidr::hash> SessionMap;
|
||||
typedef TR1NS::unordered_map<cidr, Session *, cidr::hash> SessionMap;
|
||||
typedef std::vector<Exception *> ExceptionVector;
|
||||
|
||||
SessionService(Module *m) : Service(m, "SessionService", "session") { }
|
||||
|
||||
virtual Exception *CreateException() = 0;
|
||||
|
||||
virtual void AddException(Exception *e) = 0;
|
||||
|
||||
virtual void DelException(Exception *e) = 0;
|
||||
@@ -42,11 +44,7 @@ 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;
|
||||
};
|
||||
@@ -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,14 +4,16 @@
|
||||
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;
|
||||
};
|
||||
|
||||
#endif // GLOBAL_H
|
||||
@@ -12,7 +12,9 @@ class MemoServService : public Service
|
||||
MEMO_TARGET_FULL
|
||||
};
|
||||
|
||||
MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ") { }
|
||||
MemoServService(Module *m) : Service(m, "MemoServService", "MemoServ")
|
||||
{
|
||||
}
|
||||
|
||||
/** Sends a memo.
|
||||
* @param source The source of the memo, can be anythin.
|
||||
@@ -4,10 +4,13 @@
|
||||
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 Login(User *u, NickAlias *na) = 0;
|
||||
virtual void Collide(User *u, NickAlias *na) = 0;
|
||||
virtual void Release(NickAlias *na) = 0;
|
||||
};
|
||||
|
||||
#endif // NICKSERV_H
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2014 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;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
namespace SASL
|
||||
{
|
||||
struct Message
|
||||
{
|
||||
Anope::string source;
|
||||
Anope::string target;
|
||||
Anope::string type;
|
||||
Anope::string data;
|
||||
Anope::string ext;
|
||||
};
|
||||
|
||||
class Mechanism;
|
||||
struct Session;
|
||||
|
||||
class Service : public ::Service
|
||||
{
|
||||
public:
|
||||
Service(Module *o) : ::Service(o, "SASL::Service", "sasl") { }
|
||||
|
||||
virtual void ProcessMessage(const Message &) = 0;
|
||||
|
||||
virtual Anope::string GetAgent() = 0;
|
||||
|
||||
virtual Session* GetSession(const Anope::string &uid) = 0;
|
||||
|
||||
virtual void SendMessage(SASL::Session *session, const Anope::string &type, const Anope::string &data) = 0;
|
||||
|
||||
virtual void Succeed(Session *, NickCore *) = 0;
|
||||
virtual void Fail(Session *) = 0;
|
||||
virtual void SendMechs(Session *) = 0;
|
||||
virtual void DeleteSessions(Mechanism *, bool = false) = 0;
|
||||
virtual void RemoveSession(Session *) = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<SASL::Service> sasl("SASL::Service", "sasl");
|
||||
|
||||
struct Session
|
||||
{
|
||||
time_t created;
|
||||
Anope::string uid;
|
||||
Reference<Mechanism> mech;
|
||||
|
||||
Session(Mechanism *m, const Anope::string &u) : created(Anope::CurTime), uid(u), mech(m) { }
|
||||
virtual ~Session()
|
||||
{
|
||||
if (sasl)
|
||||
sasl->RemoveSession(this);
|
||||
}
|
||||
};
|
||||
|
||||
/* PLAIN, EXTERNAL, etc */
|
||||
class Mechanism : public ::Service
|
||||
{
|
||||
public:
|
||||
Mechanism(Module *o, const Anope::string &sname) : Service(o, "SASL::Mechanism", sname) { }
|
||||
|
||||
virtual Session* CreateSession(const Anope::string &uid) { return new Session(this, uid); }
|
||||
|
||||
virtual void ProcessMessage(Session *session, const Message &) = 0;
|
||||
|
||||
virtual ~Mechanism()
|
||||
{
|
||||
if (sasl)
|
||||
sasl->DeleteSessions(this, true);
|
||||
}
|
||||
};
|
||||
|
||||
class IdentifyRequest : public ::IdentifyRequest
|
||||
{
|
||||
Anope::string uid;
|
||||
|
||||
public:
|
||||
IdentifyRequest(Module *m, const Anope::string &id, const Anope::string &acc, const Anope::string &pass) : ::IdentifyRequest(m, acc, pass), uid(id) { }
|
||||
|
||||
void OnSuccess() anope_override
|
||||
{
|
||||
if (!sasl)
|
||||
return;
|
||||
|
||||
NickAlias *na = NickAlias::Find(GetAccount());
|
||||
if (!na || na->nc->HasExt("NS_SUSPENDED"))
|
||||
return OnFail();
|
||||
|
||||
Session *s = sasl->GetSession(uid);
|
||||
if (s)
|
||||
{
|
||||
Log(Config->GetClient("NickServ")) << "A user identified to account " << this->GetAccount() << " using SASL";
|
||||
sasl->Succeed(s, na->nc);
|
||||
delete s;
|
||||
}
|
||||
}
|
||||
|
||||
void OnFail() anope_override
|
||||
{
|
||||
if (!sasl)
|
||||
return;
|
||||
|
||||
Session *s = sasl->GetSession(uid);
|
||||
if (s)
|
||||
{
|
||||
sasl->Fail(s);
|
||||
delete s;
|
||||
}
|
||||
|
||||
Anope::string accountstatus;
|
||||
NickAlias *na = NickAlias::Find(GetAccount());
|
||||
if (!na)
|
||||
accountstatus = "nonexistent ";
|
||||
else if (na->nc->HasExt("NS_SUSPENDED"))
|
||||
accountstatus = "suspended ";
|
||||
|
||||
Log(Config->GetClient("NickServ")) << "A user failed to identify for " << accountstatus << "account " << this->GetAccount() << " using SASL";
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
struct MiscData
|
||||
{
|
||||
Anope::string object;
|
||||
Anope::string name;
|
||||
Anope::string data;
|
||||
|
||||
MiscData() { }
|
||||
virtual ~MiscData() { }
|
||||
};
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* (C) 2003-2014 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 SuspendInfo
|
||||
{
|
||||
Anope::string what, by, reason;
|
||||
time_t when, expires;
|
||||
|
||||
SuspendInfo() { }
|
||||
virtual ~SuspendInfo() { }
|
||||
};
|
||||
+4
-5
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* Copyright (C) 2008-2013 Anope Team <team@anope.org>
|
||||
* Copyright (C) 2008-2014 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
@@ -25,15 +25,14 @@ struct CoreExport Oper
|
||||
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), require_oper(false), config(false) { }
|
||||
Oper(const Anope::string &n, OperType *o);
|
||||
virtual ~Oper();
|
||||
|
||||
virtual ~Oper() { }
|
||||
static std::vector<Oper *> opers;
|
||||
|
||||
/** Find an oper block by name
|
||||
* @param name The name
|
||||
|
||||
+67
-45
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -27,20 +27,22 @@ class CoreExport IRCDProto : public Service
|
||||
public:
|
||||
virtual ~IRCDProto();
|
||||
|
||||
virtual void SendSVSKillInternal(const BotInfo *, 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 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();
|
||||
virtual void Parse(const Anope::string &, Anope::string &, Anope::string &, std::vector<Anope::string> &);
|
||||
virtual Anope::string Format(const Anope::string &source, const Anope::string &message);
|
||||
|
||||
/* Modes used by default by our clients */
|
||||
Anope::string DefaultPseudoclientModes;
|
||||
/* Can we force change a users's nick? */
|
||||
@@ -65,8 +67,16 @@ class CoreExport IRCDProto : public Service
|
||||
bool CanCertFP;
|
||||
/* Whether this IRCd requires unique IDs for each user or server. See TS6/P10. */
|
||||
bool RequiresID;
|
||||
/* If this IRCd has unique ids, whether the IDs and nicknames are ambiguous */
|
||||
bool AmbiguousID;
|
||||
/* 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;
|
||||
|
||||
/* Retrieves the next free UID or SID */
|
||||
virtual Anope::string UID_Retrieve();
|
||||
virtual Anope::string SID_Retrieve();
|
||||
|
||||
/** Sets the server in NOOP mode. If NOOP mode is enabled, no users
|
||||
* will be able to oper on the server.
|
||||
@@ -79,7 +89,7 @@ class CoreExport IRCDProto : public Service
|
||||
* @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(BotInfo *, Channel *);
|
||||
virtual void SendTopic(const MessageSource &, Channel *);
|
||||
|
||||
/** Sets a vhost on a user.
|
||||
* @param u The user
|
||||
@@ -110,34 +120,34 @@ class CoreExport IRCDProto : public Service
|
||||
virtual void SendSQLine(User *, const XLine *x) { }
|
||||
virtual void SendSQLineDel(const XLine *x) { }
|
||||
|
||||
virtual void SendKill(const MessageSource &source, const Anope::string &target, const Anope::string &reason);
|
||||
|
||||
/** Kills a user
|
||||
* @param source The client used to kill the user, if any
|
||||
* @param source Who is doing the kill
|
||||
* @param user The user to be killed
|
||||
* @param fmt Kill reason
|
||||
*/
|
||||
virtual void SendSVSKill(const BotInfo *source, User *user, const char *fmt, ...);
|
||||
virtual void SendSVSKill(const MessageSource &source, 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 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(const User *u) = 0;
|
||||
virtual void SendClientIntroduction(User *u) = 0;
|
||||
|
||||
virtual void SendKick(const BotInfo *bi, const Channel *chan, const User *user, const char *fmt, ...);
|
||||
virtual void SendKick(const MessageSource &source, const Channel *chan, User *user, const char *fmt, ...);
|
||||
|
||||
/* Sends a message using SendPrivmsg or SendNotice, depending on the default message method. */
|
||||
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 SendPrivmsg(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 SendCTCP(const BotInfo *bi, const Anope::string &dest, 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(const BotInfo *bi, const Server *dest, const Anope::string &msg) = 0;
|
||||
virtual void SendGlobalPrivmsg(const BotInfo *bi, const Server *desc, const Anope::string &msg) = 0;
|
||||
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(const User *u, const char *fmt, ...);
|
||||
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);
|
||||
|
||||
@@ -148,8 +158,8 @@ class CoreExport IRCDProto : public Service
|
||||
* 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(const User *u, Channel *c, const ChannelStatus *status) = 0;
|
||||
virtual void SendPart(const BotInfo *bi, const Channel *chan, const char *fmt, ...);
|
||||
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
|
||||
@@ -157,30 +167,30 @@ class CoreExport IRCDProto : public Service
|
||||
* @param chan The channel to join the user to
|
||||
* @param param Channel key?
|
||||
*/
|
||||
virtual void SendSVSJoin(const BotInfo *bi, const User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
virtual void SendSVSJoin(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
|
||||
/** Force parts a user that isn't ours from a channel.
|
||||
* @param bi The source of the message
|
||||
* @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 BotInfo *bi, const User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
virtual void SendSVSPart(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
|
||||
virtual void SendInvite(const BotInfo *bi, const Channel *c, const User *u);
|
||||
virtual void SendGlobops(const BotInfo *source, const char *fmt, ...);
|
||||
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(const BotInfo *, const Anope::string &, const Anope::string &) { }
|
||||
virtual void SendSVSO(BotInfo *, const Anope::string &, const Anope::string &) { }
|
||||
|
||||
/** Sends a nick change of one of our clients.
|
||||
*/
|
||||
virtual void SendNickChange(const User *u, const Anope::string &newnick);
|
||||
virtual void SendNickChange(User *u, const Anope::string &newnick);
|
||||
|
||||
/** Forces a nick change of a user that isn't ours (SVSNICK)
|
||||
*/
|
||||
virtual void SendForceNickChange(const User *u, const Anope::string &newnick, time_t when);
|
||||
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.
|
||||
@@ -193,10 +203,10 @@ class CoreExport IRCDProto : public Service
|
||||
virtual void SendBOB() { }
|
||||
virtual void SendEOB() { }
|
||||
|
||||
virtual void SendSVSHold(const Anope::string &) { }
|
||||
virtual void SendSVSHold(const Anope::string &, time_t) { }
|
||||
virtual void SendSVSHoldDel(const Anope::string &) { }
|
||||
|
||||
virtual void SendSWhois(const BotInfo *bi, const Anope::string &, const Anope::string &) { }
|
||||
virtual void SendSWhois(const MessageSource &, const Anope::string &, const Anope::string &) { }
|
||||
|
||||
/** Introduces a server to the uplink
|
||||
*/
|
||||
@@ -205,7 +215,7 @@ class CoreExport IRCDProto : public Service
|
||||
|
||||
virtual void SendNumeric(int numeric, const Anope::string &dest, const char *fmt, ...);
|
||||
|
||||
virtual void SendLogin(User *u) = 0;
|
||||
virtual void SendLogin(User *u, NickAlias *na) = 0;
|
||||
virtual void SendLogout(User *u) = 0;
|
||||
|
||||
/** Send a channel creation message to the uplink.
|
||||
@@ -218,10 +228,21 @@ class CoreExport IRCDProto : public Service
|
||||
*/
|
||||
virtual void SendOper(User *u);
|
||||
|
||||
virtual void SendSASLMessage(const SASL::Message &) { }
|
||||
virtual void SendSVSLogin(const Anope::string &uid, const Anope::string &acc) { }
|
||||
|
||||
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);
|
||||
|
||||
virtual Anope::string NormalizeMask(const Anope::string &mask);
|
||||
};
|
||||
|
||||
class CoreExport MessageSource
|
||||
@@ -234,10 +255,11 @@ class CoreExport MessageSource
|
||||
MessageSource(const Anope::string &);
|
||||
MessageSource(User *u);
|
||||
MessageSource(Server *s);
|
||||
const Anope::string GetName();
|
||||
const Anope::string &GetSource();
|
||||
User *GetUser();
|
||||
Server *GetServer();
|
||||
const Anope::string &GetName() const;
|
||||
const Anope::string &GetSource() const;
|
||||
User *GetUser() const;
|
||||
BotInfo *GetBot() const;
|
||||
Server *GetServer() const;
|
||||
};
|
||||
|
||||
enum IRCDMessageFlag
|
||||
|
||||
+19
-225
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2013 Anope Team
|
||||
* (C) 2008-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -22,49 +22,6 @@ typedef Anope::hash_map<ChannelInfo *> registered_channel_map;
|
||||
|
||||
extern CoreExport Serialize::Checker<registered_channel_map> RegisteredChannelList;
|
||||
|
||||
/* 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
|
||||
};
|
||||
|
||||
/** 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
|
||||
{
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
Anope::string word;
|
||||
BadWordType type;
|
||||
|
||||
BadWord();
|
||||
~BadWord();
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
/* AutoKick data. */
|
||||
class CoreExport AutoKick : public Serializable
|
||||
{
|
||||
@@ -86,93 +43,22 @@ class CoreExport AutoKick : public Serializable
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
struct CoreExport ModeLock : Serializable
|
||||
{
|
||||
public:
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
bool set;
|
||||
Anope::string name;
|
||||
Anope::string param;
|
||||
Anope::string setter;
|
||||
time_t created;
|
||||
|
||||
ModeLock(ChannelInfo *ch, bool s, const Anope::string &n, const Anope::string &p, const Anope::string &se = "", time_t c = Anope::CurTime);
|
||||
~ModeLock();
|
||||
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
struct CoreExport LogSetting : Serializable
|
||||
{
|
||||
Serialize::Reference<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;
|
||||
|
||||
LogSetting() : Serializable("LogSetting") { }
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &);
|
||||
};
|
||||
|
||||
/* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*
|
||||
* Possible flags:
|
||||
* TOPICLOCK - Topic can only be changed by TOPIC SET
|
||||
* RESTRICTED - Only users on the access list may join
|
||||
* PEACE - Don't allow ChanServ and BotServ commands to do bad things to users with higher access levels
|
||||
* SECURE - Don't allow any privileges
|
||||
* NO_EXPIRE - Channel does not expire
|
||||
* MEMO_HARDMAX - Channel memo limit may not be changed
|
||||
* SECUREFOUNDER - Stricter control of channel founder status
|
||||
* SIGNKICK - Sign kicks with the user who did the kick
|
||||
* SIGNKICK_LEVEL - Sign kicks if level is < than the one defined by the SIGNKICK level
|
||||
* SUSPENDED - Channel is suepended
|
||||
* PERSIST - Channel still exists when empited (perm channel mode or leaving a botserv bot).
|
||||
* STATS - Chanstats are enabled
|
||||
* NOAUTOOP - If set users are not auto given any status on join
|
||||
*
|
||||
* BotServ flags:
|
||||
* BS_DONTKICKOPS - BotServ won't kick ops
|
||||
* BS_DONTKICKVOICES - BotServ won't kick voices
|
||||
* BS_FANTASY - BotServ bot accepts fantasy commands
|
||||
* BS_GREET - BotServ should show greets
|
||||
* BS_NOBOT - BotServ bots are not allowed to be in this channel
|
||||
* BS_KICK_BOLDS - BotServ kicks for bolds
|
||||
* BS_KICK_COLORS - BotServ kicks for colors
|
||||
* BS_KICK_REVERSES - BotServ kicks for reverses
|
||||
* BS_KICK_UNDERLINES - BotServ kicks for underlines
|
||||
* BS_KICK_BADWORD - BotServ kicks for badwords
|
||||
* BS_KICK_CAPS - BotServ kicks for caps
|
||||
* BS_KICK_FLOOD - BotServ kicks for flood
|
||||
* BS_KICK_REPEAT - BotServ kicks for repeating
|
||||
* BS_KICK_ITALICS - BotServ kicks for italics
|
||||
* BS_KICK_AMSGS - BotServ kicks for amsgs
|
||||
*/
|
||||
class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
{
|
||||
/* channels who reference this one */
|
||||
Anope::map<int> references;
|
||||
private:
|
||||
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 */
|
||||
Serialize::Checker<std::vector<BadWord *> > badwords; /* List of badwords */
|
||||
std::map<Anope::string, int16_t> levels;
|
||||
Anope::map<int16_t> levels;
|
||||
|
||||
public:
|
||||
friend class ChanAccess;
|
||||
friend class AutoKick;
|
||||
friend struct BadWord;
|
||||
|
||||
typedef std::multimap<Anope::string, ModeLock *> ModeList;
|
||||
Serialize::Checker<ModeList> mode_locks;
|
||||
Serialize::Checker<std::vector<LogSetting *> > log_settings;
|
||||
|
||||
Anope::string name; /* Channel name */
|
||||
Anope::string desc;
|
||||
@@ -184,6 +70,8 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
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;
|
||||
@@ -192,11 +80,8 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
|
||||
/* For BotServ */
|
||||
Serialize::Reference<BotInfo> bi; /* Bot used on this channel */
|
||||
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 */
|
||||
time_t banexpire; /* Time bans expire in */
|
||||
|
||||
/** Constructor
|
||||
* @param chname The channel name
|
||||
@@ -204,7 +89,7 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
ChannelInfo(const Anope::string &chname);
|
||||
|
||||
/** Copy constructor
|
||||
* @param ci The ChannelInfo to copy settings to
|
||||
* @param ci The ChannelInfo to copy settings from
|
||||
*/
|
||||
ChannelInfo(const ChannelInfo &ci);
|
||||
|
||||
@@ -256,13 +141,18 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
*/
|
||||
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);
|
||||
ChanAccess *EraseAccess(unsigned index);
|
||||
|
||||
/** Clear the entire channel access list
|
||||
*
|
||||
@@ -308,106 +198,6 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
*/
|
||||
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 ¶m, 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 ¶m = "", 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 ¶m = "");
|
||||
|
||||
void RemoveMLock(ModeLock *mlock);
|
||||
|
||||
/** 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(const Anope::string &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(const Anope::string &mname, const Anope::string ¶m = "");
|
||||
|
||||
/** 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
|
||||
@@ -442,6 +232,10 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
* @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);
|
||||
};
|
||||
|
||||
/** Is the user the real founder?
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+6
-3
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -80,7 +80,10 @@ class CoreExport Serializable : public virtual Base
|
||||
virtual ~Serializable();
|
||||
|
||||
/* Unique ID (per type, not globally) for this object */
|
||||
unsigned int id;
|
||||
uint64_t id;
|
||||
|
||||
/* Only used by redis, to ignore updates */
|
||||
unsigned short redis_ignore;
|
||||
|
||||
/** Marks the object as potentially being updated "soon".
|
||||
*/
|
||||
@@ -129,7 +132,7 @@ class CoreExport Serialize::Type
|
||||
|
||||
public:
|
||||
/* Map of Serializable::id to Serializable objects */
|
||||
std::map<unsigned int, Serializable *> objects;
|
||||
std::map<uint64_t, Serializable *> objects;
|
||||
|
||||
/** Creates a new serializable type
|
||||
* @param n Type name
|
||||
|
||||
+19
-9
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -23,16 +23,16 @@ extern CoreExport Server *Me;
|
||||
|
||||
namespace Servers
|
||||
{
|
||||
/* Retrieves the next free TS6 UID or SID */
|
||||
extern CoreExport const Anope::string TS6_UID_Retrieve();
|
||||
extern CoreExport const Anope::string TS6_SID_Retrieve();
|
||||
|
||||
/* 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;
|
||||
}
|
||||
@@ -58,7 +58,8 @@ class CoreExport Server : public Extensible
|
||||
bool syncing;
|
||||
/* The server is juped */
|
||||
bool juped;
|
||||
|
||||
/* The server is about to quit */
|
||||
bool quitting;
|
||||
/* Reason this server was quit */
|
||||
Anope::string quit_reason;
|
||||
|
||||
@@ -117,6 +118,10 @@ class CoreExport Server : public Extensible
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -161,18 +166,23 @@ class CoreExport Server : public Extensible
|
||||
*/
|
||||
bool IsJuped() const;
|
||||
|
||||
/** Check if the server is quitting
|
||||
* @return true if this server is quitting.
|
||||
*/
|
||||
bool IsQuitting() 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
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -15,12 +15,12 @@
|
||||
|
||||
#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).
|
||||
* that publish a service (m_ssl_openssl, etc).
|
||||
*/
|
||||
class CoreExport Service : public virtual Base
|
||||
{
|
||||
@@ -148,7 +148,7 @@ class ServiceReference : public Reference<T>
|
||||
* 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));
|
||||
this->ref = static_cast<T *>(::Service::FindService(this->type, this->name));
|
||||
if (this->ref)
|
||||
this->ref->AddReference(this);
|
||||
}
|
||||
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <bitset>
|
||||
#include <set>
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
||||
|
||||
#include "defs.h"
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -41,6 +41,11 @@ class CoreExport SocketEngine
|
||||
/** Read from sockets and do things
|
||||
*/
|
||||
static void Process();
|
||||
|
||||
static int GetLastError();
|
||||
static void SetLastError(int);
|
||||
|
||||
static bool IgnoreErrno();
|
||||
};
|
||||
|
||||
#endif // SOCKETENGINE_H
|
||||
|
||||
+10
-9
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -54,9 +54,12 @@ 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;
|
||||
bool valid() const;
|
||||
|
||||
/** Compares with sockaddr with another. Compares address type, port, and address
|
||||
* @return true if they are the same
|
||||
@@ -85,12 +88,14 @@ 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);
|
||||
cidr(const sockaddrs &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;
|
||||
@@ -341,7 +346,7 @@ class CoreExport BinarySocket : public virtual Socket
|
||||
|
||||
/** Write data to the socket
|
||||
* @param buffer The data to write
|
||||
* @param l The length of the data
|
||||
* @param l The length of the data; if 0 then this function returns without doing anything
|
||||
*/
|
||||
virtual void Write(const char *buffer, size_t l);
|
||||
void Write(const char *message, ...);
|
||||
@@ -385,10 +390,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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+21
-4
@@ -1,6 +1,6 @@
|
||||
/* Timer include stuff.
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -18,6 +18,10 @@
|
||||
class CoreExport Timer
|
||||
{
|
||||
private:
|
||||
/** The owner of the timer, if any
|
||||
*/
|
||||
Module *owner;
|
||||
|
||||
/** The time this was created
|
||||
*/
|
||||
time_t settime;
|
||||
@@ -42,6 +46,14 @@ class CoreExport Timer
|
||||
*/
|
||||
Timer(long time_from_now, time_t now = Anope::CurTime, bool repeating = false);
|
||||
|
||||
/** 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();
|
||||
@@ -76,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
|
||||
*/
|
||||
@@ -90,7 +107,7 @@ 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
|
||||
@@ -107,9 +124,9 @@ class CoreExport TimerManager
|
||||
*/
|
||||
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
|
||||
|
||||
+4
-7
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -14,6 +14,7 @@
|
||||
#define UPLINK_H
|
||||
|
||||
#include "sockets.h"
|
||||
#include "protocol.h"
|
||||
|
||||
namespace Uplink
|
||||
{
|
||||
@@ -33,16 +34,12 @@ class UplinkSocket : public ConnectionSocket, public BufferedSocket
|
||||
/* A message sent over the uplink socket */
|
||||
class CoreExport Message
|
||||
{
|
||||
private:
|
||||
/* The source of the message, can be a server (Me), or any user (one of our bots) */
|
||||
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)
|
||||
{
|
||||
|
||||
+43
-34
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "serialize.h"
|
||||
#include "commands.h"
|
||||
#include "account.h"
|
||||
#include "sockets.h"
|
||||
|
||||
typedef Anope::hash_map<User *> user_map;
|
||||
|
||||
@@ -36,6 +37,9 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
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;
|
||||
@@ -43,7 +47,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
/* 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) */
|
||||
std::map<Anope::string, Anope::string> modes;
|
||||
ModeList modes;
|
||||
/* NickCore account the user is currently loggged in as, if they are logged in */
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
@@ -68,7 +72,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
/* SSL Fingerprint */
|
||||
Anope::string fingerprint;
|
||||
/* User's IP */
|
||||
Anope::string ip;
|
||||
sockaddrs ip;
|
||||
/* Server user is connected to */
|
||||
Server *server;
|
||||
/* When the user signed on. Set on connect and never modified. */
|
||||
@@ -79,7 +83,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
bool super_admin;
|
||||
|
||||
/* Channels the user is in */
|
||||
typedef std::list<ChanUserContainer *> ChanUserList;
|
||||
typedef std::map<Channel *, ChanUserContainer *> ChanUserList;
|
||||
ChanUserList chans;
|
||||
|
||||
/* Last time this user sent a memo command used */
|
||||
@@ -89,6 +93,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
/* Last time this user sent an email */
|
||||
time_t lastmail;
|
||||
|
||||
protected:
|
||||
/** Create a new user object, initialising necessary fields and
|
||||
* adds it to the hash
|
||||
*
|
||||
@@ -99,18 +104,20 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
* @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 ts 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 &svhost, const Anope::string &sip, Server *sserver, const Anope::string &srealname, time_t ssignon, const Anope::string &smodes, 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 ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
|
||||
|
||||
protected:
|
||||
/** Destroy a user.
|
||||
*/
|
||||
virtual ~User();
|
||||
|
||||
public:
|
||||
static User* OnIntroduce(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 ts, const Anope::string &smodes, const Anope::string &suid, NickCore *nc);
|
||||
|
||||
/** Update the nickname of a user record accordingly, should be
|
||||
* called from ircd protocol.
|
||||
* @param newnick The new username
|
||||
@@ -184,24 +191,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);
|
||||
|
||||
@@ -212,7 +214,7 @@ 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 check_nick True to check if the user is identified to the nickname they are on too
|
||||
@@ -221,10 +223,10 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
bool IsIdentified(bool check_nick = false) const;
|
||||
|
||||
/** Check if the user is recognized for their nick (on the nicks access list)
|
||||
* @param check_nick 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 check_nick = true) const;
|
||||
bool IsRecognized(bool check_secure = true) const;
|
||||
|
||||
/** Check if the user is a services oper
|
||||
* @return true if they are an oper
|
||||
@@ -254,82 +256,89 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
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 ¶m = "");
|
||||
void SetModeInternal(const MessageSource &setter, UserMode *um, const Anope::string ¶m = "");
|
||||
|
||||
/** 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 ¶m = "");
|
||||
void SetMode(BotInfo *bi, UserMode *um, const Anope::string ¶m = "");
|
||||
|
||||
/** Set a mode on the user
|
||||
* @param bi The client setting the mode
|
||||
* @param name The mode name
|
||||
* @param Param Optional param for the mode
|
||||
*/
|
||||
void SetMode(const BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "");
|
||||
void SetMode(BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "");
|
||||
|
||||
/** 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 ¶m = "");
|
||||
|
||||
/** Remove a mode from the user
|
||||
* @param bi The client setting the mode
|
||||
* @param name The mode name
|
||||
* @param param Optional param for the mode
|
||||
*/
|
||||
void RemoveMode(const BotInfo *bi, const Anope::string &name);
|
||||
void RemoveMode(BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "");
|
||||
|
||||
/** 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
|
||||
*/
|
||||
ChanUserContainer *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
|
||||
*/
|
||||
bool IsProtected() const;
|
||||
bool IsProtected();
|
||||
|
||||
/** Kill a user
|
||||
* @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 Anope::string &source, const Anope::string &reason);
|
||||
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
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/* Build bumper
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+9
-6
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2013 Anope Team
|
||||
* (C) 2008-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -12,12 +12,15 @@
|
||||
|
||||
#include "serialize.h"
|
||||
#include "service.h"
|
||||
#include "sockets.h"
|
||||
|
||||
/* An Xline, eg, anything added with operserv/akill, or any of the operserv/sxline commands */
|
||||
class CoreExport XLine : public Serializable
|
||||
{
|
||||
void InitRegex();
|
||||
void Init();
|
||||
Anope::string nick, user, host, real;
|
||||
public:
|
||||
cidr *c;
|
||||
Anope::string mask;
|
||||
Regex *regex;
|
||||
Anope::string by;
|
||||
@@ -32,10 +35,10 @@ class CoreExport XLine : public Serializable
|
||||
XLine(const Anope::string &mask, const Anope::string &by, const time_t expires, const Anope::string &reason, const Anope::string &uid = "");
|
||||
~XLine();
|
||||
|
||||
Anope::string GetNick() const;
|
||||
Anope::string GetUser() const;
|
||||
Anope::string GetHost() const;
|
||||
Anope::string GetReal() const;
|
||||
const Anope::string &GetNick() const;
|
||||
const Anope::string &GetUser() const;
|
||||
const Anope::string &GetHost() const;
|
||||
const Anope::string &GetReal() const;
|
||||
|
||||
Anope::string GetReason() const;
|
||||
|
||||
|
||||
+3238
-2949
File diff suppressed because it is too large
Load Diff
+3459
-3120
File diff suppressed because it is too large
Load Diff
+3281
-2980
File diff suppressed because it is too large
Load Diff
+10964
File diff suppressed because it is too large
Load Diff
+5982
-6462
File diff suppressed because it is too large
Load Diff
+5200
-5559
File diff suppressed because it is too large
Load Diff
+3233
-2942
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
Reference in New Issue
Block a user