mirror of
https://github.com/anope/anope.git
synced 2026-06-16 16:34:48 +02:00
Compare commits
582 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a762391446 | |||
| c070a00114 | |||
| e7c3090a70 | |||
| 5dd6326eff | |||
| 535ad6fd70 | |||
| 5df4ac9a98 | |||
| 4c54a3939f | |||
| 3d09748d1c | |||
| 36a4be7623 | |||
| 5fc72660e4 | |||
| 303e652a35 | |||
| e5447a8024 | |||
| 1bee18fcf4 | |||
| a57e41304f | |||
| e0e8147ee0 | |||
| 41a24afa4f | |||
| 4266d17e8c | |||
| 8d3fa47ab2 | |||
| 64781817ac | |||
| 69c18f131f | |||
| e030771cbc | |||
| 03f05d3948 | |||
| 32c4908c8c | |||
| c5ff7c6868 | |||
| 89257d9bce | |||
| e47aacad0e | |||
| 72ade225a7 | |||
| a52af0d260 | |||
| 92920f5a1c | |||
| bf727285bc | |||
| 310e95a92e | |||
| 78bff86dab | |||
| 3f093d708f | |||
| c3cc5804c3 | |||
| dc58239c8a | |||
| b67963353f | |||
| a899c04ec2 | |||
| fb17bc85ea | |||
| 474cd7a99b | |||
| 7de4b86b7f | |||
| 76337bc04a | |||
| abe232601b | |||
| 6ada3ec871 | |||
| 61a8dd57f7 | |||
| 94427b234c | |||
| fb3c819bee | |||
| f0c23e80a2 | |||
| 1e86c46000 | |||
| 2f49065500 | |||
| 41ae2dbefb | |||
| f44280a9c9 | |||
| d147db9023 | |||
| f484a68dee | |||
| 8550e22167 | |||
| 9834518b28 | |||
| 64ca357b13 | |||
| dc5039e994 | |||
| 845ca576b4 | |||
| 2264a206d2 | |||
| d324e91520 | |||
| 9ac1b4ba01 | |||
| 7e0cb6d8ef | |||
| 3055b7272b | |||
| 969cd5dd6c | |||
| 1f02278a1c | |||
| 32007f81cf | |||
| 609f87d39f | |||
| e88925e587 | |||
| c46ec39e50 | |||
| 9b2202dfee | |||
| 03f6e26550 | |||
| c554e85063 | |||
| 2892c9580f | |||
| 3c0994a89e | |||
| e800afcfac | |||
| 2ad697898f | |||
| e4068249dd | |||
| d45cb5451e | |||
| d9c9f2a407 | |||
| 7213413f8b | |||
| 516211c88a | |||
| d576137f28 | |||
| e1f5e030bc | |||
| afffeb0a1d | |||
| 4fc71bb22f | |||
| d4732faf41 | |||
| 95684187b6 | |||
| 4f33b17f96 | |||
| 0cdab86978 | |||
| 4f76bee273 | |||
| 8557a4161a | |||
| c9008cdafa | |||
| 8a7793da0c | |||
| 64b332730e | |||
| 36837330ae | |||
| 8b64e46ef1 | |||
| c4460784c2 | |||
| 408ec02406 | |||
| 67fc8c3416 | |||
| fb2fd9e9d3 | |||
| 527e04275f | |||
| c895bd2e59 | |||
| 94b2d1ac12 | |||
| a76e074f6d | |||
| 2f004c2aab | |||
| b940077553 | |||
| c8ded08b43 | |||
| 62a01dcc87 | |||
| 0cd3bfa24f | |||
| e46bcff324 | |||
| 67719e8db1 | |||
| 48be41cf7b | |||
| 5ceee5df38 | |||
| 1c12976958 | |||
| 96583892c6 | |||
| 0991d4e199 | |||
| 58233fb8bc | |||
| be928b5bbc | |||
| 31bc1d6b82 | |||
| 829ef1b7bd | |||
| b068874f40 | |||
| 18b3c572f4 | |||
| af034928cb | |||
| 8d40a750cc | |||
| 6a3f7c01b1 | |||
| 4c2bf72cb6 | |||
| 8e7b742ec7 | |||
| 19b47c7bae | |||
| 3bdc81348a | |||
| bf8f62c32d | |||
| d417241a5b | |||
| e5cb2018e5 | |||
| df6095fed2 | |||
| 8210e82a5e | |||
| d6d72cd803 | |||
| 063d9bf5f6 | |||
| 830e8617e6 | |||
| cf89e10a4c | |||
| 6842ad36f7 | |||
| 24f17de4aa | |||
| bbb04d4662 | |||
| 20052247c3 | |||
| 8b61a529a2 | |||
| 1137c50095 | |||
| 52d422d020 | |||
| 43c460e593 | |||
| 17ba13bc95 | |||
| 60229b15d2 | |||
| 3c88f3b8cf | |||
| 93cb5d06db | |||
| 7a64d95f7c | |||
| ff66e15f38 | |||
| 07902c03fd | |||
| d9949320c7 | |||
| b0ec178e85 | |||
| f753a925ad | |||
| 74dbfe0699 | |||
| 3bea089793 | |||
| ff93355af8 | |||
| 8fecad3039 | |||
| 37bd2c238e | |||
| 9a947fa435 | |||
| 4f7868b125 | |||
| 8066378471 | |||
| ab27b792b0 | |||
| f1c3bdd55e | |||
| 08edb15bea | |||
| 56c6ef4449 | |||
| 6526d2d8b3 | |||
| 76ab5c2c38 | |||
| 54e98f017c | |||
| bb7706d0f7 | |||
| 16e0b72d2d | |||
| 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 |
+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"
|
||||
+20
-12
@@ -2,6 +2,12 @@
|
||||
cmake_minimum_required(VERSION 2.4 FATAL_ERROR)
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
if(POLICY CMP0026)
|
||||
cmake_policy(SET CMP0026 OLD)
|
||||
endif(POLICY CMP0026)
|
||||
if(POLICY CMP0007)
|
||||
cmake_policy(SET CMP0007 OLD)
|
||||
endif(POLICY CMP0007)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
# If the Source dir and the Binary dir are the same, we are building in-source, which we will disallow due to Autotools being there (but only on non-Windows)
|
||||
@@ -80,7 +86,7 @@ set(DEFAULT_LIBRARY_DIRS)
|
||||
set(DEFAULT_INCLUDE_DIRS)
|
||||
|
||||
# If we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
# First look for the compiler's default library directories
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -print-search-dirs OUTPUT_VARIABLE LINES OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# Find only the part after "libraries: "
|
||||
@@ -146,7 +152,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
if(DEFAULT_INCLUDE_DIRS)
|
||||
remove_list_duplicates(DEFAULT_INCLUDE_DIRS)
|
||||
endif(DEFAULT_INCLUDE_DIRS)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
|
||||
|
||||
# If we are using Visual Studio, locate the path of the Windows Server 2008 SDK or Windows Server 2003 Platform SDK, depending on which is installed
|
||||
if(MSVC)
|
||||
@@ -408,16 +414,14 @@ endif(NOT LOGS_DIR)
|
||||
read_from_file(${Anope_SOURCE_DIR}/src/version.sh "^VERSION_" VERSIONS)
|
||||
# Iterate through the strings found
|
||||
foreach(VERSION_STR ${VERSIONS})
|
||||
# Get the length of the string
|
||||
string(LENGTH ${VERSION_STR} VERSION_LEN)
|
||||
# Subtract 16 from the string's length (8 for VERSION_, 5 more for the type, 2 for the space and leading quote, 1 for the trailing quote)
|
||||
math(EXPR VERSION_NUM_LEN "${VERSION_LEN} - 16")
|
||||
# Extract the type from the string
|
||||
string(SUBSTRING ${VERSION_STR} 8 5 VERSION_TYPE)
|
||||
# Extract the actual value from the string
|
||||
string(SUBSTRING ${VERSION_STR} 15 ${VERSION_NUM_LEN} VERSION)
|
||||
# Set the version type to the value extract from above
|
||||
set(VERSION_${VERSION_TYPE} ${VERSION})
|
||||
string(REGEX REPLACE "^VERSION_([A-Z]+)=\"?([^\"]*)\"?$" "\\1;\\2" VERSION_OUT ${VERSION_STR})
|
||||
# Depends on CMP0007 OLD
|
||||
list(LENGTH VERSION_OUT VERSION_LEN)
|
||||
list(GET VERSION_OUT 0 VERSION_TYPE)
|
||||
if(${VERSION_LEN} GREATER 1)
|
||||
list(GET VERSION_OUT 1 VERSION_DATA)
|
||||
set(VERSION_${VERSION_TYPE} ${VERSION_DATA})
|
||||
endif(${VERSION_LEN} GREATER 1)
|
||||
endforeach(VERSION_STR ${VERSIONS})
|
||||
|
||||
# Default build version to 0
|
||||
@@ -497,6 +501,10 @@ 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\")")
|
||||
|
||||
@@ -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=
|
||||
@@ -176,42 +176,9 @@ done
|
||||
which cmake > /dev/null
|
||||
if [ $? -ne 0 ] ; then
|
||||
clear
|
||||
if exists "cmake-bin" ; then :
|
||||
else
|
||||
echo "Anope requires CMake 2.4 or newer, which can be downloaded at http://cmake.org"
|
||||
echo "If you have installed CMake already, ensure it is in your PATH environment variable."
|
||||
|
||||
if [ `uname` = "Linux" ] ; then
|
||||
|
||||
echo ""
|
||||
echo "Config can attempt to install CMake for you now, which"
|
||||
echo "will take approximately 50 MB of disk space."
|
||||
echo "Would you like to install CMake now?"
|
||||
echo2 "[y] "
|
||||
read YN
|
||||
if [ "$YN" = "n" ] ; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Downloading CMake... this may take a minute or two."
|
||||
wget -q http://anope.org/cmake/linux-i386.php -O cmake-bin.tar.gz
|
||||
if [ $? -ne 0 ] ; then
|
||||
rm -f cmake-bin.tar.gz
|
||||
echo "Unable to download CMake"
|
||||
exit 0
|
||||
fi
|
||||
mkdir -p cmake-bin
|
||||
tar zxf cmake-bin.tar.gz -C cmake-bin
|
||||
rm -f cmake-bin.tar.gz
|
||||
echo "Done!"
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
CMAKE_BIN=`find cmake-bin -name cmake`
|
||||
CMAKE_BIN="`pwd`/`dirname $CMAKE_BIN`"
|
||||
PATH="$PATH:$CMAKE_BIN"
|
||||
echo "Anope requires CMake 2.4 or newer, which can be downloaded at http://cmake.org or through your system's package manager."
|
||||
echo "If you have installed CMake already, ensure it is in your PATH environment variable."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
###########################################################################
|
||||
|
||||
BIN
Binary file not shown.
+6
-2
@@ -432,11 +432,15 @@ macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
# Reset libraries
|
||||
set(LIBRARIES)
|
||||
# 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
|
||||
|
||||
+6
-14
@@ -2,33 +2,25 @@
|
||||
if(NOT WIN32)
|
||||
find_path(GETTEXT_INCLUDE libintl.h /usr/include /usr/local/include ${EXTRA_INCLUDE})
|
||||
find_library(GETTEXT_LIBRARY intl PATHS /usr/lib /usr/lib64 ${EXTRA_LIBS})
|
||||
find_library(ICONV_LIBRARY iconv PATHS /usr/lib /usr/lib64 ${EXTRA_LIBS})
|
||||
find_program(GETTEXT_MSGFMT msgfmt PATHS /usr/bin/ /usr/local/bin ${EXTRA_INCLUDE})
|
||||
if(GETTEXT_INCLUDE AND GETTEXT_MSGFMT)
|
||||
set(GETTEXT_FOUND TRUE)
|
||||
if(GETTEXT_LIBRARY)
|
||||
set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARY})
|
||||
endif(GETTEXT_LIBRARY)
|
||||
endif(GETTEXT_INCLUDE AND GETTEXT_MSGFMT)
|
||||
else(NOT WIN32)
|
||||
find_path(GETTEXT_INCLUDE libintl.h ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include $ENV{VCINSTALLDIR}/include gettext/include ${EXTRA_INCLUDE})
|
||||
find_library(GETTEXT_LIBRARY libintl PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
|
||||
find_library(ICONV_LIBRARY libiconv PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
|
||||
find_library(MINGWEX_LIBRARY libmingwex PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
|
||||
find_library(GCC_LIBRARY libgcc PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib gettext/lib ${EXTRA_LIBS})
|
||||
find_program(GETTEXT_MSGFMT msgfmt PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/bin $ENV{VCINSTALLDIR}/bin gettext/bin ${EXTRA_INCLUDE})
|
||||
if(GETTEXT_INCLUDE AND GETTEXT_MSGFMT AND ICONV_LIBRARY AND MINGWEX_LIBRARY AND GCC_LIBRARY)
|
||||
if(GETTEXT_INCLUDE AND GETTEXT_LIBRARY AND GETTEXT_MSGFMT)
|
||||
set(GETTEXT_FOUND TRUE)
|
||||
endif(GETTEXT_INCLUDE AND GETTEXT_MSGFMT AND ICONV_LIBRARY AND MINGWEX_LIBRARY AND GCC_LIBRARY)
|
||||
set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARY})
|
||||
endif(GETTEXT_INCLUDE AND GETTEXT_LIBRARY AND GETTEXT_MSGFMT)
|
||||
endif(NOT WIN32)
|
||||
|
||||
# If we found everything we need set variables correctly for lang/CMakeLists.txt to use
|
||||
if(GETTEXT_FOUND)
|
||||
include_directories("${GETTEXT_INCLUDE}")
|
||||
set(GETTEXT_MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT})
|
||||
|
||||
if(WIN32)
|
||||
set(GETTEXT_LIBRARIES libiconv libintl libmingwex libgcc)
|
||||
else(WIN32)
|
||||
if(GETTEXT_LIBRARY)
|
||||
set(GETTEXT_LIBRARIES ${GETTEXT_LIBRARY} ${ICONV_LIBRARY})
|
||||
endif(GETTEXT_LIBRARY)
|
||||
endif(WIN32)
|
||||
endif(GETTEXT_FOUND)
|
||||
|
||||
+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}
|
||||
)
|
||||
|
||||
@@ -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 want 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"
|
||||
|
||||
@@ -62,6 +72,8 @@ module
|
||||
|
||||
/*
|
||||
* The name of the client that should be BotServ.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
client = "BotServ"
|
||||
|
||||
@@ -147,9 +159,10 @@ command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
@@ -189,7 +202,7 @@ command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords";
|
||||
* Used for administrating BotServ bots.
|
||||
*/
|
||||
module { name = "bs_bot" }
|
||||
command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; }
|
||||
command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; permission = "botserv/bot"; }
|
||||
|
||||
/*
|
||||
* bs_botlist
|
||||
@@ -261,7 +274,6 @@ module
|
||||
*/
|
||||
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"; }
|
||||
@@ -277,6 +289,7 @@ command { service = "BotServ"; name = "KICK UNDERLINES"; command = "botserv/kick
|
||||
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops"; }
|
||||
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices"; }
|
||||
|
||||
|
||||
/*
|
||||
* bs_set
|
||||
*
|
||||
@@ -373,6 +386,7 @@ 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 = "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"; }
|
||||
|
||||
+66
-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 ChanServ client.
|
||||
* If you change this value, you probably want to change the client directive in the configuration for the chanserv module too.
|
||||
*/
|
||||
nick = "ChanServ"
|
||||
|
||||
@@ -114,6 +114,7 @@ module
|
||||
|
||||
/*
|
||||
* The maximum number of entries on a channel's access list.
|
||||
* If not set, the default is 1024. This can be set to 0 for unlimited.
|
||||
*/
|
||||
accessmax = 1024
|
||||
|
||||
@@ -150,6 +151,13 @@ module
|
||||
*/
|
||||
reasonmax = 200
|
||||
|
||||
/*
|
||||
* The message formatting to use for signed kick messages.
|
||||
* %n is the nick of the kicker
|
||||
* %m is the message specified
|
||||
*/
|
||||
signkickformat = "%m (%n)"
|
||||
|
||||
/*
|
||||
* If set, prevents channel access entries from containing hostmasks.
|
||||
*/
|
||||
@@ -172,18 +180,18 @@ module
|
||||
* ChanServ privilege configuration.
|
||||
*
|
||||
* ChanServ privileges are used to determine who has what access in channels. By default the core has its own
|
||||
* set of levels it uses for various ChanServ commands, which are defined below. Privilege ranks are used to
|
||||
* determine how powerful privileges are relative to each other, which is used by Anope to determine who has greater
|
||||
* access in a channel.
|
||||
* set of privileges it uses for various commands, which are defined below. Privilege ranks are used to
|
||||
* determine how powerful privileges are relative to other privileges, which is used by Anope to determine
|
||||
* who has greater access in a channel.
|
||||
*
|
||||
* If you loaded cs_access, you may define a level for the privilege, which is used by chanserv/access and chanserv/levels.
|
||||
* If you load cs_access, you may define a level for the privilege, which is used by chanserv/access and chanserv/levels.
|
||||
* The levels defined will be used as the default levels for newly registered channels.
|
||||
* The level "founder" is a special level which means anyone with the privilege FOUNDER on the channel
|
||||
* has that permission. Additionally, the level "disabled" means that no one can use the privilege, including founders.
|
||||
*
|
||||
* If you loaded cs_flags, you may define a flag associated with that privilege for use in chanserv/flags.
|
||||
* If you load cs_flags, you may define a flag associated with that privilege for use in chanserv/flags.
|
||||
*
|
||||
* If you loaded cs_xop, you may define a xop command to associate the privilege with.
|
||||
* If you load cs_xop, you may define a XOP command to associate the privilege with.
|
||||
*
|
||||
* The name of privileges are uesd to associate them with channel modes. If you are using an IRCd that allows you to define additional
|
||||
* channel status modes, such as InspIRCd, you can associate privileges (and thus access levels, flags, xop) with the mode by naming
|
||||
@@ -402,7 +410,7 @@ privilege
|
||||
{
|
||||
name = "FOUNDER"
|
||||
rank = 360
|
||||
level = "founder"
|
||||
level = 10000
|
||||
flag = "F"
|
||||
xop = "QOP"
|
||||
}
|
||||
@@ -798,25 +806,25 @@ privilege
|
||||
command_group
|
||||
{
|
||||
name = "chanserv/access"
|
||||
description = "Used to manage the list of privileged users"
|
||||
description = _("Used to manage the list of privileged users")
|
||||
}
|
||||
|
||||
command_group
|
||||
{
|
||||
name = "chanserv/status"
|
||||
description = "Used to modify the channel status of you or other users"
|
||||
description = _("Used to modify the channel status of you or other users")
|
||||
}
|
||||
|
||||
command_group
|
||||
{
|
||||
name = "chanserv/management"
|
||||
description = "Used to manage channels"
|
||||
description = _("Used to manage channels")
|
||||
}
|
||||
|
||||
command_group
|
||||
{
|
||||
name = "chanserv/admin"
|
||||
description = "Services Operator commands"
|
||||
description = _("Services Operator commands")
|
||||
}
|
||||
|
||||
/* Give it a help command. */
|
||||
@@ -828,7 +836,12 @@ command { service = "ChanServ"; name = "HELP"; command = "generic/help"; }
|
||||
* Provides commands chanserv/access and chanserv/levels.
|
||||
* Provides the access system "levels".
|
||||
*
|
||||
* Used for giving users access in channels.
|
||||
* Used for giving users access in channels using a levels system. Allows allows redefining which privileges
|
||||
* are representated by given level on a per channel basis.
|
||||
*
|
||||
* The "LIST" subcommand of chanserv/access will show every access entry on the channel, including access
|
||||
* entries not added by cs_access. The "level" of these entries will be the representation of the access
|
||||
* entry by the other access system, which could be an XOP command name, or a set of flags.
|
||||
*/
|
||||
module { name = "cs_access" }
|
||||
command { service = "ChanServ"; name = "ACCESS"; command = "chanserv/access"; group = "chanserv/access"; }
|
||||
@@ -855,7 +868,6 @@ module
|
||||
*/
|
||||
autokickreason = "User has been banned from the channel"
|
||||
}
|
||||
|
||||
command { service = "ChanServ"; name = "AKICK"; command = "chanserv/akick"; group = "chanserv/management"; }
|
||||
|
||||
/*
|
||||
@@ -863,6 +875,12 @@ command { service = "ChanServ"; name = "AKICK"; command = "chanserv/akick"; grou
|
||||
*
|
||||
* Provides the command chanserv/ban.
|
||||
*
|
||||
* The configuration option 'kick' may be set in a command block for this command to control
|
||||
* whether or not users will be kicked from the channel once banned. The default is 'yes'.
|
||||
*
|
||||
* The configuration option 'mode' may be set to control which mode is set, such as BAN or QUIET.
|
||||
* The default is BAN.
|
||||
*
|
||||
* Used for banning users from channels.
|
||||
*/
|
||||
module { name = "cs_ban" }
|
||||
@@ -921,6 +939,10 @@ command { service = "ChanServ"; name = "ENTRYMSG"; command = "chanserv/entrymsg"
|
||||
* Provides the access system "flags".
|
||||
*
|
||||
* Used for giving users access in channels.
|
||||
*
|
||||
* The "LIST" subcommand of chanserv/flags will show every access entry on the channel, including access
|
||||
* entries not added by cs_flags. The "Flags" of these entries will be the flags representation of the
|
||||
* privilege set granted by the access entry.
|
||||
*/
|
||||
module { name = "cs_flags" }
|
||||
command { service = "ChanServ"; name = "FLAGS"; command = "chanserv/flags"; group = "chanserv/access"; }
|
||||
@@ -981,10 +1003,11 @@ module
|
||||
*/
|
||||
listmax = 50
|
||||
}
|
||||
command { service = "ChanServ"; name = "LIST"; command = "chanserv/list"; }
|
||||
|
||||
command { service = "ChanServ"; name = "LIST"; command = "chanserv/list"; permission = "chanserv/list"; group = "chanserv/admin"; }
|
||||
command { service = "ChanServ"; name = "SET PRIVATE"; command = "chanserv/set/private"; }
|
||||
|
||||
|
||||
/*
|
||||
* cs_log
|
||||
*
|
||||
@@ -1031,7 +1054,9 @@ command { service = "ChanServ"; name = "LOG"; command = "chanserv/log"; group =
|
||||
*
|
||||
* Provides the command chanserv/mode and chanserv/modes.
|
||||
*
|
||||
* Used for changing mode locks and changing modes.
|
||||
* Used for changing mode locks and changing modes. Multiple commands may be mapped to chanserv/modes, the
|
||||
* configuration directive 'set' and 'unset' are used to tell chanserv/modes which modes should be set or
|
||||
* unset when the command is executed.
|
||||
*/
|
||||
module
|
||||
{
|
||||
@@ -1043,8 +1068,14 @@ module
|
||||
* If not set, the default is +nt.
|
||||
*/
|
||||
mlock = "+nt"
|
||||
}
|
||||
|
||||
/*
|
||||
* The maximum number of entries that may be on a mode lock list.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
max = 32
|
||||
}
|
||||
command { service = "ChanServ"; name = "MODE"; command = "chanserv/mode"; group = "chanserv/management"; }
|
||||
|
||||
command { service = "ChanServ"; name = "OWNER"; command = "chanserv/modes"; group = "chanserv/status"; set = "OWNER" }
|
||||
@@ -1062,6 +1093,7 @@ command { service = "ChanServ"; name = "DEHALFOP"; command = "chanserv/modes"; g
|
||||
command { service = "ChanServ"; name = "VOICE"; command = "chanserv/modes"; group = "chanserv/status"; set = "VOICE" }
|
||||
command { service = "ChanServ"; name = "DEVOICE"; command = "chanserv/modes"; group = "chanserv/status"; unset = "VOICE" }
|
||||
|
||||
|
||||
/*
|
||||
* cs_register
|
||||
*
|
||||
@@ -1132,13 +1164,18 @@ module
|
||||
* 3: ban in the form of *!*user@*.domain
|
||||
*/
|
||||
defbantype = 2
|
||||
}
|
||||
|
||||
/*
|
||||
* If set, persisent channels have their creation times lowered to their
|
||||
* original registration dates.
|
||||
*/
|
||||
persist_lower_ts = true
|
||||
}
|
||||
command { service = "ChanServ"; name = "SET"; command = "chanserv/set"; group = "chanserv/management"; }
|
||||
command { service = "ChanServ"; name = "SET AUTOOP"; command = "chanserv/set/autoop"; }
|
||||
command { service = "ChanServ"; name = "SET BANTYPE"; command = "chanserv/set/bantype"; }
|
||||
command { service = "ChanServ"; name = "SET DESCRIPTION"; command = "chanserv/set/description"; }
|
||||
command { service = "ChanServ"; name = "SET DESC"; command = "chanserv/set/description"; }
|
||||
command { service = "ChanServ"; name = "SET DESC"; command = "chanserv/set/description"; hide = yes; }
|
||||
command { service = "ChanServ"; name = "SET FOUNDER"; command = "chanserv/set/founder"; }
|
||||
command { service = "ChanServ"; name = "SET KEEPMODES"; command = "chanserv/set/keepmodes"; }
|
||||
command { service = "ChanServ"; name = "SET PEACE"; command = "chanserv/set/peace"; }
|
||||
@@ -1192,6 +1229,13 @@ module
|
||||
* If not set, the default is never.
|
||||
*/
|
||||
expire = 90d
|
||||
|
||||
/*
|
||||
* Settings to show to non-opers in ChanServ's INFO output.
|
||||
* Comment to completely disable showing any information about
|
||||
* suspended channels to non-opers.
|
||||
*/
|
||||
show = "suspended, by, reason, on, expires"
|
||||
}
|
||||
command { service = "ChanServ"; name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend"; group = "chanserv/admin"; }
|
||||
command { service = "ChanServ"; name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; group = "chanserv/admin"; }
|
||||
@@ -1249,6 +1293,9 @@ command { service = "ChanServ"; name = "UP"; command = "chanserv/up"; group = "c
|
||||
* privileges given by each is determined by the privilege:xop settings above. These commands should
|
||||
* be ordered from highest to lowest, as each command inherits the privileges of the commands below
|
||||
* it.
|
||||
*
|
||||
* The "LIST" subcommand of chanserv/xop will show only XOP access entries of the given XOP type. You
|
||||
* can not view the entire access list at once, and instead should use another access system to do that.
|
||||
*/
|
||||
module { name = "cs_xop" }
|
||||
command { service = "ChanServ"; name = "QOP"; command = "chanserv/xop"; group = "chanserv/access"; }
|
||||
|
||||
@@ -26,10 +26,9 @@ module
|
||||
|
||||
/*
|
||||
* 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"; }
|
||||
@@ -38,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
|
||||
|
||||
+49
-86
@@ -80,16 +80,7 @@
|
||||
* [OPTIONAL] Defines
|
||||
*
|
||||
* You can define values to other values, which can be used to easily change
|
||||
* every value in the configuration. For example, use:
|
||||
*
|
||||
* define
|
||||
* {
|
||||
* name = "ChanServ"
|
||||
* value = "ChannelServ"
|
||||
* }
|
||||
*
|
||||
* To replace every occurrence of ChanServ with ChannelServ in the configuration file,
|
||||
* and in every included configuration file (such as chanserv.example.conf).
|
||||
* many values in the configuration. at once.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -177,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
|
||||
|
||||
@@ -285,13 +276,6 @@ module
|
||||
* If the protocol module you have loaded does not support this, this setting will have no effect.
|
||||
*/
|
||||
use_server_side_topiclock = yes
|
||||
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
sasl = yes
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -335,6 +319,16 @@ networkinfo
|
||||
*/
|
||||
modelistsize = 100
|
||||
|
||||
/*
|
||||
* Characters allowed in nicknames. This always includes the characters described
|
||||
* in RFC1459, and so does not need to be set for normal behavior. Changing this to
|
||||
* include characters your IRCd doesn't support will cause your IRCd and/or Services
|
||||
* to break. Multibyte characters are not supported, nor are escape sequences.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
*/
|
||||
#nick_chars = ""
|
||||
|
||||
/*
|
||||
* 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
|
||||
@@ -392,11 +386,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
|
||||
@@ -483,7 +472,7 @@ options
|
||||
|
||||
/*
|
||||
* If set, this will allow users to let Services send PRIVMSGs to them
|
||||
* instead of NOTICEs. Also see the defmsg option of nickserv:defaults,
|
||||
* instead of NOTICEs. Also see the "msg" option of nickserv:defaults,
|
||||
* which also toggles the default communication (PRIVMSG or NOTICE) to
|
||||
* use for unregistered users.
|
||||
*
|
||||
@@ -526,15 +515,16 @@ options
|
||||
retrywait = 60s
|
||||
|
||||
/*
|
||||
* 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.
|
||||
@@ -554,27 +544,9 @@ options
|
||||
|
||||
/*
|
||||
* Default language that non- and newly-registered nicks will receive messages in.
|
||||
* Leave empty to default to English.
|
||||
* Set to "en" to enable English. Defaults to the language the system uses.
|
||||
*/
|
||||
#defaultlanguage = "es_ES.UTF-8"
|
||||
|
||||
/*
|
||||
* The username, and possibly hostname, used for fake users created when Services needs to
|
||||
* hold a nickname.
|
||||
*/
|
||||
enforceruser = "enforcer"
|
||||
enforcerhost = "localhost.net"
|
||||
|
||||
/*
|
||||
* The length of time Services hold nicknames.
|
||||
*/
|
||||
releasetimeout = 1m
|
||||
|
||||
/*
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -741,13 +713,13 @@ log
|
||||
* create, destroy, join, part, kick, leave, mode
|
||||
*
|
||||
* Valid user options are:
|
||||
* connect, disconnect, quit, nick, ident, host, mode, maxusers, oper
|
||||
* connect, disconnect, quit, nick, ident, host, mode, maxusers, oper, away
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
admin = "operserv/*"
|
||||
admin = "*"
|
||||
override = "chanserv/* nickserv/* memoserv/set ~botserv/set botserv/*"
|
||||
commands = "~operserv/* *"
|
||||
servers = "*"
|
||||
@@ -785,7 +757,9 @@ log
|
||||
*
|
||||
* Available privileges:
|
||||
* botserv/administration - Can view and assign private BotServ bots
|
||||
* botserv/fantasy - Can use fantasy commands without the FANTASIA privilege
|
||||
* chanserv/administration - Can modify the settings of any channel (including changing of the owner!)
|
||||
* chanserv/access/list - Can view channel access and akick lists, but not modify them
|
||||
* 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
|
||||
@@ -798,12 +772,15 @@ log
|
||||
* 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
|
||||
* operserv/oper/modify - Can add and remove operators with at most the same privileges
|
||||
* protected - Can not be kicked from channels by Services
|
||||
*
|
||||
* Available commands:
|
||||
* botserv/bot/del botserv/bot/add botserv/bot/change botserv/set/private
|
||||
* botserv/set/nobot
|
||||
*
|
||||
* chanserv/access/list chanserv/drop chanserv/getkey chanserv/invite
|
||||
* chanserv/drop chanserv/getkey chanserv/invite
|
||||
* chanserv/list chanserv/suspend chanserv/topic
|
||||
*
|
||||
* chanserv/saset/bantype chanserv/saset/description chanserv/saset/email chanserv/saset/keepmodes
|
||||
@@ -816,7 +793,7 @@ log
|
||||
* memoserv/sendall memoserv/staff
|
||||
*
|
||||
* nickserv/getpass nickserv/getemail nickserv/suspend nickserv/ajoin
|
||||
* nickserv/resetpass nickserv/list
|
||||
* 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
|
||||
@@ -862,7 +839,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"
|
||||
@@ -884,7 +861,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/*"
|
||||
commands = "botserv/* 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 = "*"
|
||||
}
|
||||
@@ -988,18 +965,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
|
||||
@@ -1053,7 +1018,7 @@ mail
|
||||
emailchange_subject = "Email confirmation"
|
||||
emailchange_message = "Hi,
|
||||
|
||||
You have requested to change your email address to %e.
|
||||
You have requested to change your email address from %e to %E.
|
||||
Please type \" /msg NickServ CONFIRM %c \" to confirm this change.
|
||||
|
||||
If you don't know why this mail was sent to you, please ignore it silently.
|
||||
@@ -1096,29 +1061,12 @@ mail
|
||||
/*
|
||||
* 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.
|
||||
* This module only loads this database, and will NOT save it.
|
||||
* 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"
|
||||
|
||||
/*
|
||||
* The database name db_plain should use
|
||||
*/
|
||||
database = "anope.db"
|
||||
}
|
||||
|
||||
/*
|
||||
* [RECOMMENDED] db_flatfile
|
||||
*
|
||||
@@ -1257,8 +1205,9 @@ module
|
||||
* 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
|
||||
@@ -1269,6 +1218,7 @@ module
|
||||
*
|
||||
*/
|
||||
|
||||
#module { name = "enc_bcrypt" }
|
||||
module { name = "enc_sha256" }
|
||||
#module { name = "enc_md5" }
|
||||
#module { name = "enc_sha1" }
|
||||
@@ -1303,3 +1253,16 @@ include
|
||||
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"
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -103,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"; }
|
||||
|
||||
/*
|
||||
@@ -139,7 +152,7 @@ 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.
|
||||
*/
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -137,7 +137,17 @@ command { service = "MemoServ"; name = "DEL"; command = "memoserv/del"; }
|
||||
*
|
||||
* Used to ignore memos from specific users.
|
||||
*/
|
||||
module { name = "ms_ignore" }
|
||||
module
|
||||
{
|
||||
name = "ms_ignore"
|
||||
|
||||
/*
|
||||
* The maximum number of entries that may be on a memo ignore list.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
max = 32
|
||||
}
|
||||
command { service = "MemoServ"; name = "IGNORE"; command = "memoserv/ignore"; }
|
||||
|
||||
/*
|
||||
|
||||
+259
-139
@@ -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.
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -121,26 +124,58 @@ module { name = "help" }
|
||||
* %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.
|
||||
* %r is the reply 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"
|
||||
/* Replies to ban and their reason. If no relies are configured, all replies get banned. */
|
||||
reply
|
||||
{
|
||||
code = 1
|
||||
reason = "Open Proxy"
|
||||
}
|
||||
|
||||
#reply
|
||||
{
|
||||
code = 2
|
||||
reason = "spamtrap666"
|
||||
}
|
||||
|
||||
#reply
|
||||
{
|
||||
code = 3
|
||||
reason = "spamtrap50"
|
||||
}
|
||||
|
||||
reply
|
||||
{
|
||||
code = 4
|
||||
reason = "TOR"
|
||||
|
||||
/*
|
||||
* If set, users identified to services at the time the result comes back
|
||||
* will not be banned.
|
||||
*/
|
||||
#allow_account = yes
|
||||
}
|
||||
|
||||
reply
|
||||
{
|
||||
code = 5
|
||||
reason = "Drones / Flooding"
|
||||
}
|
||||
}
|
||||
|
||||
blacklist
|
||||
#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"
|
||||
}
|
||||
|
||||
/* Exempt localhost from DNSBL checks */
|
||||
exempt { ip = "127.0.0.1" }
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -181,7 +216,7 @@ module { name = "help" }
|
||||
/* Time before connections to this server are timed out. */
|
||||
timeout = 30
|
||||
|
||||
/* Listen using SSL. Requires m_ssl. */
|
||||
/* Listen using SSL. Requires an SSL module. */
|
||||
#ssl = yes
|
||||
|
||||
/* If you are using a reverse proxy that sends one of the
|
||||
@@ -197,7 +232,7 @@ module { name = "help" }
|
||||
}
|
||||
|
||||
/*
|
||||
* m_ldap
|
||||
* m_ldap [EXTRA]
|
||||
*
|
||||
* This module allows other modules to use LDAP. By itself, this module does nothing useful.
|
||||
*/
|
||||
@@ -219,7 +254,7 @@ module { name = "help" }
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
@@ -264,7 +299,9 @@ module { name = "help" }
|
||||
password_attribute = "userPassword"
|
||||
|
||||
/*
|
||||
* If set, the reason to give the users who try to "/msg NickServ REGISTER".
|
||||
* If set, the reason to give the users who try to register with nickserv,
|
||||
* including nick registration from grouping.
|
||||
*
|
||||
* If not set, then registration is not blocked.
|
||||
*/
|
||||
#disable_register_reason = "To register on this network visit http://some.misconfigured.site/register"
|
||||
@@ -277,7 +314,7 @@ module { name = "help" }
|
||||
}
|
||||
|
||||
/*
|
||||
* 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.
|
||||
@@ -318,7 +355,7 @@ module { name = "help" }
|
||||
}
|
||||
|
||||
/*
|
||||
* m_mysql
|
||||
* m_mysql [EXTRA]
|
||||
*
|
||||
* This module allows other modules to use MySQL.
|
||||
*/
|
||||
@@ -337,6 +374,82 @@ module { name = "help" }
|
||||
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"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_proxyscan
|
||||
@@ -421,7 +534,106 @@ module { name = "help" }
|
||||
}
|
||||
|
||||
/*
|
||||
* m_sql_authentication
|
||||
* 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.
|
||||
*/
|
||||
#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
|
||||
{
|
||||
name = "m_ssl_gnutls"
|
||||
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
*/
|
||||
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_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"
|
||||
|
||||
/*
|
||||
* As of 2014 SSL 3.0 is considered insecure, but it might be enabled
|
||||
* on some systems by default for compatibility reasons.
|
||||
* You can use the following option to enable or disable it explicitly.
|
||||
* Leaving this option not set defaults to the default system behavior.
|
||||
*/
|
||||
#sslv3 = no
|
||||
}
|
||||
|
||||
/*
|
||||
* m_sql_authentication [EXTRA]
|
||||
*
|
||||
* This module allows authenticating users against an external SQL database using a custom
|
||||
* query.
|
||||
@@ -463,10 +675,16 @@ module { name = "help" }
|
||||
* 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_log
|
||||
* 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
|
||||
@@ -486,7 +704,7 @@ module { name = "help" }
|
||||
#module { name = "m_sql_log" }
|
||||
|
||||
/*
|
||||
* m_sql_oper
|
||||
* 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.
|
||||
@@ -512,7 +730,7 @@ module { name = "help" }
|
||||
}
|
||||
|
||||
/*
|
||||
* m_sqlite
|
||||
* m_sqlite [EXTRA]
|
||||
*
|
||||
* This module allows other modules to use SQLite.
|
||||
*/
|
||||
@@ -531,126 +749,6 @@ module { name = "help" }
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
*
|
||||
* Provides the regex engine regex/pcre, which uses the Perl Compatible Regular Expressions library.
|
||||
*/
|
||||
#module { name = "m_regex_pcre" }
|
||||
|
||||
/*
|
||||
* m_regex_posix
|
||||
*
|
||||
* 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
|
||||
*
|
||||
* 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"
|
||||
|
||||
/*
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_xmlrpc
|
||||
*
|
||||
* Allows remote applications (websites) to execute queries in real time to retrieve data from Anope.
|
||||
* By itself this module does nothing, but allows other modules (m_xmlrpc_main) to receive and send XMLRPC queries.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "m_xmlrpc"
|
||||
|
||||
/* Web service to use. Requires m_httpd. */
|
||||
server = "httpd/main"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_xmlrpc_main
|
||||
*
|
||||
* Adds the main XMLRPC core functions.
|
||||
* Requires m_xmlrpc.
|
||||
*/
|
||||
#module { name = "m_xmlrpc_main" }
|
||||
|
||||
/*
|
||||
* webcpanel
|
||||
*
|
||||
@@ -673,3 +771,25 @@ module { name = "help" }
|
||||
/* Page title. */
|
||||
title = "Anope IRC Services";
|
||||
}
|
||||
|
||||
/*
|
||||
* m_xmlrpc
|
||||
*
|
||||
* Allows remote applications (websites) to execute queries in real time to retrieve data from Anope.
|
||||
* By itself this module does nothing, but allows other modules (m_xmlrpc_main) to receive and send XMLRPC queries.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "m_xmlrpc"
|
||||
|
||||
/* Web service to use. Requires m_httpd. */
|
||||
server = "httpd/main"
|
||||
}
|
||||
|
||||
/*
|
||||
* m_xmlrpc_main
|
||||
*
|
||||
* Adds the main XMLRPC core functions.
|
||||
* Requires m_xmlrpc.
|
||||
*/
|
||||
#module { name = "m_xmlrpc_main" }
|
||||
|
||||
+66
-14
@@ -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"
|
||||
|
||||
@@ -102,6 +102,7 @@ module
|
||||
* - 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
|
||||
@@ -174,6 +175,41 @@ module
|
||||
* This directive is optional.
|
||||
*/
|
||||
#restrictopernicks = yes
|
||||
|
||||
/*
|
||||
* 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 optional, but recommended. If not set it defaults to 1 minute.
|
||||
*/
|
||||
releasetimeout = 1m
|
||||
|
||||
/*
|
||||
* 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"
|
||||
*/
|
||||
guestnickprefix = "Guest"
|
||||
|
||||
/*
|
||||
* If set, Services do not allow ownership of nick names, only ownership of accounts.
|
||||
*/
|
||||
nonicknameownership = no
|
||||
|
||||
/*
|
||||
* The maximum length of passwords
|
||||
*
|
||||
* This directive is optional. If not set it defaults to 32.
|
||||
*/
|
||||
passlen = 32
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -195,7 +231,7 @@ module
|
||||
command_group
|
||||
{
|
||||
name = "nickserv/admin"
|
||||
description = "Services Operator commands"
|
||||
description = _("Services Operator commands")
|
||||
}
|
||||
|
||||
/* Give it a help command. */
|
||||
@@ -214,6 +250,7 @@ module
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
@@ -225,7 +262,6 @@ module
|
||||
*/
|
||||
addaccessonreg = yes
|
||||
}
|
||||
|
||||
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/access"; }
|
||||
|
||||
/*
|
||||
@@ -263,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"; accessmax = 5; }
|
||||
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"; }
|
||||
|
||||
/*
|
||||
@@ -317,13 +362,13 @@ module
|
||||
maxaliases = 16
|
||||
|
||||
/*
|
||||
* If set, the NickServ GROUP command won't allow any group change. This is recommended for
|
||||
* better performance and to protect against nick stealing, however users will have less
|
||||
* flexibility.
|
||||
* 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
|
||||
nogroupchange = yes
|
||||
}
|
||||
command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist"; }
|
||||
command { service = "NickServ"; name = "GROUP"; command = "nickserv/group"; }
|
||||
@@ -354,6 +399,7 @@ 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
|
||||
*
|
||||
@@ -371,11 +417,12 @@ module
|
||||
*/
|
||||
listmax = 50
|
||||
}
|
||||
command { service = "NickServ"; name = "LIST"; command = "nickserv/list"; group = "nickserv/admin"; }
|
||||
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
|
||||
*
|
||||
@@ -449,7 +496,6 @@ module
|
||||
*/
|
||||
#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"; }
|
||||
@@ -492,7 +538,6 @@ module
|
||||
#allowkillimmed = yes
|
||||
}
|
||||
|
||||
|
||||
command { service = "NickServ"; name = "SET"; command = "nickserv/set"; }
|
||||
command { service = "NickServ"; name = "SASET"; command = "nickserv/saset"; permission = "nickserv/saset/"; group = "nickserv/admin"; }
|
||||
|
||||
@@ -525,6 +570,7 @@ command { service = "NickServ"; name = "SASET SECURE"; command = "nickserv/saset
|
||||
|
||||
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire"; }
|
||||
|
||||
|
||||
/*
|
||||
* ns_set_misc
|
||||
*
|
||||
@@ -570,8 +616,14 @@ module
|
||||
* 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"; }
|
||||
|
||||
@@ -596,7 +648,7 @@ 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
|
||||
#module
|
||||
{
|
||||
name = "ns_maxemail"
|
||||
|
||||
@@ -605,5 +657,5 @@ module
|
||||
* commented, there will be no limit enforced when registering new accounts or using
|
||||
* /msg NickServ SET EMAIL.
|
||||
*/
|
||||
#maxemails = 1
|
||||
maxemails = 1
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -260,7 +260,7 @@ command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"
|
||||
*/
|
||||
#akillreason = "This network is currently not accepting connections, please try again later."
|
||||
}
|
||||
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; }
|
||||
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; permission = "operserv/defcon"; }
|
||||
|
||||
/*
|
||||
* os_dns
|
||||
@@ -488,11 +488,10 @@ module
|
||||
/*
|
||||
* 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.
|
||||
* 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"; }
|
||||
@@ -555,24 +554,24 @@ module
|
||||
name = "os_session"
|
||||
|
||||
/*
|
||||
* Default session limit per host. Once a host reaches it's session limit, all clients attempting
|
||||
* 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 require if os_session is loaded.
|
||||
* 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 require if os_session is loaded.
|
||||
* This directive is required if os_session is loaded.
|
||||
*/
|
||||
maxsessionlimit = 100
|
||||
|
||||
/*
|
||||
* Sets the default expiry time for session exceptions.
|
||||
*
|
||||
* This directive is require if os_session is loaded.
|
||||
* This directive is required if os_session is loaded.
|
||||
*/
|
||||
exceptionexpiry = 1d
|
||||
|
||||
@@ -643,7 +642,6 @@ module
|
||||
*/
|
||||
#superadmin = yes
|
||||
}
|
||||
|
||||
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set"; }
|
||||
|
||||
/*
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
-4571
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,44 @@
|
||||
Anope Version 2.0.2
|
||||
-------------------
|
||||
Fix keepmodes preventing the first user of a channel from being deopped
|
||||
Fix SQlines that don't begin with # from matching channels
|
||||
Made cs_clone behave like the help describes, copying many settings and lists by default
|
||||
Allow cs_clone to clone levels, too
|
||||
Update Hybrid protocol module for 8.2
|
||||
Fix not unescaping all characters sent over XMLRPC
|
||||
Fix crash when os_mode is used to destroy channels, like when unsetting permanent channel mode from an empty channel
|
||||
Allow users with topic change privilege to change the topic instead of requiring them to use ChanServ's topic command
|
||||
Fix negatively locking param modes in default mlock
|
||||
Change entrymsg to check for the SET privilege, not real founder
|
||||
Allow configuring characters allowed in nicknames
|
||||
Fix crash when non users register channels externally (like XMLRPC)
|
||||
Remove operserv/exception MOVE, it did not function correctly. Instead reorder the list by deleting/adding entries.
|
||||
Allow flood ttb to be 0.
|
||||
Enforce mlock when disabling defcon modes
|
||||
Fix cs_mode not being able to apply mlock on register
|
||||
Add log message when users send memos
|
||||
Fix old collide timers from staying around after successful identify. Fixes being able to identify and logout and still being hit by the old timers.
|
||||
Fix undefined behavior in cs_mode which usually crashes when clearing large list modes
|
||||
Show all opertypes in operserv/info, even if no opers use them
|
||||
|
||||
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
|
||||
|
||||
@@ -1,3 +1,27 @@
|
||||
Anope Version 2.0.2
|
||||
-------------------
|
||||
Add an operserv/oper/modify privilege, required to use oper add and oper del
|
||||
Add a chanserv/access/list privilege, which allow readonly access to ChanServ access and akick lists
|
||||
Changed m_dnsbl's result configuration to be more extensible
|
||||
Add 'max' setting to cs_mode
|
||||
Add 'nickchars' setting to networkinfo
|
||||
Add 'botserv/fantasy', 'chanserv/access/list', and 'operserv/oper/modify' oper privileges
|
||||
Fix 'emailchange_message' to include the proper email address
|
||||
Set a default permission on operserv/defcon
|
||||
|
||||
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
|
||||
|
||||
+15
-29
@@ -21,62 +21,48 @@ Note: You should also read the README and FAQ files!
|
||||
|
||||
http://www.anope.org/
|
||||
|
||||
Anope can be built one of two ways. The recommended way is to use CMake.
|
||||
You can check if CMake is already installed on your system using the
|
||||
command:
|
||||
Anope requires cmake to build. You can check if CMake is already
|
||||
installed on your system using the command:
|
||||
|
||||
cmake --version
|
||||
|
||||
If it's installed, you will get a line that says something similar to
|
||||
"cmake version 2.6-patch 1". If the version is less than 2.4 or you get
|
||||
"cmake version 2.8.12.2". If the version is less than 2.4 or you get
|
||||
an error saying the command was not found, you will not be able to use
|
||||
CMake unless you install it yourself into your home directory. CMake
|
||||
can be downloaded from:
|
||||
|
||||
http://www.cmake.org/cmake/resources/software.html
|
||||
|
||||
If you are unable to install CMake yourself (either due to lack of space
|
||||
or restrictions by your hosting provider), you still have the alternative
|
||||
to use the provided configure script. This option is not recommended and
|
||||
will eventually be phased out, but is provided for compatibility for those
|
||||
lacking CMake.
|
||||
|
||||
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.
|
||||
The question to using configure or cmake depends on your decision from
|
||||
above. If you have CMake and wish to use it, answer with cmake, otherwise
|
||||
answer with configure.
|
||||
|
||||
You can now type make to compile Anope. If there are errors in the
|
||||
Makefile, *try to use gmake* instead. If it still doesn't work, you (or
|
||||
the system administrator if it's a shell) must install GNU make. You may
|
||||
find it at ftp://prep.ai.mit.edu/pub/gnu/.
|
||||
|
||||
Now type make install (or gmake install; see above). This will install
|
||||
Now cd build and type make and make install. This will install
|
||||
all the needed files in the paths you specified with the configure
|
||||
script, and setup file permissions. You should ensure that the data
|
||||
directory is not accessible by other users, as malicious users may
|
||||
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
|
||||
|
||||
@@ -130,7 +116,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 ;))
|
||||
@@ -139,7 +125,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
|
||||
|
||||
+109
-169
@@ -1,209 +1,149 @@
|
||||
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 est déconseillé 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 nécessite cmake pour être compilé. Vous pouvez vérifier si CMake
|
||||
est déjà installé sur votre système avec la commande :
|
||||
|
||||
cmake --version
|
||||
|
||||
Si CMake est installé, vous aurez une ligne qui dit quelque chose comme
|
||||
"cmake version 2.8.12.2". 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
|
||||
pourrez pas utiliser CMake à moins de l'installer 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
|
||||
Ensuite, décompressez le package dans votre répertoire home, et allez
|
||||
dans le répértoire qui vient d'être créé.
|
||||
|
||||
commande: cmake --version ( sur votre vps ou dedier etre loggué en root )
|
||||
Si il y a des modules facultatifs que vous voulez activer comme m_mysql,
|
||||
exécuter le script 'extras' pour les activer. Si vous ne savez pas, vous
|
||||
pouvez les activer plus tard.
|
||||
|
||||
Maintenant, tapez ./Config pour lancer le script de configuration. Il
|
||||
va vous poser quelques questions, et déterminer comment compiler Anope
|
||||
sur votre système. Si vous ne savez pas comment répondre à une question,
|
||||
utilisez la valeur par défaut.
|
||||
|
||||
Si c'est installé, vous aurez une ligne qui dit quelque chose qui ressemble à
|
||||
Allez dans le dossier build (cd build) et tapez make et make install.
|
||||
Ceci va installer tous les fichiers nécessaires dans les dossiers que
|
||||
vous avez indiqués avec le script Config et régler les permissions des
|
||||
fichiers. Vous devez vous assurer que le répertoire data n'est pas
|
||||
accessible par les autres utilisateurs, car 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 tous les
|
||||
utilisateurs.
|
||||
|
||||
«version 2.6 cmake-patch 1".
|
||||
Allez maintenant dans le répertoire conf (par défaut, ~/services/conf).
|
||||
Copiez l'exemple de fichier de configuration (example.conf) en
|
||||
services.conf et ouvrez ce dernier avec votre éditeur de texte favori.
|
||||
Il contient toutes les directives de configuration qu'Anope va utiliser
|
||||
en démarrant. Lisez attentivement les instructions contenues dans le
|
||||
fichier. L'utilisation des valeurs par défaut n'est pas toujours
|
||||
recommandée, et Anope ne fonctionnera probablement pas !
|
||||
|
||||
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 avez besoin d'aide, vous pouvez aller sur le site
|
||||
http://forum.anope.org/ ou le canal #anope sur irc.anope.org.
|
||||
Fournissez *l'essemble* des erreurs qui apparaîssent, en plus de
|
||||
toutes informations utiles, comme les versions de votre OS, du
|
||||
compilateur utilisé et de la librairie C++. Lisez le fichier README
|
||||
pour plus d'informations.
|
||||
|
||||
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
|
||||
2) Mettre à jour Anope
|
||||
|
||||
Pour mettre à jour Anope, suivez simplement les instructions
|
||||
d'installation décrites dans la section 1. Prenez garde cependant :
|
||||
|
||||
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.
|
||||
* IMPORTANT : Sauvegardez vos anciennes bases de données !
|
||||
* Si vous mettez à jour vers une nouvelle version majeure,
|
||||
recommencez *toujours* toute votre configuration à partir du
|
||||
fichier example.conf.
|
||||
|
||||
3) Configuration de l'IRCd
|
||||
|
||||
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 se connecter.
|
||||
|
||||
Ensuite, décompressez le package dans votre répertoire home, et allez dans le répértoire
|
||||
qui viens d'être crée.
|
||||
La configuration dépend de l'IRCd utilisé, mais vous aurez probablement
|
||||
besoin d'un bloc link (aussi appelé connect block, ou C:line) et un
|
||||
U:line (aussi appelé shared block). Assurez-vous que l'IRCd écoute
|
||||
sur le port donné dans le bloc link.
|
||||
|
||||
Maintenant, tapez ./Config pour lancer le script de configuration. Il va vous poser
|
||||
quelques questions, et compiler Anope sur votre système.
|
||||
Des exemples de configurations de bloc link peuvent être trouvés dans
|
||||
le fichier example.conf pour certains des IRCd les plus populaires.
|
||||
|
||||
Si vous ne savez pas repondre à une question, utilisez la valeur par défaut.
|
||||
Souvenez-vous de /rehash votre IRCd pour appliquer les changements.
|
||||
|
||||
|
||||
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/.
|
||||
|
||||
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 bloc 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.
|
||||
Un démarrage réussi ne générera pas de message.
|
||||
S'il y a des erreurs de syntaxe dans le fichier de configuration, elles
|
||||
seront affichées à 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, car certains IRCds sur certains systèmes peuvent être très
|
||||
lents pour le processus de liaison. Si rien ne se passe après environ
|
||||
une minute, il y a probablement un problème de configuration. Essayez
|
||||
de lancer Anope en mode debug avec ./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 les dossiers
|
||||
d'Anope (par défaut, ~/services/conf) 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
|
||||
testez 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. Entrez
|
||||
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/conf/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 les 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.
|
||||
+9
-2
@@ -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
|
||||
|
||||
|
||||
+1
-1
@@ -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>.
|
||||
|
||||
|
||||
+5
-12
@@ -71,19 +71,12 @@ 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 their location to Config.
|
||||
|
||||
-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
|
||||
use if you want. They are avaiable at http://anope.org/downloads/anope-extra.zip
|
||||
The OpenSSL, MySQL, and OpenLDAP header files and libraries are also included in
|
||||
this package. Once downloaded and extracted, you should run install.bat
|
||||
then give Config the path to the new 'installed' directory.
|
||||
The libraries used to build the 'extra' modules are available at
|
||||
https://github.com/Adam-/windows-scripts.
|
||||
|
||||
5) You are now ready to compile. If you said you wanted to use NMake in step 4,
|
||||
at the prompt type:
|
||||
|
||||
+2
-2
@@ -3,8 +3,8 @@ This allows external applications, such as websites, to execute remote procedure
|
||||
|
||||
Currently there are 5 supported XMLRPC calls, provided by m_xmlrpc_main:
|
||||
|
||||
checkAuthetication - Takes two parameters, an account name and a password. Checks if the account name is valid and the password
|
||||
is correct for the account name, useful for making login pages on websites.
|
||||
checkAuthentication - Takes two parameters, an account name and a password. Checks if the account name is valid and the password
|
||||
is correct for the account name, useful for making login pages on websites.
|
||||
|
||||
command - Takes three parameters, a service name (BotServ, ChanServ, NickServ), a user name (whether online or not), and the command
|
||||
to execute. This will execute a the given command to Anope using the given service name. If the user given is online, the
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -147,8 +147,13 @@ while (1)
|
||||
chop($input); # remove the trailing \n from the user input
|
||||
|
||||
if ($input eq "q") {
|
||||
if (-e "build") {
|
||||
system("cmake", "build/.");
|
||||
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"
|
||||
|
||||
@@ -7,7 +7,7 @@ get_target_property(version_BINARY version LOCATION)
|
||||
# Modify version.h from the above executable, with dependencies to version.cpp
|
||||
# and all of the source files in the main build
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version_build
|
||||
COMMAND ${version_BINARY} ${Anope_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
COMMAND ${version_BINARY} ${Anope_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
|
||||
DEPENDS version ${SRC_SRCS}
|
||||
)
|
||||
# Add version to list of files for CPack to ignore
|
||||
@@ -15,6 +15,7 @@ get_filename_component(version_BINARY ${version_BINARY} NAME)
|
||||
add_to_cpack_ignored_files("${version_BINARY}$" TRUE)
|
||||
if(NOT WIN32)
|
||||
add_to_cpack_ignored_files("version.h$" TRUE)
|
||||
add_to_cpack_ignored_files("build.h$" TRUE)
|
||||
endif(NOT WIN32)
|
||||
|
||||
set(PCH_SOURCES_GCH "")
|
||||
|
||||
+11
-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,6 +74,10 @@ 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
|
||||
@@ -86,9 +90,6 @@ class CoreExport ChanAccess : public Serializable
|
||||
AccessProvider *provider;
|
||||
/* Channel this access entry is on */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
/* account this access entry is for, if any */
|
||||
Serialize::Reference<NickCore> nc;
|
||||
Anope::string mask;
|
||||
Anope::string creator;
|
||||
time_t last_seen;
|
||||
time_t created;
|
||||
@@ -96,6 +97,10 @@ 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 &);
|
||||
|
||||
@@ -123,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;
|
||||
};
|
||||
|
||||
+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.
|
||||
|
||||
+19
-17
@@ -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;
|
||||
}
|
||||
|
||||
@@ -499,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);
|
||||
@@ -621,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
|
||||
@@ -762,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.
|
||||
*
|
||||
|
||||
+3
-1
@@ -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.
|
||||
*
|
||||
@@ -60,6 +60,8 @@ class CoreExport BotInfo : public User, public Serializable
|
||||
|
||||
void GenerateUID();
|
||||
|
||||
void OnKill();
|
||||
|
||||
/** Change the nickname for the bot.
|
||||
* @param newnick The nick to change to
|
||||
*/
|
||||
|
||||
+6
-5
@@ -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.
|
||||
@@ -242,9 +242,9 @@ class CoreExport Channel : public Base, public Extensible
|
||||
|
||||
/** Get a list of modes on a channel
|
||||
* @param name A mode name to get the list of
|
||||
* @return a pair of iterators for the beginning and end of the list
|
||||
* @return a vector of the list mode entries
|
||||
*/
|
||||
std::pair<ModeList::iterator, ModeList::iterator> GetModeList(const Anope::string &name);
|
||||
std::vector<Anope::string> GetModeList(const Anope::string &name);
|
||||
|
||||
/** Get a string of the modes set on this channel
|
||||
* @param complete Include mode parameters
|
||||
@@ -258,7 +258,7 @@ class CoreExport Channel : public Base, public Extensible
|
||||
* @param newtopic The new topic
|
||||
* @param ts The time the new topic is being set
|
||||
*/
|
||||
void ChangeTopicInternal(const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
|
||||
void ChangeTopicInternal(User *u, const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
|
||||
|
||||
/** Update the topic of the channel, and reset it if topiclock etc says to
|
||||
* @param user The user setting the topic
|
||||
@@ -276,10 +276,11 @@ class CoreExport Channel : public Base, public Extensible
|
||||
|
||||
/** 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(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
|
||||
|
||||
+3
-1
@@ -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.
|
||||
@@ -170,6 +170,8 @@ class CoreExport Command : public Service
|
||||
*/
|
||||
static void Run(CommandSource &source, const Anope::string &message);
|
||||
|
||||
void Run(CommandSource &source, const Anope::string &, const CommandInfo &, std::vector<Anope::string> ¶ms);
|
||||
|
||||
/** 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
|
||||
|
||||
+14
-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.
|
||||
@@ -51,14 +51,13 @@ namespace Configuration
|
||||
template<typename T> T Get(const Anope::string &tag, const Anope::string &def) const
|
||||
{
|
||||
const Anope::string &value = this->Get<const Anope::string>(tag, def);
|
||||
try
|
||||
{
|
||||
return convertTo<T>(value);
|
||||
}
|
||||
catch (const ConvertException &)
|
||||
{
|
||||
return T();
|
||||
}
|
||||
if (!value.empty())
|
||||
try
|
||||
{
|
||||
return convertTo<T>(value);
|
||||
}
|
||||
catch (const ConvertException &) { }
|
||||
return T();
|
||||
}
|
||||
|
||||
bool Set(const Anope::string &tag, const Anope::string &value);
|
||||
@@ -104,6 +103,8 @@ namespace Configuration
|
||||
time_t TimeoutCheck;
|
||||
/* options:usestrictprivmsg */
|
||||
bool UseStrictPrivmsg;
|
||||
/* networkinfo:nickchars */
|
||||
Anope::string NickChars;
|
||||
|
||||
/* either "/msg " or "/" */
|
||||
Anope::string StrictPrivmsg;
|
||||
@@ -129,13 +130,17 @@ namespace Configuration
|
||||
Anope::map<Anope::string> bots;
|
||||
|
||||
Conf();
|
||||
~Conf();
|
||||
|
||||
void LoadConf(File &file);
|
||||
void Post(Conf *old);
|
||||
|
||||
Block *GetModule(Module *);
|
||||
Block *GetModule(const Anope::string &name);
|
||||
|
||||
BotInfo *GetClient(const Anope::string &name);
|
||||
|
||||
Block *GetCommand(CommandSource &);
|
||||
};
|
||||
|
||||
struct Uplink
|
||||
|
||||
+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.
|
||||
@@ -52,4 +52,5 @@ struct Exception;
|
||||
struct MemoInfo;
|
||||
struct ModeLock;
|
||||
struct Oper;
|
||||
namespace SASL { struct Message; }
|
||||
|
||||
|
||||
@@ -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.
|
||||
@@ -176,6 +176,8 @@ class SerializableExtensibleItem : public PrimitiveExtensibleItem<T>
|
||||
T t;
|
||||
if (data[this->name] >> t)
|
||||
this->Set(e, t);
|
||||
else
|
||||
this->Unset(e);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -196,6 +198,8 @@ class SerializableExtensibleItem<bool> : public PrimitiveExtensibleItem<bool>
|
||||
data[this->name] >> b;
|
||||
if (b)
|
||||
this->Set(e);
|
||||
else
|
||||
this->Unset(e);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
+1
-1
@@ -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.
|
||||
*
|
||||
|
||||
+3
-3
@@ -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.
|
||||
@@ -74,7 +74,7 @@ namespace Language
|
||||
#define MORE_OBSCURE_PASSWORD _("Please try again with a more obscure password. Passwords should be at least\n" \
|
||||
"five characters long, should not be something easily guessed\n" \
|
||||
"(e.g. your real name or your nick), and cannot contain the space or tab characters.")
|
||||
#define PASSWORD_TOO_LONG _("Your password is too long. Please try again with a shorter password.")
|
||||
#define PASSWORD_TOO_LONG _("Your password is too long. It must not exceed %u characters.")
|
||||
#define NICK_NOT_REGISTERED _("Your nick isn't registered.")
|
||||
#define NICK_X_NOT_REGISTERED _("Nick \002%s\002 isn't registered.")
|
||||
#define NICK_X_NOT_IN_USE _("Nick \002%s\002 isn't currently in use.")
|
||||
@@ -107,7 +107,7 @@ namespace Language
|
||||
#define CHAN_SETTING_UNSET _("%s for %s unset.")
|
||||
#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" \
|
||||
|
||||
+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.
|
||||
|
||||
+7
-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.
|
||||
@@ -92,10 +92,15 @@ class CoreExport Log
|
||||
|
||||
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)
|
||||
|
||||
+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.
|
||||
|
||||
+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.
|
||||
|
||||
+3
-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.
|
||||
@@ -82,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;
|
||||
};
|
||||
@@ -131,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;
|
||||
};
|
||||
|
||||
+45
-12
@@ -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.
|
||||
*/
|
||||
@@ -88,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
|
||||
@@ -96,6 +96,9 @@ 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
|
||||
@@ -103,6 +106,20 @@ class CoreExport ChannelMode : public Mode
|
||||
ChannelMode(const Anope::string &name, char mc);
|
||||
|
||||
bool CanSet(User *u) const anope_override;
|
||||
|
||||
virtual void Check() { }
|
||||
|
||||
/** 'wrap' this channel mode and param to the underlying mode and param
|
||||
*/
|
||||
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
|
||||
@@ -120,7 +137,7 @@ class CoreExport ChannelModeList : public ChannelMode
|
||||
* @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.
|
||||
@@ -162,7 +179,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.
|
||||
@@ -186,6 +203,27 @@ class CoreExport ChannelModeStatus : public ChannelMode
|
||||
ChannelModeStatus(const Anope::string &name, char mc, char msymbol, short mlevel);
|
||||
};
|
||||
|
||||
/** 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();
|
||||
|
||||
void Check() anope_override;
|
||||
|
||||
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
|
||||
{
|
||||
@@ -225,7 +263,7 @@ 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 oper only channel modes
|
||||
@@ -257,13 +295,6 @@ class CoreExport ChannelModeNoone : public ChannelMode
|
||||
*/
|
||||
class CoreExport ModeManager
|
||||
{
|
||||
protected:
|
||||
/* Array of all modes Anope knows about. Modes are in this array at position
|
||||
* modechar. Additionally, status modes are in this array (again) at statuschar.
|
||||
*/
|
||||
static std::vector<ChannelMode *> ChannelModes;
|
||||
static std::vector<UserMode *> UserModes;
|
||||
|
||||
public:
|
||||
|
||||
/* Number of generic channel and user modes we are tracking */
|
||||
@@ -377,6 +408,8 @@ class CoreExport Entry
|
||||
*/
|
||||
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
|
||||
|
||||
+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.
|
||||
|
||||
+50
-24
@@ -1,6 +1,6 @@
|
||||
/* Modular support
|
||||
*
|
||||
* (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 "timers.h"
|
||||
#include "logger.h"
|
||||
#include "extensible.h"
|
||||
#include "version.h"
|
||||
|
||||
/** This definition is used as shorthand for the various classes
|
||||
* and functions needed to make a module loadable by the OS.
|
||||
@@ -40,6 +41,14 @@
|
||||
extern "C" void AnopeFini(x *m) \
|
||||
{ \
|
||||
delete m; \
|
||||
} \
|
||||
extern "C" DllExport ModuleVersionC AnopeVersion() \
|
||||
{ \
|
||||
ModuleVersionC ver; \
|
||||
ver.version_major = VERSION_MAJOR; \
|
||||
ver.version_minor = VERSION_MINOR; \
|
||||
ver.version_patch = VERSION_PATCH; \
|
||||
return ver; \
|
||||
}
|
||||
#else
|
||||
# define MODULE_INIT(x) \
|
||||
@@ -50,6 +59,14 @@
|
||||
extern "C" DllExport void AnopeFini(x *m) \
|
||||
{ \
|
||||
delete m; \
|
||||
} \
|
||||
extern "C" DllExport ModuleVersionC AnopeVersion() \
|
||||
{ \
|
||||
ModuleVersionC ver; \
|
||||
ver.version_major = VERSION_MAJOR; \
|
||||
ver.version_minor = VERSION_MINOR; \
|
||||
ver.version_patch = VERSION_PATCH; \
|
||||
return ver; \
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -173,6 +190,11 @@ enum
|
||||
};
|
||||
typedef unsigned short ModType;
|
||||
|
||||
struct ModuleVersionC
|
||||
{
|
||||
int version_major, version_minor, version_patch;
|
||||
};
|
||||
|
||||
/** Returned by Module::GetVersion, used to see what version of Anope
|
||||
* a module is compiled against.
|
||||
*/
|
||||
@@ -184,12 +206,7 @@ class ModuleVersion
|
||||
int version_patch;
|
||||
|
||||
public:
|
||||
/** Constructor
|
||||
* @param major The major version numbber
|
||||
* @param minor The minor version numbber
|
||||
* @param patch The patch version numbber
|
||||
*/
|
||||
ModuleVersion(int major, int minor, int patch);
|
||||
ModuleVersion(const ModuleVersionC &);
|
||||
|
||||
/** Get the major version of Anope this was built against
|
||||
* @return The major version
|
||||
@@ -279,11 +296,7 @@ class CoreExport Module : public Extensible
|
||||
*/
|
||||
void SetAuthor(const Anope::string &author);
|
||||
|
||||
/** Get the version of Anope this module was
|
||||
* compiled against
|
||||
* @return The version
|
||||
*/
|
||||
ModuleVersion GetVersion() const;
|
||||
virtual void Prioritize();
|
||||
|
||||
/* Everything below here are events. Modules must ModuleManager::Attach to these events
|
||||
* before they will be called.
|
||||
@@ -472,11 +485,12 @@ class CoreExport Module : public Extensible
|
||||
virtual void OnJoinChannel(User *u, Channel *c) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new topic is set
|
||||
* @param source The user changing the topic, if any
|
||||
* @param c The channel
|
||||
* @param setter The user who set the new topic
|
||||
* @param setter The user who set the new topic, if there is no source
|
||||
* @param topic The new topic
|
||||
*/
|
||||
virtual void OnTopicUpdated(Channel *c, const Anope::string &user, const Anope::string &topic) { throw NotImplementedException(); }
|
||||
virtual void OnTopicUpdated(User *source, Channel *c, const Anope::string &user, const Anope::string &topic) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a channel expires
|
||||
* @param ci The channel
|
||||
@@ -719,11 +733,6 @@ class CoreExport Module : public Extensible
|
||||
*/
|
||||
virtual void OnNickDrop(CommandSource &source, NickAlias *na) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is forbidden
|
||||
* @param na The nick alias of the forbidden nick
|
||||
*/
|
||||
virtual void OnNickForbidden(NickAlias *na) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user groups their nick
|
||||
* @param u The user grouping
|
||||
* @param target The target they're grouping to
|
||||
@@ -748,8 +757,15 @@ class CoreExport Module : public Extensible
|
||||
/** Called when a nick is registered
|
||||
* @param user The user registering the nick, of any
|
||||
* @param The nick
|
||||
* @param pass The password of the newly registered nick
|
||||
*/
|
||||
virtual void OnNickRegister(User *user, NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnNickRegister(User *user, NickAlias *na, const Anope::string &pass) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is confirmed. This will never be called if registration confirmation is not enabled.
|
||||
* @param user The user confirming the nick
|
||||
* @param The account being confirmed
|
||||
*/
|
||||
virtual void OnNickConfirm(User *user, NickCore *) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is suspended
|
||||
* @param na The nick alias
|
||||
@@ -867,6 +883,11 @@ class CoreExport Module : public Extensible
|
||||
*/
|
||||
virtual void OnSetVhost(NickAlias *na) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a users host changes
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnSetDisplayedHost(User *) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a memo is sent
|
||||
* @param source The source of the memo
|
||||
* @param target The target of the memo
|
||||
@@ -1005,7 +1026,7 @@ class CoreExport Module : public Extensible
|
||||
* mostly to ensure mlock/+r are set.
|
||||
* @param c The channel
|
||||
*/
|
||||
virtual void OnCheckModes(Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnCheckModes(Reference<Channel> &c) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is synced.
|
||||
* Channels are synced after a sjoin is finished processing
|
||||
@@ -1089,11 +1110,11 @@ enum Implementation
|
||||
I_OnPreUserLogoff, I_OnPostUserLogoff, I_OnBotCreate, I_OnBotChange, I_OnBotDelete, I_OnAccessDel, I_OnAccessAdd,
|
||||
I_OnAccessClear, I_OnLevelChange, I_OnChanDrop, I_OnChanRegistered, I_OnChanSuspend, I_OnChanUnsuspend,
|
||||
I_OnCreateChan, I_OnDelChan, I_OnChannelCreate, I_OnChannelDelete, I_OnAkickAdd, I_OnAkickDel, I_OnCheckKick,
|
||||
I_OnChanInfo, I_OnCheckPriv, I_OnGroupCheckPriv, I_OnNickDrop, I_OnNickForbidden, I_OnNickGroup, I_OnNickIdentify,
|
||||
I_OnUserLogin, I_OnNickLogout, I_OnNickRegister, I_OnNickSuspend, I_OnNickUnsuspended, I_OnDelNick, I_OnNickCoreCreate,
|
||||
I_OnChanInfo, I_OnCheckPriv, I_OnGroupCheckPriv, I_OnNickDrop, I_OnNickGroup, I_OnNickIdentify,
|
||||
I_OnUserLogin, I_OnNickLogout, I_OnNickRegister, I_OnNickConfirm, I_OnNickSuspend, I_OnNickUnsuspended, I_OnDelNick, I_OnNickCoreCreate,
|
||||
I_OnDelCore, I_OnChangeCoreDisplay, I_OnNickClearAccess, I_OnNickAddAccess, I_OnNickEraseAccess, I_OnNickClearCert,
|
||||
I_OnNickAddCert, I_OnNickEraseCert, I_OnNickInfo, I_OnBotInfo, I_OnCheckAuthentication, I_OnNickUpdate,
|
||||
I_OnFingerprint, I_OnUserAway, I_OnInvite, I_OnDeleteVhost, I_OnSetVhost, I_OnMemoSend, I_OnMemoDel,
|
||||
I_OnFingerprint, I_OnUserAway, I_OnInvite, I_OnDeleteVhost, I_OnSetVhost, I_OnSetDisplayedHost, I_OnMemoSend, I_OnMemoDel,
|
||||
I_OnChannelModeSet, I_OnChannelModeUnset, I_OnUserModeSet, I_OnUserModeUnset, I_OnChannelModeAdd, I_OnUserModeAdd,
|
||||
I_OnMLock, I_OnUnMLock, I_OnModuleLoad, I_OnModuleUnload, I_OnServerSync, I_OnUplinkSync, I_OnBotPrivmsg, I_OnBotNotice,
|
||||
I_OnPrivmsg, I_OnLog, I_OnLogMessage, I_OnDnsRequest, I_OnCheckModes, I_OnChannelSync, I_OnSetCorrectModes,
|
||||
@@ -1196,6 +1217,11 @@ class CoreExport ModuleManager
|
||||
* @return MOD_ERR_OK on success, anything else on fail
|
||||
*/
|
||||
static ModuleReturn DeleteModule(Module *m);
|
||||
|
||||
/** Get the version of Anope the module was compiled against
|
||||
* @return The version
|
||||
*/
|
||||
static ModuleVersion GetVersion(void *handle);
|
||||
};
|
||||
|
||||
#endif // MODULES_H
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (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,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;
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
struct CSSuspendInfo
|
||||
{
|
||||
Anope::string chan, by, reason;
|
||||
time_t time, expires;
|
||||
|
||||
virtual ~CSSuspendInfo() { }
|
||||
protected:
|
||||
CSSuspendInfo() { }
|
||||
};
|
||||
@@ -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.
|
||||
|
||||
@@ -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
-26
@@ -1,8 +1,6 @@
|
||||
#ifndef ANOPE_LDAP_H
|
||||
#define ANOPE_LDAP_H
|
||||
|
||||
typedef int LDAPQuery;
|
||||
|
||||
class LDAPException : public ModuleException
|
||||
{
|
||||
public:
|
||||
@@ -59,28 +57,26 @@ struct LDAPAttributes : public std::map<Anope::string, std::vector<Anope::string
|
||||
}
|
||||
};
|
||||
|
||||
enum QueryType
|
||||
{
|
||||
QUERY_UNKNOWN,
|
||||
QUERY_BIND,
|
||||
QUERY_SEARCH,
|
||||
QUERY_ADD,
|
||||
QUERY_DELETE,
|
||||
QUERY_MODIFY
|
||||
};
|
||||
|
||||
struct LDAPResult
|
||||
{
|
||||
std::vector<LDAPAttributes> messages;
|
||||
Anope::string error;
|
||||
|
||||
enum QueryType
|
||||
{
|
||||
QUERY_UNKNOWN,
|
||||
QUERY_BIND,
|
||||
QUERY_SEARCH,
|
||||
QUERY_ADD,
|
||||
QUERY_DELETE,
|
||||
QUERY_MODIFY
|
||||
};
|
||||
|
||||
QueryType type;
|
||||
LDAPQuery id;
|
||||
|
||||
LDAPResult()
|
||||
{
|
||||
this->type = QUERY_UNKNOWN;
|
||||
this->id = -1;
|
||||
}
|
||||
|
||||
size_t size() const
|
||||
@@ -126,48 +122,42 @@ class LDAPProvider : public Service
|
||||
|
||||
/** Attempt to bind to the LDAP server as an admin
|
||||
* @param i The LDAPInterface the result is sent to
|
||||
* @return The query ID
|
||||
*/
|
||||
virtual LDAPQuery BindAsAdmin(LDAPInterface *i) = 0;
|
||||
virtual void BindAsAdmin(LDAPInterface *i) = 0;
|
||||
|
||||
/** Bind to LDAP
|
||||
* @param i The LDAPInterface the result is sent to
|
||||
* @param who The binddn
|
||||
* @param pass The password
|
||||
* @return The query ID
|
||||
*/
|
||||
virtual LDAPQuery Bind(LDAPInterface *i, const Anope::string &who, const Anope::string &pass) = 0;
|
||||
virtual void Bind(LDAPInterface *i, const Anope::string &who, const Anope::string &pass) = 0;
|
||||
|
||||
/** Search ldap for the specified filter
|
||||
* @param i The LDAPInterface the result is sent to
|
||||
* @param base The base DN to search
|
||||
* @param filter The filter to apply
|
||||
* @return The query ID
|
||||
*/
|
||||
virtual LDAPQuery Search(LDAPInterface *i, const Anope::string &base, const Anope::string &filter) = 0;
|
||||
virtual void Search(LDAPInterface *i, const Anope::string &base, const Anope::string &filter) = 0;
|
||||
|
||||
/** Add an entry to LDAP
|
||||
* @param i The LDAPInterface the result is sent to
|
||||
* @param dn The dn of the entry to add
|
||||
* @param attributes The attributes
|
||||
* @return The query ID
|
||||
*/
|
||||
virtual LDAPQuery Add(LDAPInterface *i, const Anope::string &dn, LDAPMods &attributes) = 0;
|
||||
virtual void Add(LDAPInterface *i, const Anope::string &dn, LDAPMods &attributes) = 0;
|
||||
|
||||
/** Delete an entry from LDAP
|
||||
* @param i The LDAPInterface the result is sent to
|
||||
* @param dn The dn of the entry to delete
|
||||
* @return The query ID
|
||||
*/
|
||||
virtual LDAPQuery Del(LDAPInterface *i, const Anope::string &dn) = 0;
|
||||
virtual void Del(LDAPInterface *i, const Anope::string &dn) = 0;
|
||||
|
||||
/** Modify an existing entry in LDAP
|
||||
* @param i The LDAPInterface the result is sent to
|
||||
* @param base The base DN to modify
|
||||
* @param attributes The attributes to modify
|
||||
* @return The query ID
|
||||
*/
|
||||
virtual LDAPQuery Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) = 0;
|
||||
virtual void Modify(LDAPInterface *i, const Anope::string &base, LDAPMods &attributes) = 0;
|
||||
};
|
||||
|
||||
#endif // ANOPE_LDAP_H
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* NickServ core functions
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -60,3 +60,12 @@ struct NSCertList
|
||||
|
||||
virtual void Check() = 0;
|
||||
};
|
||||
|
||||
class CertService : public Service
|
||||
{
|
||||
public:
|
||||
CertService(Module *c) : Service(c, "CertService", "certs") { }
|
||||
|
||||
virtual NickCore* FindAccountFromCert(const Anope::string &cert) = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ enum ForbidType
|
||||
FT_SIZE
|
||||
};
|
||||
|
||||
struct ForbidData : Serializable
|
||||
struct ForbidData
|
||||
{
|
||||
Anope::string mask;
|
||||
Anope::string creator;
|
||||
@@ -19,9 +19,9 @@ struct ForbidData : Serializable
|
||||
time_t expires;
|
||||
ForbidType type;
|
||||
|
||||
ForbidData() : Serializable("ForbidData") { }
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
virtual ~ForbidData() { }
|
||||
protected:
|
||||
ForbidData() : created(0), expires(0) { }
|
||||
};
|
||||
|
||||
class ForbidService : public Service
|
||||
@@ -33,6 +33,8 @@ class ForbidService : public Service
|
||||
|
||||
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;
|
||||
@@ -40,43 +42,5 @@ class ForbidService : public Service
|
||||
|
||||
static ServiceReference<ForbidService> forbid_service("ForbidService", "forbid");
|
||||
|
||||
void ForbidData::Serialize(Serialize::Data &data) const
|
||||
{
|
||||
data["mask"] << this->mask;
|
||||
data["creator"] << this->creator;
|
||||
data["reason"] << this->reason;
|
||||
data["created"] << this->created;
|
||||
data["expires"] << this->expires;
|
||||
data["type"] << this->type;
|
||||
}
|
||||
|
||||
Serializable* ForbidData::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
if (!forbid_service)
|
||||
return NULL;
|
||||
|
||||
ForbidData *fb;
|
||||
if (obj)
|
||||
fb = anope_dynamic_static_cast<ForbidData *>(obj);
|
||||
else
|
||||
fb = new ForbidData;
|
||||
|
||||
data["mask"] >> fb->mask;
|
||||
data["creator"] >> fb->creator;
|
||||
data["reason"] >> fb->reason;
|
||||
data["created"] >> fb->created;
|
||||
data["expires"] >> fb->expires;
|
||||
unsigned int t;
|
||||
data["type"] >> t;
|
||||
fb->type = static_cast<ForbidType>(t);
|
||||
|
||||
if (t > FT_SIZE - 1)
|
||||
return NULL;
|
||||
|
||||
if (!obj)
|
||||
forbid_service->AddForbid(fb);
|
||||
return fb;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
+11
-45
@@ -1,6 +1,6 @@
|
||||
/* OperServ ignore interface
|
||||
*
|
||||
* (C) 2003-2013 Anope Team
|
||||
* (C) 2003-2014 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -10,70 +10,36 @@
|
||||
*/
|
||||
|
||||
|
||||
struct IgnoreData : Serializable
|
||||
struct IgnoreData
|
||||
{
|
||||
Anope::string mask;
|
||||
Anope::string creator;
|
||||
Anope::string reason;
|
||||
time_t time; /* When do we stop ignoring them? */
|
||||
|
||||
IgnoreData() : Serializable("IgnoreData") { }
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
virtual ~IgnoreData() { }
|
||||
protected:
|
||||
IgnoreData() : time(0) { }
|
||||
};
|
||||
|
||||
class IgnoreService : public Service
|
||||
{
|
||||
protected:
|
||||
std::list<IgnoreData> ignores;
|
||||
|
||||
IgnoreService(Module *c) : Service(c, "IgnoreService", "ignore") { }
|
||||
|
||||
public:
|
||||
virtual IgnoreData* AddIgnore(const Anope::string &mask, const Anope::string &creator, const Anope::string &reason, time_t delta = Anope::CurTime) = 0;
|
||||
virtual void AddIgnore(IgnoreData *) = 0;
|
||||
|
||||
virtual bool DelIgnore(const Anope::string &mask) = 0;
|
||||
virtual void DelIgnore(IgnoreData *) = 0;
|
||||
|
||||
inline void ClearIgnores() { this->ignores.clear(); }
|
||||
virtual void ClearIgnores() = 0;
|
||||
|
||||
virtual IgnoreData *Create() = 0;
|
||||
|
||||
virtual IgnoreData *Find(const Anope::string &mask) = 0;
|
||||
|
||||
inline std::list<IgnoreData> &GetIgnores() { return this->ignores; }
|
||||
virtual std::vector<IgnoreData *> &GetIgnores() = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<IgnoreService> ignore_service("IgnoreService", "ignore");
|
||||
|
||||
void IgnoreData::Serialize(Serialize::Data &data) const
|
||||
{
|
||||
data["mask"] << this->mask;
|
||||
data["creator"] << this->creator;
|
||||
data["reason"] << this->reason;
|
||||
data["time"] << this->time;
|
||||
}
|
||||
|
||||
Serializable* IgnoreData::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
if (!ignore_service)
|
||||
return NULL;
|
||||
|
||||
if (obj)
|
||||
{
|
||||
IgnoreData *ign = anope_dynamic_static_cast<IgnoreData *>(obj);
|
||||
data["mask"] >> ign->mask;
|
||||
data["creator"] >> ign->creator;
|
||||
data["reason"] >> ign->reason;
|
||||
data["time"] >> ign->time;
|
||||
return ign;
|
||||
}
|
||||
|
||||
Anope::string smask, screator, sreason;
|
||||
time_t t;
|
||||
|
||||
data["mask"] >> smask;
|
||||
data["creator"] >> screator;
|
||||
data["reason"] >> sreason;
|
||||
data["time"] >> t;
|
||||
|
||||
return ignore_service->AddIgnore(smask, screator, sreason, t);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,14 +23,14 @@ struct NewsItem : Serializable
|
||||
time_t time;
|
||||
|
||||
NewsItem() : Serializable("NewsItem") { }
|
||||
void Serialize(Serialize::Data &data) const anope_override;
|
||||
static Serializable* Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
};
|
||||
|
||||
class NewsService : public Service
|
||||
{
|
||||
public:
|
||||
NewsService(Module *m) : Service(m, "NewsService", "news") { }
|
||||
|
||||
virtual NewsItem *CreateNewsItem() = 0;
|
||||
|
||||
virtual void AddNewsItem(NewsItem *n) = 0;
|
||||
|
||||
@@ -41,36 +41,5 @@ class NewsService : public Service
|
||||
|
||||
static ServiceReference<NewsService> news_service("NewsService", "news");
|
||||
|
||||
void NewsItem::Serialize(Serialize::Data &data) const
|
||||
{
|
||||
data["type"] << this->type;
|
||||
data["text"] << this->text;
|
||||
data["who"] << this->who;
|
||||
data["time"] << this->time;
|
||||
}
|
||||
|
||||
Serializable* NewsItem::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
if (!news_service)
|
||||
return NULL;
|
||||
|
||||
NewsItem *ni;
|
||||
if (obj)
|
||||
ni = anope_dynamic_static_cast<NewsItem *>(obj);
|
||||
else
|
||||
ni = new NewsItem();
|
||||
|
||||
unsigned int t;
|
||||
data["type"] >> t;
|
||||
ni->type = static_cast<NewsType>(t);
|
||||
data["text"] >> ni->text;
|
||||
data["who"] >> ni->who;
|
||||
data["time"] >> ni->time;
|
||||
|
||||
if (!obj)
|
||||
news_service->AddNewsItem(ni);
|
||||
return ni;
|
||||
}
|
||||
|
||||
#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
|
||||
@@ -32,6 +32,8 @@ class SessionService : public Service
|
||||
|
||||
SessionService(Module *m) : Service(m, "SessionService", "session") { }
|
||||
|
||||
virtual Exception *CreateException() = 0;
|
||||
|
||||
virtual void AddException(Exception *e) = 0;
|
||||
|
||||
virtual void DelException(Exception *e) = 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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/* NickServ core functions
|
||||
*
|
||||
* (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,12 +8,11 @@
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
struct NSSuspendInfo
|
||||
struct SuspendInfo
|
||||
{
|
||||
Anope::string nick, by, reason;
|
||||
Anope::string what, by, reason;
|
||||
time_t when, expires;
|
||||
|
||||
virtual ~NSSuspendInfo() { }
|
||||
protected:
|
||||
NSSuspendInfo() { }
|
||||
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
|
||||
|
||||
+18
-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.
|
||||
@@ -40,6 +40,9 @@ class CoreExport IRCDProto : public Service
|
||||
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? */
|
||||
@@ -64,11 +67,17 @@ 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.
|
||||
* @param s The server
|
||||
@@ -111,6 +120,8 @@ 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 Who is doing the kill
|
||||
* @param user The user to be killed
|
||||
@@ -204,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.
|
||||
@@ -217,6 +228,9 @@ 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 &);
|
||||
@@ -227,6 +241,8 @@ class CoreExport IRCDProto : public Service
|
||||
* Defaults to Config->ListSize
|
||||
*/
|
||||
virtual unsigned GetMaxListFor(Channel *c);
|
||||
|
||||
virtual Anope::string NormalizeMask(const Anope::string &mask);
|
||||
};
|
||||
|
||||
class CoreExport MessageSource
|
||||
|
||||
@@ -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.
|
||||
@@ -198,6 +198,11 @@ class CoreExport ChannelInfo : public Serializable, public Extensible
|
||||
*/
|
||||
void ClearAkick();
|
||||
|
||||
/** Get the level entries for the channel.
|
||||
* @return The levels for the channel.
|
||||
*/
|
||||
const Anope::map<int16_t> &GetLevelEntries();
|
||||
|
||||
/** Get the level for a privilege
|
||||
* @param priv The privilege name
|
||||
* @return the level
|
||||
|
||||
+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.
|
||||
|
||||
+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.
|
||||
@@ -60,9 +60,9 @@ class CoreExport Serializable : public virtual Base
|
||||
* constructed before other objects are if it isn't.
|
||||
*/
|
||||
static std::list<Serializable *> *SerializableItems;
|
||||
friend class Serialize::Type;
|
||||
/* The type of item this object is */
|
||||
Serialize::Type *s_type;
|
||||
private:
|
||||
/* Iterator into serializable_items */
|
||||
std::list<Serializable *>::iterator s_iter;
|
||||
/* The hash of the last serialized form of this object commited to the database */
|
||||
@@ -109,7 +109,7 @@ class CoreExport Serializable : public virtual Base
|
||||
* of class that inherits from Serialiable. Used for unserializing objects
|
||||
* of this type, as it requires a function pointer to a static member function.
|
||||
*/
|
||||
class CoreExport Serialize::Type
|
||||
class CoreExport Serialize::Type : public Base
|
||||
{
|
||||
typedef Serializable* (*unserialize_func)(Serializable *obj, Serialize::Data &);
|
||||
|
||||
@@ -188,7 +188,7 @@ class Serialize::Checker
|
||||
{
|
||||
Anope::string name;
|
||||
T obj;
|
||||
mutable Serialize::Type *type;
|
||||
mutable ::Reference<Serialize::Type> type;
|
||||
|
||||
inline void Check() const
|
||||
{
|
||||
|
||||
+8
-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.
|
||||
@@ -23,10 +23,6 @@ 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
|
||||
@@ -62,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;
|
||||
|
||||
@@ -169,6 +166,11 @@ 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
|
||||
|
||||
+3
-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.
|
||||
@@ -20,7 +20,7 @@
|
||||
/** 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);
|
||||
}
|
||||
|
||||
+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.
|
||||
|
||||
@@ -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
|
||||
|
||||
+4
-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.
|
||||
@@ -59,7 +59,7 @@ union CoreExport sockaddrs
|
||||
|
||||
/** 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
|
||||
@@ -82,8 +82,6 @@ union CoreExport sockaddrs
|
||||
* @throws A socket exception if given an invalid structure
|
||||
*/
|
||||
void ntop(int type, const void *src);
|
||||
|
||||
bool valid() const;
|
||||
};
|
||||
|
||||
class CoreExport cidr
|
||||
@@ -94,6 +92,7 @@ class CoreExport cidr
|
||||
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(const sockaddrs &other);
|
||||
bool valid() const;
|
||||
@@ -347,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, ...);
|
||||
|
||||
@@ -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.
|
||||
|
||||
+1
-1
@@ -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.
|
||||
|
||||
+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.
|
||||
@@ -25,6 +25,7 @@ namespace Uplink
|
||||
class UplinkSocket : public ConnectionSocket, public BufferedSocket
|
||||
{
|
||||
public:
|
||||
bool error;
|
||||
UplinkSocket();
|
||||
~UplinkSocket();
|
||||
bool ProcessRead() anope_override;
|
||||
|
||||
+9
-6
@@ -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;
|
||||
|
||||
@@ -71,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. */
|
||||
@@ -92,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
|
||||
*
|
||||
@@ -102,19 +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, NickCore *nc);
|
||||
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
|
||||
@@ -323,7 +326,7 @@ class CoreExport User : public virtual Base, public Extensible, public CommandRe
|
||||
/** 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
|
||||
|
||||
+88
-36
@@ -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.
|
||||
@@ -13,7 +13,7 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <list>
|
||||
#include <map>
|
||||
|
||||
static std::string get_git_hash(const std::string &git_dir)
|
||||
{
|
||||
@@ -45,29 +45,16 @@ static std::string get_git_hash(const std::string &git_dir)
|
||||
return "g" + filebuf.substr(0, 7);
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
static bool read_version_sh(const std::string &version_sh, std::map<std::string, std::string> &versions)
|
||||
{
|
||||
if (argc < 3)
|
||||
{
|
||||
std::cerr << "Syntax: " << argv[0] << " <base> <version.h>" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string version_sh = std::string(argv[1]) + "/src/version.sh";
|
||||
std::string git_dir = std::string(argv[1]) + "/.git";
|
||||
|
||||
std::fstream fd;
|
||||
|
||||
fd.clear();
|
||||
fd.open(version_sh.c_str(), std::ios::in);
|
||||
std::fstream fd(version_sh.c_str(), std::ios::in);
|
||||
if (!fd.is_open())
|
||||
{
|
||||
std::cerr << "Error: Unable to open src/version.sh for reading: " << version_sh << std::endl;
|
||||
return 1;
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string filebuf;
|
||||
std::list<std::pair<std::string, std::string> > versions;
|
||||
while (getline(fd, filebuf))
|
||||
{
|
||||
if (!filebuf.find("VERSION_"))
|
||||
@@ -75,24 +62,25 @@ int main(int argc, char *argv[])
|
||||
size_t eq = filebuf.find('=');
|
||||
|
||||
std::string type = filebuf.substr(0, eq);
|
||||
std::string value = filebuf.substr(eq + 2, filebuf.length() - eq - 3);
|
||||
versions.push_back(std::make_pair(type, value));
|
||||
std::string value = filebuf.substr(eq + 1);
|
||||
|
||||
versions[type] = value;
|
||||
}
|
||||
}
|
||||
|
||||
fd.close();
|
||||
|
||||
std::string git_version = get_git_hash(git_dir);
|
||||
if (!git_version.empty())
|
||||
versions.push_back(std::make_pair("VERSION_GIT", git_version));
|
||||
return true;
|
||||
}
|
||||
|
||||
fd.clear();
|
||||
fd.open(argv[2], std::ios::in);
|
||||
static bool write_build_h(const std::string &buildh, const std::string &git_version)
|
||||
{
|
||||
std::fstream fd(buildh.c_str(), std::ios::in);
|
||||
|
||||
std::string build = "#define BUILD 1";
|
||||
if (fd.is_open())
|
||||
{
|
||||
while (getline(fd, filebuf))
|
||||
for (std::string filebuf; getline(fd, filebuf);)
|
||||
{
|
||||
if (!filebuf.find("#define BUILD"))
|
||||
{
|
||||
@@ -110,27 +98,91 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
fd.clear();
|
||||
fd.open(argv[2], std::ios::out);
|
||||
|
||||
fd.open(buildh.c_str(), std::ios::out);
|
||||
if (!fd.is_open())
|
||||
{
|
||||
std::cerr << "Error: Unable to include/version.h for writing: " << argv[2] << std::endl;
|
||||
return 1;
|
||||
std::cerr << "Error: Unable to open build.h for writing: " << buildh << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
fd << "/* This file is automatically generated by version.cpp - do not edit it! */" << std::endl;
|
||||
fd << build << std::endl;
|
||||
if (!git_version.empty())
|
||||
fd << "#define VERSION_GIT \"" << git_version << "\"" << std::endl;
|
||||
fd.close();
|
||||
|
||||
for (std::list<std::pair<std::string, std::string> >::iterator it = versions.begin(), it_end = versions.end(); it != it_end; ++it)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void read_version_h(const std::string &versionh, std::map<std::string, std::string> &versions)
|
||||
{
|
||||
std::fstream fd(versionh.c_str(), std::ios::in);
|
||||
|
||||
if (!fd.is_open())
|
||||
return;
|
||||
|
||||
for (std::string filebuf; getline(fd, filebuf);)
|
||||
{
|
||||
if (it->first == "VERSION_EXTRA" || it->first == "VERSION_GIT")
|
||||
fd << "#define " << it->first << " \"" << it->second << "\"" << std::endl;
|
||||
else
|
||||
fd << "#define " << it->first << " " << it->second << std::endl;
|
||||
if (!filebuf.find("#define VERSION_"))
|
||||
{
|
||||
size_t space = filebuf.substr(8).find(' ');
|
||||
|
||||
std::string name = filebuf.substr(8).substr(0, space),
|
||||
version = filebuf.substr(8).substr(space + 1);
|
||||
|
||||
versions[name] = version;
|
||||
}
|
||||
}
|
||||
|
||||
fd << build << std::endl;
|
||||
fd.close();
|
||||
}
|
||||
|
||||
static bool write_version_h(const std::string &versionh, const std::map<std::string, std::string> &versions)
|
||||
{
|
||||
std::fstream fd(versionh.c_str(), std::ios::out);
|
||||
|
||||
if (!fd.is_open())
|
||||
return false;
|
||||
|
||||
for (std::map<std::string, std::string>::const_iterator it = versions.begin(); it != versions.end(); ++it)
|
||||
{
|
||||
fd << "#define " << it->first << " " << it->second << std::endl;
|
||||
}
|
||||
|
||||
fd.close();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
if (argc < 4)
|
||||
{
|
||||
std::cerr << "Syntax: " << argv[0] << " <base> <version.h> <build.h>" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::string version_sh = std::string(argv[1]) + "/src/version.sh";
|
||||
std::string git_dir = std::string(argv[1]) + "/.git";
|
||||
std::string versionh = argv[2];
|
||||
std::string buildh = argv[3];
|
||||
|
||||
std::map<std::string, std::string> versions, old_versions;
|
||||
|
||||
if (!read_version_sh(version_sh, versions))
|
||||
return -1;
|
||||
|
||||
std::string git_version = get_git_hash(git_dir);
|
||||
if (!write_build_h(buildh, git_version))
|
||||
return -1;
|
||||
|
||||
read_version_h(versionh, old_versions);
|
||||
|
||||
if (versions == old_versions)
|
||||
return 0;
|
||||
|
||||
if (!write_version_h(versionh, versions))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+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;
|
||||
|
||||
|
||||
+1041
-965
File diff suppressed because it is too large
Load Diff
+1048
-966
File diff suppressed because it is too large
Load Diff
+1053
-960
File diff suppressed because it is too large
Load Diff
+10955
File diff suppressed because it is too large
Load Diff
+1300
-1296
File diff suppressed because it is too large
Load Diff
+4252
-4777
File diff suppressed because it is too large
Load Diff
+1037
-963
File diff suppressed because it is too large
Load Diff
+3616
-4196
File diff suppressed because it is too large
Load Diff
+1389
-1297
File diff suppressed because it is too large
Load Diff
+1037
-963
File diff suppressed because it is too large
Load Diff
+1038
-961
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