mirror of
https://github.com/anope/anope.git
synced 2026-06-12 20:34:48 +02:00
Compare commits
4016 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b51c6453ae | |||
| 8a44b9c0ea | |||
| 0dd5430c94 | |||
| 046fa5c848 | |||
| 551f3504c8 | |||
| c11638db98 | |||
| 9ca69a7b49 | |||
| 459c7947ce | |||
| fad0a4a0e8 | |||
| 1630ccedb1 | |||
| 36d69b1e5c | |||
| 627b89ec7b | |||
| 9373677610 | |||
| bbb65ddc33 | |||
| 508bbe11e6 | |||
| 095ed3c8c8 | |||
| f3743cd37d | |||
| 0c155e0c05 | |||
| f362959834 | |||
| f5a85c69d2 | |||
| c8b3819767 | |||
| e6a1982922 | |||
| 40a1dc9536 | |||
| 70bf013ef0 | |||
| 18dfa62626 | |||
| d815906393 | |||
| 452e62c050 | |||
| 4916e1dbfc | |||
| fa7ed12aad | |||
| 94c20f3084 | |||
| 597d4a1aee | |||
| 1e95d0f536 | |||
| ad0b4d1aa0 | |||
| 74e9a9d2fe | |||
| d2aee394ea | |||
| 3e696fae0f | |||
| ce362854a3 | |||
| a883b616a1 | |||
| b421ba258e | |||
| 3691887297 | |||
| 75e2501500 | |||
| 1c6db37681 | |||
| 5c2fc1cedd | |||
| d891f2bcbd | |||
| 5eb13f4420 | |||
| bd9d3b0f7d | |||
| cbb41241d4 | |||
| b9acaa6d51 | |||
| 9d18fdf0f6 | |||
| d04a312d0d | |||
| 099f0ce43a | |||
| 07bd1bbec9 | |||
| aa0a687a58 | |||
| b89cc47642 | |||
| d87fa4d781 | |||
| 9351debd73 | |||
| 40d558ef21 | |||
| e1224ac486 | |||
| ddd33e65b4 | |||
| e4f88d44cd | |||
| 063b4a9918 | |||
| c6065ff0f3 | |||
| a5aae4f41d | |||
| d019da673d | |||
| 4d7adbf2b7 | |||
| 404bf77ef5 | |||
| 69393a5f14 | |||
| 97c63822fc | |||
| 698dd78ef8 | |||
| 0b36ddfaf3 | |||
| 947ddc9e1b | |||
| 59d516d5b0 | |||
| 2ecb667d1c | |||
| c21f6ac597 | |||
| 390d0482fc | |||
| 65bb0a374b | |||
| ea4877dc16 | |||
| 4024598bd8 | |||
| a154532e98 | |||
| 665b0fdef8 | |||
| 0802d9d3ff | |||
| 8d3b8c08b3 | |||
| f3e5ccf353 | |||
| b5213d5a81 | |||
| dc09408f1a | |||
| 49d86527ef | |||
| 65183c3c49 | |||
| c60477384c | |||
| 25c3fd51b7 | |||
| a40eaeb2a3 | |||
| e14a650cb9 | |||
| 6401e328bb | |||
| 43dc6f7509 | |||
| 8f0ee6f383 | |||
| 1adbce61cb | |||
| fe60c9a085 | |||
| 39bb5825ad | |||
| 602ff60e21 | |||
| 8d0399e356 | |||
| a4d0213bcb | |||
| ecbf53ba6c | |||
| 6d72fd67d8 | |||
| 0a11bc7693 | |||
| e86fa67e38 | |||
| 1fc2642034 | |||
| 1641f6415a | |||
| bb1f93f150 | |||
| 85fbc500d8 | |||
| 99bcc6d3b7 | |||
| 5fd2145821 | |||
| 4700d48b35 | |||
| 019b2aafef | |||
| 3744649320 | |||
| 30593321f4 | |||
| 3b35199a53 | |||
| 5ac5e1068e | |||
| 0ebc43f0dc | |||
| 5ff86ea2c5 | |||
| 1bdc9c0a64 | |||
| d0d46408bc | |||
| fdc33b0f6d | |||
| 6a43370e13 | |||
| 1fcd045aff | |||
| b4d068b01a | |||
| 23d548336a | |||
| 82371dc279 | |||
| fd6770373f | |||
| 645f969d70 | |||
| 3187233783 | |||
| 8b932dc459 | |||
| a357ba38fb | |||
| 9f8525e3b2 | |||
| ace82596d8 | |||
| 09e10d2a02 | |||
| 9ec3f6abd6 | |||
| e7b18609f6 | |||
| cdcf0e2f9a | |||
| 718f2e922a | |||
| 2b2b6f75a1 | |||
| 883367c1d2 | |||
| 2276c62ff0 | |||
| fb0ee27df0 | |||
| b14befc77c | |||
| 64fd5a862a | |||
| 0ff170c671 | |||
| ea0d5c4d70 | |||
| b96dbfc9ba | |||
| e221c7642a | |||
| b8c28419da | |||
| 1c4f9042e7 | |||
| a3f483ad87 | |||
| 6e90a8ea55 | |||
| 6d7fe69cdf | |||
| 314ef60900 | |||
| 1e8ac58bb4 | |||
| badcf31499 | |||
| c98602bf19 | |||
| 50bec959e5 | |||
| 62bfa33464 | |||
| b4ab7dadb9 | |||
| df0cd3ef3e | |||
| 9e37a643f1 | |||
| b30bfb5d2b | |||
| cccdf0431b | |||
| 0005ebbbc3 | |||
| 161841925d | |||
| e099180d8f | |||
| 2091dc68bc | |||
| 9926ac5a05 | |||
| 14342f6375 | |||
| a0a9d433dc | |||
| c88fac1a20 | |||
| 64d26f7c61 | |||
| 34896cefe9 | |||
| c0c7046a6d | |||
| 937ea7dab4 | |||
| bfd2b0fa8e | |||
| 7f2c281121 | |||
| 224caf32c7 | |||
| 5828cdba45 | |||
| 4526fbed96 | |||
| f9911dde52 | |||
| a5e5eb5eb0 | |||
| 82aecd6c7e | |||
| 3cef83c8c5 | |||
| 0781f8a82a | |||
| fb03d745c5 | |||
| 752f5e269e | |||
| bb3e124bdb | |||
| 07610ad2d9 | |||
| e500258ce4 | |||
| 801a748e25 | |||
| a111b40560 | |||
| 2ccd182d2e | |||
| ee08b3e880 | |||
| a4bfd52b7e | |||
| 34a539ba78 | |||
| 096c996900 | |||
| ab0a67c35c | |||
| b448a20f40 | |||
| d5f4b06972 | |||
| ff8aca1db4 | |||
| 8da52bf121 | |||
| 0c193f8149 | |||
| fa0f78b937 | |||
| 96839ae1b8 | |||
| 5420f48580 | |||
| 5967bf4176 | |||
| bf68d1c0e0 | |||
| 227caba783 | |||
| b498f4f4d9 | |||
| 8330cd119a | |||
| 3c55fbe650 | |||
| 98320d130f | |||
| 37f21a2e1e | |||
| 9f82a960e4 | |||
| 3bba87b655 | |||
| 515dc96d6c | |||
| b51dff0b1a | |||
| 69bc149f7f | |||
| 3c340f550a | |||
| 420f83bbbf | |||
| 84b0859e8d | |||
| ddce28c055 | |||
| fbb8442252 | |||
| 8110fddfe5 | |||
| 947eabed6c | |||
| 94ccd03790 | |||
| 84dbb5c9a3 | |||
| 4b2b47fc95 | |||
| 9e621cca11 | |||
| 1e82b4075e | |||
| f8c1b8f4f9 | |||
| eaa00c7c9e | |||
| 2d48d9ef0d | |||
| 3e986b215e | |||
| 8486962fef | |||
| 1f7aa241bb | |||
| e3abae44a7 | |||
| a8be208da1 | |||
| abbb602463 | |||
| 86805a6b3b | |||
| 5d9344b677 | |||
| 8d3755af5b | |||
| 115c9eb5a0 | |||
| ee18083bb7 | |||
| 3af8f35d3a | |||
| da2f2fd852 | |||
| d460b267e3 | |||
| a8eda0676d | |||
| 9bab54af79 | |||
| 0a82366a6b | |||
| f0bc9536e6 | |||
| da7f47c1c7 | |||
| 9d165f13e7 | |||
| 3582bc0f58 | |||
| 97589e5c62 | |||
| 098074ba8b | |||
| c680cb6c58 | |||
| a603f39b4b | |||
| 78b548628c | |||
| d0e24a50b8 | |||
| 69b94fe041 | |||
| 6ba0224f7b | |||
| a92f09153a | |||
| 73714420d1 | |||
| ea96f2ad40 | |||
| b6f5b50086 | |||
| 3ae4a022eb | |||
| ea8a692191 | |||
| 026d6c461d | |||
| 3cbac4bcea | |||
| e42b4c21b7 | |||
| 2464913200 | |||
| ebea728957 | |||
| 233a5bf4cd | |||
| 7019b27e59 | |||
| 70227dc882 | |||
| 6178ea644a | |||
| df7f0730dd | |||
| 331168379f | |||
| 5220963be1 | |||
| 436dab3eb8 | |||
| c3055e1cfa | |||
| a27be92e4b | |||
| faf0ad5f35 | |||
| e9202916b2 | |||
| 2cb20ded78 | |||
| 687bcaa83f | |||
| 1fb8a624f9 | |||
| b4b51d4828 | |||
| 7083c424c2 | |||
| c55d8450a4 | |||
| 7a20f26b84 | |||
| de16238e01 | |||
| 240f8b9e50 | |||
| 656ca80dd0 | |||
| d40cbdb8cf | |||
| a668c8b520 | |||
| bc44195a3d | |||
| a7cbe2a139 | |||
| 8408bf95c7 | |||
| 309c342b86 | |||
| 4de59d61d8 | |||
| 0dc65cc162 | |||
| 2e6c90d502 | |||
| 127ea3e68a | |||
| ba11b5eab0 | |||
| df1c6176b3 | |||
| 96ccfe4cbe | |||
| 8634594cd1 | |||
| ee160842b3 | |||
| 613452acba | |||
| 9411dac991 | |||
| aa32f7c926 | |||
| 517810b208 | |||
| b7f7a91dfb | |||
| b6e4c7302e | |||
| b7590e20c1 | |||
| 4952a9c852 | |||
| 59647baff9 | |||
| 1393518555 | |||
| 51827b94ad | |||
| 98c840eb02 | |||
| 24cbb84009 | |||
| f3c94e5d23 | |||
| f2ab092742 | |||
| 7d5ca5c90b | |||
| 8ee85efd70 | |||
| 0cab675825 | |||
| f1751dcb21 | |||
| 8b02613549 | |||
| c9625ccf3f | |||
| 435ce51196 | |||
| 57ac7cb4db | |||
| 8cb2b801e9 | |||
| 66b45534a8 | |||
| 499077826c | |||
| bc4d34ebd8 | |||
| f40719787f | |||
| 934a13c21f | |||
| e5602f956d | |||
| de11a19e03 | |||
| b437468b84 | |||
| 0a99571c0f | |||
| e704fa6266 | |||
| f908514095 | |||
| bafcba023c | |||
| 9a44b74186 | |||
| 883935c3e0 | |||
| 6d34054b78 | |||
| 3da9b6df0d | |||
| 0ab0e4737c | |||
| cdf356ed33 | |||
| 7d268bb4ca | |||
| 184350ff4a | |||
| 4cdbf560e1 | |||
| cbccc79d37 | |||
| 9b188a6c04 | |||
| 2f74513246 | |||
| 94dbb19593 | |||
| 8232759a92 | |||
| b006966d25 | |||
| 6037f63ae5 | |||
| 5cdb65ca52 | |||
| f9e4ca4d06 | |||
| 66c9be8627 | |||
| 546f65c38e | |||
| 9fcb022d5e | |||
| 5a0c6b1f18 | |||
| ade8db023e | |||
| 2ae733bcd1 | |||
| cc37e6d69a | |||
| 101c68f786 | |||
| ec0cd9e7f9 | |||
| ab0b851d28 | |||
| 4e3720b810 | |||
| 4b48fc98d3 | |||
| 82993c8d1e | |||
| d352718a39 | |||
| d44632e57d | |||
| 80451011dd | |||
| b4e673b2f4 | |||
| 58a78e9aa5 | |||
| 6da4a148fa | |||
| a3edb09eda | |||
| 27beb8f877 | |||
| 136680f917 | |||
| 378ae21ac7 | |||
| e35a86661d | |||
| 528b5938ec | |||
| 03bee17063 | |||
| fe18050c49 | |||
| aa0496f69b | |||
| 4ee22ab05e | |||
| 63ad540e55 | |||
| a1165eea94 | |||
| bfca74f6b3 | |||
| 3acf74483c | |||
| a3ec8329f4 | |||
| 7d0184ca34 | |||
| 31bc597c81 | |||
| e0b687f289 | |||
| 2de0dddb1c | |||
| ff65b68dfa | |||
| 94456a6063 | |||
| 41ea346551 | |||
| 439ad3e736 | |||
| 347d82f59b | |||
| fe68f40634 | |||
| 08b1344056 | |||
| ff67a80a71 | |||
| 230e85798d | |||
| 9604690e9d | |||
| 01e0cf4868 | |||
| 693eeed762 | |||
| 6e5713d64a | |||
| 249ad3dfea | |||
| b94c3740b9 | |||
| 59ec42f0e6 | |||
| 8a65f116b6 | |||
| 8105607257 | |||
| 601da1141e | |||
| 8c0edef714 | |||
| c3efd9426d | |||
| a386439f86 | |||
| 016a5b3903 | |||
| 60aeb2a71a | |||
| 54ea63df66 | |||
| 01fc3ea22e | |||
| 3388736fab | |||
| 0065a0f405 | |||
| 490f832dc0 | |||
| a44acb6de5 | |||
| 13e5ddf807 | |||
| e42c728ab8 | |||
| 4eec5c5435 | |||
| 2667d9e90c | |||
| f2b66278aa | |||
| 5b7d952626 | |||
| 24375d53e6 | |||
| 88ac47e217 | |||
| 8a1bffba9b | |||
| 01eef7a392 | |||
| 67b76fadca | |||
| 7861712437 | |||
| ccc088d946 | |||
| 4468fe77fa | |||
| e71a9e2894 | |||
| f80bdf06ba | |||
| 2d6033c73f | |||
| 756dc49813 | |||
| aa92559aa0 | |||
| eb12a89b8e | |||
| d4a34308e5 | |||
| aab3a8e5b6 | |||
| c72e12d0a6 | |||
| bce0d629fd | |||
| 7d0dacc86c | |||
| 729aa4ab4a | |||
| 18e9e12261 | |||
| 9d68b29c9e | |||
| a4792412ba | |||
| 8bb83f6b1a | |||
| da99a53dfa | |||
| a9e9ac32a0 | |||
| 05e6df23a2 | |||
| 3f9fc23270 | |||
| cb21c7c1fa | |||
| 4008e64f26 | |||
| 1cf5918574 | |||
| afe87bf693 | |||
| ff1c5adb8b | |||
| c36030c826 | |||
| 33a02b1223 | |||
| 68f4556609 | |||
| 23db58a303 | |||
| ee69dc3105 | |||
| e9243c3fde | |||
| 4cfee23303 | |||
| be3822523b | |||
| 111f81aa95 | |||
| f12e1ad222 | |||
| 72318a6bf0 | |||
| 2f77cb38e2 | |||
| 84ca4c0d27 | |||
| 1f9a197b18 | |||
| 0c5bf51378 | |||
| 1647968c50 | |||
| 5473311bd7 | |||
| f3ebb67469 | |||
| 0d149ce195 | |||
| d68ba1b570 | |||
| 1877833e73 | |||
| 63c3710785 | |||
| 0043d137e5 | |||
| 3e5d3c5bdc | |||
| 62deedfa75 | |||
| 44af4eac6b | |||
| 5fdc637327 | |||
| 7c93007aa6 | |||
| e8fee93a7e | |||
| 260539e987 | |||
| 4603cd467b | |||
| 00549bc9b2 | |||
| e0a6f7456b | |||
| 5a54b37aeb | |||
| 2e43665266 | |||
| 8b4cd65e2a | |||
| c08aaa86d1 | |||
| 87a8af0ad7 | |||
| 4691dfa3f0 | |||
| 507eefc820 | |||
| 72af764861 | |||
| 1b631e96bd | |||
| 3b4a4da52d | |||
| 2e59aac025 | |||
| 3de6da80c6 | |||
| 2829c83118 | |||
| f58012ea0e | |||
| f8605ec188 | |||
| 5a12beff15 | |||
| 6b1f8de885 | |||
| 33be5de66e | |||
| 4399eeaa58 | |||
| 38cfb0603a | |||
| 1a3844e74e | |||
| bfed2e1bf5 | |||
| e488f294a1 | |||
| fde3438ef2 | |||
| 1575dea5b9 | |||
| a1972ba9b6 | |||
| 5a72d8783e | |||
| e6770bc2fd | |||
| 413fed474e | |||
| 60083834f8 | |||
| 9ac4da0489 | |||
| cb3848b7db | |||
| d41764bfd6 | |||
| 753119c4a1 | |||
| d996c3aa8f | |||
| ac6e8c617d | |||
| 3b09f4aa54 | |||
| 10f4724b6b | |||
| ad86535024 | |||
| 628f4d2a7e | |||
| 8d5be77c93 | |||
| 13a556df89 | |||
| 4e9d183523 | |||
| 074dfb63a7 | |||
| beaf09de7b | |||
| c8d8978cd0 | |||
| 11edba04fe | |||
| 22ba54b00d | |||
| 6fd7ca39e2 | |||
| b8cd00b412 | |||
| f4bd43e898 | |||
| 7d7664444a | |||
| 1a8bbd6004 | |||
| e725c880a9 | |||
| f5abcd1c4c | |||
| 1986aa6581 | |||
| b52e1b2b02 | |||
| 54719fbfc6 | |||
| 06add0e5fc | |||
| 63d682314b | |||
| 1a6060ac5b | |||
| a302f8f1be | |||
| 04e1a4f5c8 | |||
| 1538909ac0 | |||
| a15f165a1d | |||
| 77435dd0d9 | |||
| 6f57907416 | |||
| 7c1cfd2849 | |||
| 259b10b83a | |||
| 02355546ff | |||
| 6ad3430ac4 | |||
| 29e7674e56 | |||
| b09632d1c3 | |||
| e2df7d4d01 | |||
| 9a984a8148 | |||
| fb9c8950ed | |||
| a849a81ac3 | |||
| f919bb0748 | |||
| 3b85a8071f | |||
| 9a8cac060d | |||
| 0353338436 | |||
| defb8348a7 | |||
| 1b86665d81 | |||
| 2f52fa723c | |||
| 6e0f0b8896 | |||
| 2c5b2c649e | |||
| a6bc4cab9d | |||
| ef37daf44a | |||
| 39d288f99f | |||
| 9ead3f15c3 | |||
| 272104af95 | |||
| 51e95d72e3 | |||
| 12486f6cee | |||
| 891375baca | |||
| 41a295202e | |||
| 722c5b7d61 | |||
| 52216b56a1 | |||
| cd614831de | |||
| 1d0a836a2e | |||
| 46b7064834 | |||
| bb8df01e25 | |||
| 16700b0e30 | |||
| 4e04a11995 | |||
| 76e5480be9 | |||
| 464e6b8010 | |||
| 3272c1bbc6 | |||
| 307ffea951 | |||
| bb94f286f5 | |||
| 86e3556438 | |||
| 12214bee72 | |||
| 08a35231ef | |||
| 9649dc78a1 | |||
| 9970b4e37b | |||
| a5a615d5c7 | |||
| ce97fdd1c6 | |||
| 1a8ae513b4 | |||
| d15ac93a8f | |||
| 4e0f94bcce | |||
| 1c1645096f | |||
| e0ac5509b4 | |||
| 190c37a68b | |||
| a67bef2dee | |||
| 893bbf9251 | |||
| 5441093211 | |||
| ee7455daa8 | |||
| 579af3c442 | |||
| 25bdcfcbc4 | |||
| 26919f41d2 | |||
| 5f735b2570 | |||
| 9c80f9e34e | |||
| b5b3c74477 | |||
| 73d4ac6de0 | |||
| 7640fad30c | |||
| 9f6d378755 | |||
| 642e68f53a | |||
| eb658f87a3 | |||
| 1e87849e5c | |||
| 5fa4acb195 | |||
| 79f215606d | |||
| 2fd4b45f81 | |||
| d3b4a4bd05 | |||
| d914febbec | |||
| 2962a0be8c | |||
| 6be4df3b39 | |||
| 4789751e50 | |||
| 57674f5869 | |||
| c6cb4ba159 | |||
| e341cac8d6 | |||
| 83dd96b9f2 | |||
| cabaa079df | |||
| 273e7f249c | |||
| 8c9ca23900 | |||
| 8e3da86283 | |||
| 97b65b2255 | |||
| b26f198489 | |||
| a99a00d7c5 | |||
| 283137841f | |||
| 3290ebd36a | |||
| c4e9c0bf85 | |||
| 84ad85ee85 | |||
| 9789c3bd8c | |||
| a75afb597b | |||
| f93d9e7698 | |||
| 7423fa9998 | |||
| 7cba665270 | |||
| 9502567453 | |||
| 14472c5a95 | |||
| d4f4bcf23c | |||
| 82fa7e1467 | |||
| aefbb4fbda | |||
| 9b77fdf5b6 | |||
| 7a6979c814 | |||
| c4ab550ec7 | |||
| 3ecf6b495b | |||
| 8475697e3b | |||
| 85687781d1 | |||
| ccfaca32a2 | |||
| 07373c8cf2 | |||
| 89594d4557 | |||
| b478a1cb53 | |||
| 1fb77e414d | |||
| 22fe5bb724 | |||
| 909b9b2679 | |||
| 49ea709027 | |||
| 4ea2bc5e46 | |||
| eabc8b641e | |||
| 2f1ed186d1 | |||
| 4cc68397dc | |||
| 2b7872139c | |||
| e47ad6ed3f | |||
| f3b14694c6 | |||
| e9424b529c | |||
| a60c796cf6 | |||
| fcf16ab20a | |||
| 8e3be20387 | |||
| 689dd44d3b | |||
| a25d0aa60e | |||
| c50d1dc2b5 | |||
| 274bb19d03 | |||
| 2c5b84bd1d | |||
| 5c50bcb9c7 | |||
| cef56abea4 | |||
| 30b9f12711 | |||
| c9e0245f23 | |||
| 5337326cc9 | |||
| 73d8c85879 | |||
| 6237245ab7 | |||
| 7ae20c2a6d | |||
| ae1829e5a8 | |||
| 026661c9a2 | |||
| ec7223ace2 | |||
| 1f31621bbf | |||
| dfd41b9b94 | |||
| fdd4aade3b | |||
| 0a53f4c26e | |||
| d6a826a09c | |||
| 484160eb4e | |||
| 7ac1fe5847 | |||
| 72acef4e15 | |||
| a6a0f6c447 | |||
| 398d674cf4 | |||
| 1467de1c7e | |||
| c5023fdfa0 | |||
| 97782248af | |||
| 016761776b | |||
| c2450eabab | |||
| d6ced86021 | |||
| 0d8d1675f7 | |||
| 4056af00e3 | |||
| 99b4305573 | |||
| 113301dbba | |||
| 349ae043b6 | |||
| 710e7dd3a2 | |||
| 1e9c6d7931 | |||
| 5772b924cc | |||
| fce5f4cc0f | |||
| fa7ad6b3df | |||
| fc2df00cfc | |||
| f92c5471c2 | |||
| 0439e3b21b | |||
| 5b23fae8bf | |||
| aac4b0f0a3 | |||
| f083795c79 | |||
| 5db79c1e24 | |||
| a4dddfd5f1 | |||
| 7ddc865cde | |||
| 688ecf1c1d | |||
| c0453cfec1 | |||
| a9ab0c72a6 | |||
| de918ef9cf | |||
| 0ee9874112 | |||
| 388858aee6 | |||
| f22703df59 | |||
| 4715b76dbe | |||
| 50bd385ccf | |||
| e738da9b11 | |||
| 6e6e053384 | |||
| 5edf19d230 | |||
| 4573e1925d | |||
| a40f8e0b9d | |||
| 9db49ec790 | |||
| e8cd2909a5 | |||
| e7a57aa754 | |||
| 1c30f69bd0 | |||
| eb2aaf22ed | |||
| 36c43683e5 | |||
| 0b63a4244d | |||
| 4a62259695 | |||
| 87e3d5a045 | |||
| 2b8384bb39 | |||
| 6d981960da | |||
| aca9d30064 | |||
| b84b1d8166 | |||
| 6acbd326f3 | |||
| cb533b63ac | |||
| 6538641e87 | |||
| eb0e5c89b2 | |||
| 8e2fa4acdb | |||
| 84c2f8d3fc | |||
| 8d99b3e2d7 | |||
| b3ec2a5463 | |||
| 4c67f4393f | |||
| 4e9a2df827 | |||
| 2d2d1972e9 | |||
| cc9e2c1260 | |||
| 2b21264fb0 | |||
| 3f61b52db3 | |||
| f5fa4ff0e9 | |||
| 251551c8c3 | |||
| e2d546ad46 | |||
| 949176c3e0 | |||
| 3371941be5 | |||
| 70d72b62df | |||
| c3e95d8e2e | |||
| 46209895e3 | |||
| ba163027bd | |||
| b28180d680 | |||
| 0f1f0c5a22 | |||
| 6e16e71fda | |||
| 1eba69d035 | |||
| eb409fc6eb | |||
| 97fa6d84bc | |||
| 02940e4ea8 | |||
| 38d5b93e4a | |||
| 78398a4481 | |||
| 69a0f3bec2 | |||
| 0f32d2e553 | |||
| 8e1c7e1e44 | |||
| a3241065c5 | |||
| 6119586920 | |||
| 32cf99fdb5 | |||
| dc371aad6d | |||
| ca2209aaed | |||
| 0a3ddef315 | |||
| adf820c08a | |||
| 0715db7182 | |||
| 8bf14ad5ea | |||
| c9f21f4ef6 | |||
| 1b2eb9b9c8 | |||
| 1343be58d7 | |||
| 377ba87d52 | |||
| 97f6aadd5b | |||
| 2dafc85af4 | |||
| 7f8a0c9d33 | |||
| cc23f6dc01 | |||
| aa619f1eeb | |||
| b7458c5da1 | |||
| e717ac0a89 | |||
| 34ab54522e | |||
| 47bbc9b3fb | |||
| 68b51c7481 | |||
| 37b60f8d9d | |||
| 14204353ac | |||
| 098f19c005 | |||
| 4e1f5cce80 | |||
| 4a6f4bc92f | |||
| da2ac3e8a2 | |||
| 7c7158cf24 | |||
| 1c30205af5 | |||
| 9d0a6ddc67 | |||
| fbf3b34474 | |||
| ce42810265 | |||
| 07babdbd77 | |||
| fe3926f572 | |||
| 03eead042c | |||
| b1fff640dd | |||
| f251ca6373 | |||
| 24a2c51003 | |||
| 66f37139cb | |||
| 0646547c9e | |||
| 41206b991e | |||
| b7abfe5eca | |||
| 23e7f5bd33 | |||
| df9dfeae95 | |||
| 29db25dac7 | |||
| d210cd2695 | |||
| fc8e6ee338 | |||
| e68a41a91e | |||
| 26f846e112 | |||
| f1fbe9e629 | |||
| ebe3fd7e57 | |||
| 1c9b34190e | |||
| a5d4aa5821 | |||
| 9b583961b0 | |||
| fef0cc1c29 | |||
| f0ad0b4f0a | |||
| dc1d9c837b | |||
| 885462d98e | |||
| 33a337dfc0 | |||
| b64dc09bd2 | |||
| 6395107be6 | |||
| 24b881c427 | |||
| 28be881886 | |||
| 5bc560a743 | |||
| fee60c8e06 | |||
| 3f867c1e11 | |||
| b235da2e9c | |||
| 3f3062a077 | |||
| 2f46739931 | |||
| 6eec018c34 | |||
| 8a8fb7725b | |||
| f6e5e6a2b4 | |||
| dfdcd3021a | |||
| 5fa3d8f929 | |||
| e78db21180 | |||
| d4d2a4b4ce | |||
| e33b8d5f43 | |||
| c2b154e1b1 | |||
| 1a2da82106 | |||
| 4a2861ba3d | |||
| 9d92de1157 | |||
| 211bd80061 | |||
| 32679a107a | |||
| 1664689eb7 | |||
| bc101d10de | |||
| 901a456132 | |||
| 0c61915e31 | |||
| d5e85c7f25 | |||
| a5425e3bf3 | |||
| b96519d85c | |||
| ac98ed615b | |||
| 2062eb23f0 | |||
| af4d7d21ba | |||
| c2ba553483 | |||
| f2bcf449cd | |||
| 09c587bed0 | |||
| a8724b5f03 | |||
| 8dd1fb8ac2 | |||
| b7e85f5161 | |||
| 773ed39d5d | |||
| b5fe380011 | |||
| af7bf785f9 | |||
| 15d51ff033 | |||
| 83bf5ba255 | |||
| 2881ba112b | |||
| 1ee81580c6 | |||
| 4f421db5a9 | |||
| 091c0eea28 | |||
| eaaabd8de0 | |||
| 40ce51a1a9 | |||
| 23ac008cc1 | |||
| 6486956401 | |||
| 33b42ce86e | |||
| a631028660 | |||
| 04257b9d6a | |||
| acb6c55529 | |||
| 0e6f8488d3 | |||
| 56687c27cb | |||
| 9b0c7929d9 | |||
| d895a3aa01 | |||
| d4632e5286 | |||
| c38106211c | |||
| b8bcad048e | |||
| 4e5fc9797c | |||
| 9befb13ea4 | |||
| 8eb6a4da71 | |||
| ec7dfb3675 | |||
| 106750db77 | |||
| 7d1047490e | |||
| c9f93eeaed | |||
| db6b2225b1 | |||
| c6c9d9591c | |||
| c1f6a79c72 | |||
| eb81f22a5b | |||
| a31a7f5a6c | |||
| 7531e90499 | |||
| a93a7c87b6 | |||
| ba2c82e2f5 | |||
| dfcc025a19 | |||
| a5f7aac295 | |||
| d76d747196 | |||
| aee1e53cb3 | |||
| fd1ca96e2c | |||
| 2c18601d8f | |||
| a1a1b3ad01 | |||
| 7a28d81b44 | |||
| 69dbcba069 | |||
| 66bf55fb7f | |||
| 002186c016 | |||
| 6a7488edc1 | |||
| 4af8dfa549 | |||
| 4efc2c219b | |||
| 84ec0903ee | |||
| 754c82d047 | |||
| 17fa704278 | |||
| b9ccd4bb0b | |||
| 595bc09ec1 | |||
| 64f65b035e | |||
| b6f1c86f65 | |||
| a736b54ef1 | |||
| 8b8bc97194 | |||
| 27cff11e31 | |||
| b7da27ad3a | |||
| aa0adcf99b | |||
| 079fb1b66f | |||
| 1cab1d32c2 | |||
| e5075d2dc2 | |||
| 98fdce2e1d | |||
| d8d1c1d18c | |||
| 48ec53242e | |||
| e7e8447fa3 | |||
| 561b205c4a | |||
| 91321bdf68 | |||
| 33590aa59b | |||
| fd88b756fc | |||
| 8d1bc95faf | |||
| e67c2d5632 | |||
| 376053e0ac | |||
| cadc6f48e6 | |||
| b6665d5eb9 | |||
| 95955ae069 | |||
| df4313f5bb | |||
| 3728a0bda1 | |||
| d2da73cf68 | |||
| 100b24074d | |||
| a040f17787 | |||
| 6274bd0b34 | |||
| 095a25d473 | |||
| 53cd3f47b5 | |||
| c21f6eb5a3 | |||
| e2aeab970b | |||
| ef4fd869ae | |||
| dfc8bd4aa2 | |||
| fd774bd52a | |||
| 16fac79b78 | |||
| 622a8ea7e9 | |||
| c00ecc5e02 | |||
| cdd9b6f11b | |||
| faee68e85f | |||
| 683f42eeef | |||
| f83558f10b | |||
| 0a518f4bbd | |||
| 9483da3239 | |||
| c67911bfcc | |||
| 3f6e694e50 | |||
| c2646d67bb | |||
| c68b81eac8 | |||
| 4d271e0210 | |||
| c5a4e8337c | |||
| 7e08e7cb6c | |||
| 4031dc7321 | |||
| d1e4943800 | |||
| 74f18d7b1d | |||
| 3856538e48 | |||
| 236affa2a4 | |||
| f8d8104d82 | |||
| a3c7f716bd | |||
| b2b53a1e01 | |||
| 95f4e29edd | |||
| cdf147f351 | |||
| 8b2c1548ab | |||
| 2cf507ed66 | |||
| 46e1395e62 | |||
| 6117299ecd | |||
| f8777097d1 | |||
| a79046e025 | |||
| d0e8392445 | |||
| af8056d2dd | |||
| 4ba871c631 | |||
| da08dd6d0e | |||
| 1ac3b38fa8 | |||
| c29b72fcdc | |||
| a3673a5a2d | |||
| 5dd5fa4644 | |||
| 9d6dd4af11 | |||
| f430522b41 | |||
| 907aa60380 | |||
| c7e26c5f67 | |||
| 8e0e1806a4 | |||
| 7f39fb14f2 | |||
| fb86705d3f | |||
| f4fa5b3733 | |||
| 9701cbcd08 | |||
| 1af02bf2a9 | |||
| bf725aa8dc | |||
| 52914216f0 | |||
| 8180dd414e | |||
| ff28985384 | |||
| 584a209b28 | |||
| c327d1aeef | |||
| 0d0763f72f | |||
| 4d101569f8 | |||
| 8866612160 | |||
| d69b14e54c | |||
| 505eed9eef | |||
| b188a1c0cd | |||
| 2c1f8260fd | |||
| d319fc6eb5 | |||
| 83eea99317 | |||
| 55a23c7253 | |||
| c8699c6726 | |||
| 95c8478ec5 | |||
| cba1313a40 | |||
| 96ea61d8b8 | |||
| 523f89f45f | |||
| 6617d29b52 | |||
| a4ab6876c3 | |||
| ff0109d6ba | |||
| 059c78aee3 | |||
| f75c5011e2 | |||
| 2832c736dd | |||
| f34ba4b1f0 | |||
| 91dde90ad2 | |||
| 661b320d23 | |||
| ae7706ae55 | |||
| 1dee851207 | |||
| 9c91d386e4 | |||
| 3e4d87051b | |||
| 26975fc011 | |||
| c15dc49994 | |||
| 14ee76a0ad | |||
| 4465c67790 | |||
| 20e0fa33fc | |||
| 7e76daf39f | |||
| 2ee63f0f68 | |||
| c35029fa2f | |||
| bae8987ec1 | |||
| 470d4d1a97 | |||
| 78bac905c2 | |||
| d88d8e940e | |||
| b2c3775b58 | |||
| b311248bed | |||
| f7f45b4e2b | |||
| 3cad3514f1 | |||
| 1020ca47bd | |||
| 48dbb70ecc | |||
| ae16206f0c | |||
| 7045f206af | |||
| 67bd3e44c0 | |||
| 264981fb1b | |||
| 47d471c53d | |||
| e43bc49ba7 | |||
| d9de4ddd82 | |||
| 8f7f4b1593 | |||
| fc64c0c6dd | |||
| 03d065e952 | |||
| 77a52eec7c | |||
| 523a586176 | |||
| af32a14fc1 | |||
| 5c8548040a | |||
| 6a42c1a4f3 | |||
| 0defcda8d0 | |||
| f6ee88c42a | |||
| 34f65e3266 | |||
| 02ac3a403c | |||
| e1e840a87d | |||
| eb66f9eda0 | |||
| a4c37a373a | |||
| bca9b4ce83 | |||
| a2446b8d4b | |||
| e567cfda36 | |||
| 961a9bc506 | |||
| da6e2730c2 | |||
| 2b8072bf80 | |||
| 49cea76841 | |||
| e1c8aa0dbc | |||
| 2546e865e2 | |||
| d6af21e0d9 | |||
| 18522f7fc8 | |||
| 4c167bed69 | |||
| 32a21679fb | |||
| a5eaf6fc49 | |||
| 9d7245bded | |||
| 02fb4b67cf | |||
| cf44418e10 | |||
| 6fbb7cffe9 | |||
| b279863acb | |||
| 9e7dadb967 | |||
| 9069bf4e2f | |||
| e85b0a5f68 | |||
| 195eff9c04 | |||
| 42aa330db3 | |||
| 1e9d959857 | |||
| 38721993f1 | |||
| 1b782235c4 | |||
| 368300d319 | |||
| 94e10d52fb | |||
| d25c8c169e | |||
| 67b7fed9ed | |||
| e32a8dbbe5 | |||
| 281edf8475 | |||
| ce7c266651 | |||
| c1166e3618 | |||
| 8294c94b95 | |||
| 6f09b703dd | |||
| 466e5be741 | |||
| 32076c099c | |||
| 216b96aa57 | |||
| 6d592e2a0f | |||
| feb5a4d935 | |||
| e03ae0cd85 | |||
| 901fc3e40f | |||
| 5683f45925 | |||
| bafc17472e | |||
| 7638c7a884 | |||
| d25722ddd0 | |||
| 750d1009ec | |||
| b8e7960ff6 | |||
| ff878bbda8 | |||
| 1baf774647 | |||
| 772410d974 | |||
| 7ceb4426c7 | |||
| 10c7a9ff94 | |||
| b3c4b28a67 | |||
| 0da4150283 | |||
| 5920f1b59c | |||
| 68fcb1af93 | |||
| 0574de2d22 | |||
| c9c53dbe61 | |||
| a084245822 | |||
| 77e3f062da | |||
| 0e14adcb0f | |||
| 8bb3067e42 | |||
| 0c469abe4a | |||
| d63e32a579 | |||
| f13c450b93 | |||
| e95c07291a | |||
| 2963fc0a1d | |||
| 5d309d46e1 | |||
| 2e7fcd3098 | |||
| 884759aed4 | |||
| 2ec65023a6 | |||
| 0093f3fa44 | |||
| 2ad76278dd | |||
| 23e59d9f2c | |||
| 3cb9e0b97c | |||
| 0b7b6d9d6d | |||
| 56e6efbe8f | |||
| feed624cdc | |||
| 1a6f42b994 | |||
| 04f49225c9 | |||
| b18d1a69b6 | |||
| 0ace685597 | |||
| bfcfd0b727 | |||
| 087f1cb359 | |||
| 010d20198e | |||
| 953e804231 | |||
| c656fe0694 | |||
| fb3ec7a897 | |||
| 274658f955 | |||
| 7621306f4b | |||
| b804867105 | |||
| f8f1550c31 | |||
| 0fcc66711b | |||
| 8d9574e306 | |||
| 6cb17c734c | |||
| 3545e8e383 | |||
| 3c18e02b0b | |||
| b831cd8a36 | |||
| 516ab164f6 | |||
| b2d028533d | |||
| a88d9cb1f0 | |||
| b57ef5d2c7 | |||
| 1a96390826 | |||
| 60339edf40 | |||
| 6990c692d6 | |||
| 98e62b4032 | |||
| a1d7d42d6a | |||
| 3f7c0829ef | |||
| 46d8af781d | |||
| 67b7c8bd7d | |||
| 21486e2c81 | |||
| 29ac40b584 | |||
| dde444ed0e | |||
| 9b6c209c80 | |||
| 3c7d67c8cd | |||
| c730291762 | |||
| c593661f40 | |||
| a9bf251886 | |||
| beac29b1d0 | |||
| 35d6437d45 | |||
| 76ce8ece1a | |||
| 464093d36e | |||
| 71bb3fefcc | |||
| 1f6f9f5dbb | |||
| 34bf21f7d1 | |||
| 847dfd9523 | |||
| a96e40e249 | |||
| 8656b65e39 | |||
| 39422beaef | |||
| 6d29538346 | |||
| bdf4650ff8 | |||
| 074bde5ccc | |||
| a4f7d847ab | |||
| 5beb338247 | |||
| 7b1154de69 | |||
| 46aeb8b70b | |||
| fe6271dffb | |||
| 7cede5bb60 | |||
| 2b7f0084b7 | |||
| ec7ce09ef4 | |||
| 574c8dfbc7 | |||
| 4381031994 | |||
| b3010c3c6b | |||
| d092f5e7c8 | |||
| 358f46b8ae | |||
| e5125c2c84 | |||
| 65db59b3ec | |||
| 95cd7a6aee | |||
| 12515fd2c1 | |||
| 437a6dbb29 | |||
| d96ca9b824 | |||
| aefde6e44d | |||
| 23a0628fba | |||
| ef9c69f99d | |||
| 8be331618c | |||
| a5fdf7c546 | |||
| dba19d839a | |||
| 7453c71c00 | |||
| f09ea316dd | |||
| ac0f3c5ccf | |||
| 76ea111980 | |||
| 9f9183afc4 | |||
| ef32505633 | |||
| 304494322f | |||
| 9e510cd0d9 | |||
| 0f49d1051a | |||
| 4b97a9b13f | |||
| 07f72a3122 | |||
| f4543edfe2 | |||
| 095751363d | |||
| 1b67b97e93 | |||
| d4bf0957d1 | |||
| 99acdcf168 | |||
| e95950ee26 | |||
| fc0171fb40 | |||
| 1c82697ccb | |||
| f3bb46a9f5 | |||
| 3b62c8f3e2 | |||
| 4d054aa2b2 | |||
| 3a8ff5d456 | |||
| 0b783b66a4 | |||
| 0c7050c506 | |||
| d02b3c1c45 | |||
| d8a945b1a6 | |||
| b50fbec705 | |||
| d488efdcfe | |||
| 13c5eec00a | |||
| 39eb9f8cfc | |||
| 83c2f8e970 | |||
| e23cf0c221 | |||
| de174149f7 | |||
| 663e79e4d3 | |||
| 2a5e7827bd | |||
| 9c0b843665 | |||
| 8fdfa6e094 | |||
| dad4be050b | |||
| 937b0e7185 | |||
| db4f38bcf5 | |||
| c2e09fdaea | |||
| 01768bc73e | |||
| c18eedec18 | |||
| 0e0615c6fe | |||
| 5bd3fde79b | |||
| 647f8cd4e6 | |||
| b2e25db159 | |||
| 9f9371531d | |||
| b578ed2544 | |||
| 0a7f167060 | |||
| d427772bd3 | |||
| b2d670298b | |||
| 6b646fa1f8 | |||
| 72269c44e5 | |||
| 3b2366e4ba | |||
| 257a8a9a24 | |||
| 7a1d2e11dd | |||
| 8dc687b657 | |||
| 18fc113984 | |||
| 20c1a5d638 | |||
| 8000ae0c0f | |||
| 284d95bfe2 | |||
| c7d5ee4bec | |||
| 4c4cc0ded7 | |||
| 83f89bfece | |||
| 7cf4245359 | |||
| 9284441491 | |||
| 7592a6981b | |||
| 56b158ea43 | |||
| 0143dafe51 | |||
| a2dbcc620e | |||
| 9b5fdea8f2 | |||
| fab07d6b75 | |||
| 1d198da436 | |||
| 8b6e17fe7e | |||
| 86484b6c2b | |||
| c14ae99d32 | |||
| cb0cda2f8d | |||
| 2af363755a | |||
| 753b8dc989 | |||
| d2ea1e7917 | |||
| a8f66578b1 | |||
| ca39aeb554 | |||
| a941f9bde0 | |||
| f4f6787c9c | |||
| 82816cb206 | |||
| 58f0c8c612 | |||
| 21e1913c0f | |||
| 79e7c3f98a | |||
| 72127e1b00 | |||
| ed47588087 | |||
| 448967cefc | |||
| 979027138b | |||
| 176e0e4f37 | |||
| b431d4dccf | |||
| 1b12b80b48 | |||
| 52fdc45597 | |||
| 91762524e2 | |||
| 413b38b1c1 | |||
| ecdccd6ad6 | |||
| e0fd118b3e | |||
| c10d7bdada | |||
| 4e2ca31cf5 | |||
| addd2a1987 | |||
| 4071487f80 | |||
| 9c17c2d818 | |||
| dd9fcca45d | |||
| d9c0a13caf | |||
| 5daa84c7f9 | |||
| b12669487f | |||
| 0e9a1e87d0 | |||
| f118960a25 | |||
| 5d6a71b6d2 | |||
| 23fab4ad06 | |||
| 825dc5be46 | |||
| b6fb6410c0 | |||
| 45dfea5ad9 | |||
| d0a5316c67 | |||
| 382ab84938 | |||
| f451c6cbac | |||
| 9645f53dc8 | |||
| 41802c28c6 | |||
| 97a13081e9 | |||
| 38fcf15d62 | |||
| 75dd784538 | |||
| e955db6e85 | |||
| a434651e75 | |||
| 7d674726c2 | |||
| be50211ae6 | |||
| faa8f57bb2 | |||
| 8cf21191fb | |||
| ae847bcaf0 | |||
| c4bbef0af8 | |||
| 7953274a88 | |||
| d8eb3d4937 | |||
| f91f375b70 | |||
| eac25d016a | |||
| 2356a1caab | |||
| 164b349ef9 | |||
| 2e370f6ed5 | |||
| 9d30e1d63f | |||
| 4771af1cb8 | |||
| 9c9df2ad1f | |||
| 7f418a58da | |||
| 510045858f | |||
| d270910ace | |||
| 10aeba2da2 | |||
| 4e675c50e5 | |||
| 0a37576270 | |||
| 8f6f2a2c47 | |||
| 36a465473e | |||
| 23a0ecd0c4 | |||
| 601af1b0eb | |||
| fb2aae1b17 | |||
| ac984af11a | |||
| d6cbd64621 | |||
| e6bdc5dddd | |||
| ba805e30b8 | |||
| 6e48b1d56f | |||
| cd6401f628 | |||
| a25f94456d | |||
| b5228282e1 | |||
| 593ec34ff7 | |||
| 7ce0eb219b | |||
| 99282e65a6 | |||
| d07e60b3da | |||
| 3da2cdb496 | |||
| ecdd046c80 | |||
| 98b35dfab2 | |||
| 56abaf8498 | |||
| 5394f5433a | |||
| c414433fae | |||
| 16d08e57df | |||
| 252a65af7e | |||
| d40edcae69 | |||
| 4c1cc0e05d | |||
| 80c332bc41 | |||
| 5a25a3807b | |||
| 27a2645ed3 | |||
| 830361e97d | |||
| 93a92bb73b | |||
| b9dc44ae9a | |||
| f52bbe22af | |||
| 96d7797134 | |||
| 9810da9829 | |||
| 5692abb316 | |||
| 2e65bd4012 | |||
| 1ac4a1d9a5 | |||
| 8d13a355cd | |||
| 8c4eec2b6e | |||
| 776207ba67 | |||
| 2f5e880e57 | |||
| 94f781726e | |||
| 054c227df0 | |||
| 907e192aab | |||
| d6d0c883b0 | |||
| 7f4327e8ba | |||
| 132932ffaf | |||
| c007b829f7 | |||
| 3b647b0740 | |||
| 7a21648683 | |||
| 389c1dbd92 | |||
| d95189a4d8 | |||
| e65a22ae9d | |||
| 4e8cc4f786 | |||
| dfc18db1dd | |||
| 63dbd7fbf0 | |||
| c1cdefe1a7 | |||
| cd9a2af65d | |||
| 7fe0543bc6 | |||
| 2a6ad3d9fc | |||
| 38cbff4156 | |||
| a86162f287 | |||
| ceddb8370c | |||
| 040b06ad56 | |||
| 1666b1a8d8 | |||
| 4362f53cc3 | |||
| cc616a7146 | |||
| 0f01c04b02 | |||
| 4cbdf9a73b | |||
| fce257dc43 | |||
| ad7601b0cc | |||
| 5be9de5d12 | |||
| 02ed9a9725 | |||
| 074f163750 | |||
| de023bab0a | |||
| 510a746f8d | |||
| 8eb46772e6 | |||
| d563aa0da8 | |||
| 3e3312db25 | |||
| bb5c4906cc | |||
| 444976e64f | |||
| 57b614ae59 | |||
| 2f9eabdb72 | |||
| a458f7c840 | |||
| 65bf84cfb5 | |||
| 5efaa5b206 | |||
| 41f4c7dab6 | |||
| 0f1936f63d | |||
| 5baa6247a9 | |||
| 82f5d1d61d | |||
| dd8dd3b4a0 | |||
| a718223585 | |||
| abc4851287 | |||
| 3d1255dbe9 | |||
| 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 | |||
| c0dea5ef30 | |||
| fd4ac7f6fc | |||
| e635f547d6 | |||
| 7167cff703 | |||
| b844154857 | |||
| 5e56dfdb1a | |||
| e1d460e211 | |||
| 9ea6fb25b9 | |||
| 7755668679 | |||
| 569efbb66b | |||
| 696801430b | |||
| 1b08ba8f41 | |||
| 277f735505 | |||
| f63a2bdfb4 | |||
| feb412bdb1 | |||
| ab856683c7 | |||
| 97d7c21193 | |||
| e5b8435769 | |||
| e589080827 | |||
| 257b10ee91 | |||
| 353ee5cc93 | |||
| b094132c9d | |||
| 82006b868f | |||
| ba5a3f5f00 | |||
| 7b6c08b53a | |||
| 47b692f9ae | |||
| ed06609ae1 | |||
| 32a57150ec | |||
| 2a5e8f1890 | |||
| a04c320b4b | |||
| 4221a507cc | |||
| 44dd8d07d9 | |||
| f7aa69b596 | |||
| d5ecc39104 | |||
| 84a02d2709 | |||
| 4b059beb24 | |||
| b319fb089c | |||
| 17196887ad | |||
| 02d67f682a | |||
| b306108740 | |||
| 12a0311aaa | |||
| cf653fc084 | |||
| 5cc7fc0387 | |||
| 832bc35135 | |||
| 06c5914820 | |||
| bf67b9ee5c | |||
| 829c169063 | |||
| 4948120b69 | |||
| 994471f5a7 | |||
| 80c02740d0 | |||
| df3c0b7b52 | |||
| 45702992ac | |||
| 9756f96b85 | |||
| 6ac0364f74 | |||
| 4f820a7d41 | |||
| 5f7127dd92 | |||
| dcb3ff7d34 | |||
| 1107b92699 | |||
| 3b0b1bc80e | |||
| b60b23fd48 | |||
| 5aac6377c2 | |||
| 20856fb59c | |||
| 7545763cd4 | |||
| 1818b19eba | |||
| abc7e4b423 | |||
| e5ece18ee7 | |||
| 8641b995c4 | |||
| b880240d72 | |||
| 5ce90ba7d1 | |||
| 98bae827e1 | |||
| e3c05efe5e | |||
| 8cbaf7e990 | |||
| 339f41aebc | |||
| 55e4ef9d3a | |||
| f63e4ceebe | |||
| b005089f2f | |||
| 1b42e26642 | |||
| 4691351167 | |||
| 404debf789 | |||
| 752a5ca1b7 | |||
| e1a1cf0e6f | |||
| 3fabc2f831 | |||
| 59ea36c831 | |||
| fac880664c | |||
| 7f890ce98d | |||
| 50e1a3e96c | |||
| 6b79349e6c | |||
| 678f54903d | |||
| 714a4a3004 | |||
| 34826f71c7 | |||
| 847cceaba3 | |||
| 09046e3c99 | |||
| 00a19529c3 | |||
| 446b3a910d | |||
| 76f5d4b316 | |||
| 9b59925144 | |||
| 243d781e99 | |||
| 8be5f53f1f | |||
| cd49bb40c2 | |||
| ef3d115bae | |||
| 9f1178ec58 | |||
| 3bc2db561b | |||
| fad603e7a4 | |||
| 5f006bf139 | |||
| aaa12cc018 | |||
| 2238db8338 | |||
| 4d1492d444 | |||
| 5c4414e4a5 | |||
| 6f9b77e336 | |||
| 154fa25e8f | |||
| 9793062007 | |||
| f86dc247e5 | |||
| 2b1f75a313 | |||
| 5ac0c9a327 | |||
| e8763d5b3c | |||
| ce7a32a994 | |||
| 0c1cc08e28 | |||
| e12e4e6956 | |||
| 52535cf6fb | |||
| 121d0a6e5b | |||
| 34535814e4 | |||
| 8bcc6840ce | |||
| 08d113332c | |||
| 765943062e | |||
| 17cca42d48 | |||
| 760fdc4049 | |||
| ead4aa7ed9 | |||
| 65911dd1be | |||
| 4abfdcbb9c | |||
| de5c8c0d38 | |||
| 8e011bbb78 | |||
| f15a9749f9 | |||
| f1956b039d | |||
| 53d5b7c29e | |||
| 812cb04fde | |||
| 1314d5b4f1 | |||
| 490601de3a | |||
| c7aab50bff | |||
| c507c78d5a | |||
| 58c05687bf | |||
| f8cdcc65c6 | |||
| 10a918f9e1 | |||
| e4d1769a8b | |||
| 7cd80a2131 | |||
| 9d6f88de39 | |||
| b93d650b1f | |||
| c480695369 | |||
| 7f1b5552dc | |||
| 4865a8cfff | |||
| 1efd289488 | |||
| 83e4b183ea | |||
| 1e625b6837 | |||
| 402c624e45 | |||
| fde83f6564 | |||
| f0f43cf426 | |||
| 3dc64bac4d | |||
| 2450a64bf4 | |||
| b48293a632 | |||
| e908dc0dc7 | |||
| 378c9203df | |||
| 779f3788c9 | |||
| 604da89813 | |||
| e11abdc4f0 | |||
| 5aac04dffe | |||
| 7480fbda2b | |||
| 9629ccb374 | |||
| cb70d976ba | |||
| 6db0186947 | |||
| 492eac20a8 | |||
| c8511a625d | |||
| f6b915a169 | |||
| 02c1724d75 | |||
| 7e87bb69fc | |||
| aae522d72b | |||
| 0a821640bb | |||
| 37733dea65 | |||
| eabb9c0c11 | |||
| b103d16eb1 | |||
| e3b6ae3649 | |||
| 0ff48e1538 | |||
| 53038d83bf | |||
| 2ea594d677 | |||
| e957c7b2d2 | |||
| 9a4f27e0a3 | |||
| fccc4a4fa6 | |||
| 4325073524 | |||
| 55199f0a4c | |||
| 7edc76f7fb | |||
| 3fbdde5e18 | |||
| 9f8b4ac382 | |||
| 998925c90a | |||
| 7f971043bc | |||
| c2e1a8a3e2 | |||
| c62b3cb275 | |||
| 1a3d9a016d | |||
| 518182ac92 | |||
| 7d0e063300 | |||
| 5e36d848d5 | |||
| fee461f3d0 | |||
| 1773eef143 | |||
| 7704ee7107 | |||
| 5ac1e9175d | |||
| 5695c9e079 | |||
| f92b0d6ea0 | |||
| fc527b464a | |||
| a93b315bd3 | |||
| 5246424dc0 | |||
| 1316147a8c | |||
| 70319ab8be | |||
| 7dd358972a | |||
| d463ae3b1e | |||
| ebda113f44 | |||
| 6ab6eca0a6 | |||
| b1ba1ec8ac | |||
| 9956da18e3 | |||
| b56e71ab14 | |||
| 6f45d72497 | |||
| f5c01bf617 | |||
| 06bad31b18 | |||
| 576aaff3da | |||
| c5bc8fab32 | |||
| f6e2ebe145 | |||
| 37b3535543 | |||
| c21e8d9204 | |||
| 22658d63bd | |||
| f2dee1e1d6 | |||
| 968ef349d6 | |||
| d6640ed5ee | |||
| aabc217a6b | |||
| d82391e46d | |||
| 7aa02864d2 | |||
| 2a8202c832 | |||
| be4a39ceb6 | |||
| a3dc75c61c | |||
| 14dc142a92 | |||
| 51b7d53108 | |||
| 3253455792 | |||
| 879b310580 | |||
| 5ff3aa7209 | |||
| ca93122a68 | |||
| 2428264315 | |||
| cc4a14b0ba | |||
| 934b584374 | |||
| 4237d49d41 | |||
| 1c36de5ab1 | |||
| da948be089 | |||
| 9384a4f088 | |||
| 4d62c673fa | |||
| 7426b3b04a | |||
| 735e234c2c | |||
| 735f0ba6cf | |||
| 9ee7c825e1 | |||
| 912103ec13 | |||
| f843e7bd90 | |||
| d7e2ab688b | |||
| 5e7085130e | |||
| 9b07e163c0 | |||
| 6859decfb8 | |||
| e23baf4297 | |||
| c7f77b3b66 | |||
| 6578829fa6 | |||
| ef06226521 | |||
| 4c669b947f | |||
| 3fbb493d57 | |||
| 223aa65cfa | |||
| fe54dfb37f | |||
| 3f5f84c92c | |||
| 5b3f81ea78 | |||
| 3e8752fe66 | |||
| 57c2b65f08 | |||
| a118946e65 | |||
| ee2dcf11b8 | |||
| e91de41278 | |||
| 10b5b00db4 | |||
| 2044b4d3ad | |||
| 1d0bb9b26b | |||
| 781defb707 | |||
| 16c124d34e | |||
| f08dbced60 | |||
| baabc91ead | |||
| 81483ae5e7 | |||
| 003140bf60 | |||
| b405484fb9 | |||
| 9a45626379 | |||
| 10d10d057e | |||
| aa2844a3fc | |||
| 42c640a9b5 | |||
| 066fc5801b | |||
| 416eaa1e66 | |||
| ac19a5c24b | |||
| 6f9dd282d2 | |||
| c56d72ba84 | |||
| db4ed1cfaf | |||
| cb64d806c1 | |||
| 4f9b7874d6 | |||
| 207c46c871 | |||
| 957cb2bf93 | |||
| b244c74479 | |||
| b76b2e11c8 | |||
| b35665bb54 | |||
| c3eb5b885d | |||
| 6faf4e3823 | |||
| 325b018ed0 | |||
| 0a3d27a91f | |||
| bcd85ca682 | |||
| ac40c53fe4 | |||
| 2eae82da5c | |||
| 72493b7305 | |||
| 1a37e1c048 | |||
| fb7fef7a84 | |||
| 36602224b8 | |||
| ccecfdf445 | |||
| 32d1184c00 | |||
| 6a46a08a85 | |||
| 7a2e6aa5c2 | |||
| 34b5f9ce6e | |||
| f77eb0a282 | |||
| 302a409136 | |||
| 0b3b9fe128 | |||
| f71c7865fc | |||
| 4ecf20b3f5 | |||
| a5b8788014 | |||
| 3cc7950c4b | |||
| 854bc4db0c | |||
| dbc77279bf | |||
| c4ef566a65 | |||
| 66376335ab | |||
| 823bc01f66 | |||
| 947ad6f73a | |||
| 06c8a1ef50 | |||
| b3fd861b3e | |||
| 62262f4b0d | |||
| 6e0dc0e210 | |||
| 7e7556f064 | |||
| 111d6a9178 | |||
| d23817604c | |||
| 4694c7afb4 | |||
| a52293336f | |||
| f24e17f8b4 | |||
| 2b208de02f | |||
| 4eb5d153c0 | |||
| 0451dd3d0d | |||
| c3e4f1bf7e | |||
| f122f104c4 | |||
| deedb3bdd7 | |||
| d27aa03500 | |||
| dcffa5da6f | |||
| 221e79f50d | |||
| d5a453b663 | |||
| a2d69fa431 | |||
| 6a0e4418f4 | |||
| 68eeac67c9 | |||
| 731912f01e | |||
| 51963915ba | |||
| 810685cb73 | |||
| 1a0e6b0be3 | |||
| 81c89bb708 | |||
| 01620e849a | |||
| 4c74020a69 | |||
| b95b8f0aae | |||
| 1ff7a7c1f1 | |||
| 1d16629a6d | |||
| 72aa27ede5 | |||
| 05223dbe6d | |||
| 06d43baf93 | |||
| 5f74662100 | |||
| 2c68312d72 | |||
| ce094f4d01 | |||
| 178056096f | |||
| a32c897bf9 | |||
| 367b662c83 | |||
| 75999e05b9 | |||
| 45c02f8e4e | |||
| ae4421b8a2 | |||
| 2d309da0f6 | |||
| b9bbb3747b | |||
| 0b05eaa020 | |||
| 91ad9d22ca | |||
| 6aa9ad938a | |||
| 6808498ead | |||
| 8561941e22 | |||
| 5d4db2b854 | |||
| 501503b7a5 | |||
| a980e32581 | |||
| da2fea338a | |||
| 7cb70f5fa1 | |||
| d04db3d38b | |||
| 35c260877f | |||
| 8cf7ec9cfe | |||
| c67087d750 | |||
| 2336b4723c | |||
| da61734860 | |||
| a911354f24 | |||
| ae902443db | |||
| 5547c3ed24 | |||
| e844cdf4f6 | |||
| 2fa5cfa508 | |||
| 59792173e7 | |||
| ed68482b4e | |||
| 32592987c8 | |||
| a1f92638e3 | |||
| 7d50818ee1 | |||
| d0e1f3b66a | |||
| cb91f991a3 | |||
| a49d7b12cb | |||
| eda7b55bac | |||
| bcf99d5998 | |||
| 3ab6706993 | |||
| c40e9c3996 | |||
| 7be23b7e37 | |||
| d9c18a6072 | |||
| 73099b82e8 | |||
| fc1d7ea89b | |||
| 391f2822c8 | |||
| f0875c5d85 | |||
| f6ef706909 | |||
| 7656c25e38 | |||
| 5cf1edeb6e | |||
| 9e544a6443 | |||
| 225b7c38c1 | |||
| 994866461c | |||
| fc4b884d0e | |||
| 9b3ecfe777 | |||
| 20794981b3 | |||
| 01413dd3cc | |||
| 9d1fe6102c | |||
| 2472a41561 | |||
| 65fbdcfa87 | |||
| 25cec015e8 | |||
| 62e3c8c4f8 | |||
| 8902c1f038 | |||
| 6c43bcc3e0 | |||
| 15b37c1e38 | |||
| 29fcdc5f40 | |||
| 1075bb1dbc | |||
| dccb0ee313 | |||
| aea86906f4 | |||
| a62698a14a | |||
| 47af43c281 | |||
| ae2c82adbc | |||
| 594b1a136d | |||
| ae46cc7f73 | |||
| 6b2aad734e | |||
| 98ccbe2b06 | |||
| 5ae100fea2 | |||
| 0052dd29a7 | |||
| 50a42d2cbf | |||
| 49cb6a07a2 | |||
| ed7c4dc2e1 | |||
| c376fb0a2b | |||
| 76d9e58ae5 | |||
| 3769cc1a35 | |||
| 74ace7d4b9 | |||
| 647245a71f | |||
| a634c7be65 | |||
| f656e3195f | |||
| 8811545472 | |||
| cad3850f3d | |||
| 7de058ba35 | |||
| ddaa001daf | |||
| 51c049e1a7 | |||
| 93472f84bd | |||
| 678d27fdb7 | |||
| 369ca89c2e | |||
| 421db75528 | |||
| 846b56c724 | |||
| e62d2fe56e | |||
| bb3abab784 | |||
| da6543d17b | |||
| 29a018088e | |||
| 7e7fc757d5 | |||
| d3a6bdc68b | |||
| 402e42fd15 | |||
| 5007b72b28 | |||
| 9931ec2994 | |||
| 5f3dfc2960 | |||
| dc9e81a6fc | |||
| ed719c80e7 | |||
| 77dc2e4746 | |||
| c5f4c8d174 | |||
| 6ba49642d0 | |||
| 9a2ef9dc00 | |||
| 6ccf0a3428 | |||
| 23e303aaa2 | |||
| 098157dca8 | |||
| 827469600e | |||
| bf718e8698 | |||
| 326f1a9c8b | |||
| 793c438286 | |||
| 6b1f323bb5 | |||
| 761849083d | |||
| ae6ddf295a | |||
| b591e8cdc8 | |||
| 379b2ccf92 | |||
| 3fb4cf56b6 | |||
| fdc62daa8b | |||
| 05094b0da5 | |||
| 4ab8a70b21 | |||
| c88a3fffd5 | |||
| 7b1ae9602d | |||
| c7a22dff87 | |||
| 45ee7c12d0 | |||
| 392b591d09 | |||
| 556a4375e2 | |||
| eab583310d | |||
| 077ae27369 | |||
| d4e1c958e2 | |||
| 33ae442aa1 | |||
| 1285c7f0ca | |||
| 8c72892de1 | |||
| dc751bd2f1 | |||
| 0cde0aee34 | |||
| 503bda5b28 | |||
| a4d5c40d63 | |||
| 8e219bdd77 | |||
| 5acc93dd34 | |||
| 276247b463 | |||
| d277f49423 | |||
| 67bd2c6b2d | |||
| 784683a68d | |||
| 3b2094301d | |||
| 6572754c10 | |||
| f157ea3fdb | |||
| ddd7fe6f05 | |||
| 47a351acb2 | |||
| ff9f670871 | |||
| f33f7d98c4 | |||
| c49f03f985 | |||
| 6b5f583ff3 | |||
| 8e3ab0d10b | |||
| a049092526 | |||
| b6407afa06 | |||
| fbd3cda320 | |||
| 05341828b5 | |||
| 280ba89b26 | |||
| fe7fcc2dc3 | |||
| dcd34d3728 | |||
| dced01fc24 | |||
| cdec0a3f96 | |||
| 1075f3b457 | |||
| c1077faa28 | |||
| 76ba147c22 | |||
| 1c1a216df1 | |||
| 04f96a54b8 | |||
| 5f72d1fda5 | |||
| dfff54425b | |||
| 0edd26467e | |||
| e71c890cf5 | |||
| eada35df36 | |||
| 8d4a08ccc1 | |||
| 9dec093676 | |||
| f711dd3460 | |||
| 7a865b6b28 | |||
| faaaae365a | |||
| 705d1efeab | |||
| c0f60d56a1 | |||
| a4468dd56e | |||
| 337f361526 | |||
| 26a048e5c4 | |||
| ccd41e7efe | |||
| a1a5ba0723 | |||
| 8a6962fc36 | |||
| f23bad140b | |||
| 1bfafd9eb6 | |||
| 1bdb756b25 | |||
| 80c573eed7 | |||
| 78607ea60c | |||
| 0110214abc | |||
| 54d8695e70 | |||
| a2441fd326 | |||
| 831a1d15d5 | |||
| 6b5df8e62f | |||
| 0210cf2b17 | |||
| f0708340ef | |||
| a44bf31d27 | |||
| 002f00d7eb | |||
| ded89b0d49 | |||
| 36b1166cf6 | |||
| 0e7bd9f3ba | |||
| 7963534940 | |||
| d33a0f75a5 | |||
| 368d469631 | |||
| efd3c04f37 | |||
| 5fe6f0b2ec | |||
| 5d6fb2427e | |||
| ad3d1d381a | |||
| b51f60cc1e | |||
| 504232b388 | |||
| 8f36f65f39 | |||
| ff3e396e92 | |||
| 2fe387b4f0 | |||
| 9ec482b7c2 | |||
| 53e8cd18dc | |||
| ac57f41c87 | |||
| 8b78b6bb10 | |||
| 52fa66820c | |||
| 72eb2ccf50 | |||
| 4cfd468863 | |||
| 0cf8d73395 | |||
| 53b2bdfe5e | |||
| 27ab6a686c | |||
| 22c8297a03 | |||
| d22e86376b | |||
| fb56b3a53f | |||
| 0c47017046 | |||
| 792091b23c | |||
| b917361de8 | |||
| a0a54fdfe0 | |||
| d90d5d538b | |||
| c2ae76248e | |||
| 9aa71af1e5 | |||
| b64abebd24 | |||
| 90930619bc | |||
| 5b1c823019 | |||
| b2b4f21e39 | |||
| 22e55165c9 | |||
| 35c2256849 | |||
| 3a10fca75f | |||
| a39947cd3c | |||
| 1730bfb2bc | |||
| 26a4a13cdf | |||
| 36f357c354 | |||
| b07928eea9 | |||
| 1ef7480380 | |||
| e4c2dcc0c7 | |||
| 7bdad857e4 | |||
| c2a8ad26af | |||
| fedf235c83 | |||
| e88d2c2031 | |||
| 20e4685057 | |||
| ca55e15d44 | |||
| bb5e4127d7 | |||
| 30028a2404 | |||
| 6883309927 | |||
| 9c8570ac68 | |||
| 4dfc0f952f | |||
| d6e1b92059 | |||
| bb5f4555dc | |||
| 32d33ca8e5 | |||
| e1dcf24c98 | |||
| 3b24311db6 | |||
| 8fd3fc7c13 | |||
| 8d27b25bf8 | |||
| 727b35536f | |||
| bbe667dc74 | |||
| 3608d42ae9 | |||
| 8f33933dd8 | |||
| e5efe42ecb | |||
| 10e21bfeda | |||
| 00256fdba8 | |||
| 3b8fb7bb88 | |||
| 1057fa8421 | |||
| fca9ec085e | |||
| ef5c6684c7 | |||
| e0438e3a7e | |||
| 04632bd381 | |||
| 0b9db15efc | |||
| d5b2f9cfa7 | |||
| 727c3d5b75 | |||
| eddb7684c1 | |||
| 484baba6ad | |||
| 88f10a2c3c | |||
| ffa1c976f5 | |||
| 4fdc157f68 | |||
| 0a950669cb | |||
| 1232018332 | |||
| 6237613439 | |||
| 4424abd15d | |||
| 76a0471c29 | |||
| e08422a4ea | |||
| 757ff06011 | |||
| 06defe014b | |||
| 63bf134321 | |||
| 2113494274 | |||
| 912f068fe4 | |||
| 8f5d786f0e | |||
| 1dacc648a0 | |||
| 3af786d4c9 | |||
| e57b470e83 | |||
| b8b63ff115 | |||
| 959a3f3cca | |||
| 0a111c1976 | |||
| 4b68f0447c | |||
| 31914b200b | |||
| ebb3fca698 | |||
| 7f72b466ac | |||
| 4751c735ec | |||
| bda3b1fa3a | |||
| 4ec10d798b | |||
| 3dd21e4dcd | |||
| 682d76835e | |||
| 42aa367f16 | |||
| ec8a1bcc82 | |||
| 2d9541c4c8 | |||
| e747ba6c26 | |||
| 4431a34987 | |||
| 14d7de0cf3 | |||
| cd28fdc192 | |||
| 25fe9c7084 | |||
| 94fc2ba9c9 | |||
| 2f87b8e430 | |||
| eff61c7a97 | |||
| 7c96227cd3 | |||
| dcfae6332e | |||
| 69437bb324 | |||
| 7551245f57 | |||
| 47bc551485 | |||
| 87478187af | |||
| 7042223f2e | |||
| 93698f0d61 | |||
| f7aa837696 | |||
| e1d1d18288 | |||
| 20a6f82753 | |||
| aec6cac8ca | |||
| ffca6a762d | |||
| 2d2ab4fec4 | |||
| a434baed91 | |||
| f14a3dfb8a | |||
| b19a3af4db | |||
| 89428a9d10 | |||
| b937d6310d | |||
| ad37bc9639 | |||
| 56df1abdd8 | |||
| 0ea5e57298 | |||
| 3838eb1f05 | |||
| 9ba7196881 | |||
| 1e71303ffa | |||
| 74117a1e1e | |||
| 38ad523f91 | |||
| a71e2fb64e | |||
| 1b20ec8747 | |||
| d30e53ee2c | |||
| aa57ad6082 | |||
| 097893bfbf | |||
| 16019c9827 | |||
| f391100586 | |||
| c4a1e1bb0c | |||
| 7e3b5bed50 | |||
| c9c477ff9d | |||
| 4eb7db80a6 | |||
| 9d6626f70c | |||
| 5c07863ad5 | |||
| 3060375251 | |||
| 3c63e44d32 | |||
| 02d943bfb0 | |||
| 4c8fef264e | |||
| 082cf8ace8 | |||
| 1fd193840d | |||
| b1f8e910eb | |||
| 81cf9f0c71 | |||
| 3264669e03 | |||
| 271d723bbd | |||
| a0c4575122 | |||
| 1af64a9bbb | |||
| e3d5140dcc | |||
| f81d0113a2 | |||
| fde42899e7 | |||
| f7bf2fa960 | |||
| b894a569c9 | |||
| 48022c3ddf | |||
| 28aa981464 | |||
| 2b8a09bf55 | |||
| a12788e8f4 | |||
| 9b5f6d3c45 | |||
| af24dc6050 | |||
| f27560cc1e | |||
| 4b309b5044 | |||
| d8a99d619f | |||
| 2dec8e767a | |||
| ba53c7eb03 | |||
| 873d4287de | |||
| 3626fb246e | |||
| a661098ef2 | |||
| a4bf5ce609 | |||
| 437944d416 | |||
| db37b1c634 | |||
| 1e49e9b9dc | |||
| 2cbfbc98e9 | |||
| 38d5f20deb | |||
| 70fb5900a2 | |||
| bf7d1a55af | |||
| 1f73e27870 | |||
| 699087b2bf | |||
| ccd29085a9 | |||
| a883362c14 | |||
| ef88385d85 | |||
| 90b0283160 | |||
| 0a8d46b538 | |||
| a84226edf0 | |||
| 9370b063d0 | |||
| d5ffae0e46 | |||
| f89599726e | |||
| a81b3aaff1 | |||
| 820e4edc2b | |||
| 25586f3246 | |||
| b7149fc940 | |||
| 675b113c3e | |||
| c797987615 | |||
| eb0e07d564 | |||
| 1b5805eeb0 | |||
| 42e652cae7 | |||
| 62818abbf4 | |||
| 4d9a96e8df | |||
| e490a5461f | |||
| 5068483cb9 | |||
| 83ee20fc29 | |||
| b08aa4ed92 | |||
| 1081ecdae8 | |||
| 2370c16f1e | |||
| 3d84dc91f6 | |||
| 573e49a7ea | |||
| 63c639e108 | |||
| fc00406079 | |||
| b752c3a668 | |||
| 7372b457cc | |||
| deb5196101 | |||
| 9e1fda2a44 | |||
| 9d249ef96f | |||
| e03b73e8cd | |||
| 6b473f22bd | |||
| 05bb80c06c | |||
| e6edc6586e | |||
| cf3124c063 | |||
| 12a6a27b52 | |||
| 31a0e673b2 | |||
| 8d0b4a1bf5 | |||
| 1b0ebcadfa | |||
| 0d100ffacc | |||
| 88fd1da803 | |||
| a06934777c | |||
| a26f4b9a9a | |||
| 053d6a2247 | |||
| beae4775cf | |||
| cff91a532f | |||
| 92ed5d7208 | |||
| 7800375510 | |||
| ab25815694 | |||
| 8e0104363f | |||
| b7a6d518b0 | |||
| 4ed844ffd5 | |||
| 020467d472 | |||
| 141b87bd14 | |||
| a5b9e235ae | |||
| a78790eac4 | |||
| 07226feec4 | |||
| e73013830d | |||
| 2bc3bd3fcf | |||
| 83456f6040 | |||
| 601dc41baf | |||
| 2337b7717d | |||
| fde40dee7a | |||
| ba32aad4cb | |||
| 24811e5970 | |||
| f01aab5f9b | |||
| 3850b073dd | |||
| 81e50dd1f4 | |||
| bd31fbb9f0 | |||
| 000660608e | |||
| 826de43724 | |||
| b84e080463 | |||
| 0ba58d7d0e | |||
| 1536c5cf60 | |||
| f2ce9cd85c | |||
| ee5cd8493e | |||
| 41e8d27602 | |||
| e1f5fc6a0c | |||
| db59f1a70f | |||
| a9772cde21 | |||
| 086790d633 | |||
| 1bc8e2ab82 | |||
| 089c85b27e | |||
| 01194e3958 | |||
| f082530f89 | |||
| b906656caa | |||
| 378ae4c4f1 | |||
| ce2a0f72d4 | |||
| be5ba495f9 | |||
| b4f27da51c | |||
| d09a30295b | |||
| 0f909273e1 | |||
| 52eaa7d6d6 | |||
| e88e37c59b | |||
| f10f49d6fc | |||
| d06cdaab29 | |||
| fc20bd7b22 | |||
| b3d9412452 | |||
| 98feb1b76d | |||
| 94c302baf3 | |||
| cdb6bb8ec2 | |||
| a851f849df | |||
| a270a13010 | |||
| 964d63cdac | |||
| f38faedbda | |||
| c462a69b7d | |||
| 14a2c9cec0 | |||
| a52ed70ea0 | |||
| 7c03e60299 | |||
| 1e9d88af01 | |||
| 815e140ecf | |||
| f8245574dc | |||
| 830c5ca725 | |||
| 9e71394127 | |||
| dd64eac782 | |||
| 4204ece7a8 | |||
| 60a5cc1a61 | |||
| 20aa4e85ce | |||
| f1b05acf26 | |||
| a4bf770a49 | |||
| 150831c1a6 | |||
| 1a4157b7f4 | |||
| 3bcb285690 | |||
| 704dbe27bf | |||
| bbddf50c9d | |||
| e5851addd6 | |||
| 03119f2aa9 | |||
| 45fc3ce1c4 | |||
| d320c73f23 | |||
| ca8ce89de4 | |||
| c88a751eab | |||
| 9ea030d060 | |||
| ad14c8145b | |||
| 255a8da347 | |||
| 4211dcf6f9 | |||
| 3c5337fb8a | |||
| d2f788c61e | |||
| fa54d5acb7 | |||
| aeefe1650e | |||
| c80e7844b7 | |||
| 620c08bd7a | |||
| 23a92709c0 | |||
| cef3eb78df | |||
| 12d0a7302f | |||
| 0dd85f7761 | |||
| 51d6e8ebfb | |||
| 3f14882992 | |||
| 5a17b060fe | |||
| bf8e4ac714 | |||
| 781ed11ba8 | |||
| 6f8f7491db | |||
| c43cdf438f | |||
| 8374211239 | |||
| 69dfc729e9 | |||
| 5281282a61 | |||
| 503eb42e40 | |||
| 38d90c76e0 | |||
| 1356498320 | |||
| 9ed203c0cb | |||
| b5ff856f47 | |||
| 97b9055f92 | |||
| 5f0b9338dc | |||
| b3194a10c5 | |||
| d01f4ea3ce | |||
| a42cafbf69 | |||
| 066e5b3fc0 | |||
| 09dba47653 | |||
| ca33ac608d | |||
| 302989bed1 | |||
| 22b7d9fbee | |||
| 9dd71c427d | |||
| 655c1cc1f7 | |||
| d9333e02fa | |||
| 39ac438b8d | |||
| 0761a4a692 | |||
| 66ca256cfc | |||
| 961bb6e27e | |||
| b14f5ea884 | |||
| bf66336e2c | |||
| c79a575452 | |||
| 8334128680 | |||
| 7c62de1f27 | |||
| 377a7a968b | |||
| ccf29c0134 | |||
| d0513d6506 | |||
| f4a0bdd54d | |||
| 3e2ac3640d | |||
| c8b3809fc9 | |||
| ad2ef75cbe | |||
| 6ce9010324 | |||
| d0afc8c509 | |||
| 230b3bc884 | |||
| 1cfb630ede | |||
| d16f9620d5 | |||
| fc16746352 | |||
| eb5b5f97d1 | |||
| faea45245d | |||
| 2c614d5aab | |||
| 89b4be681d | |||
| 28ca0e1007 | |||
| 2504af7d0f | |||
| ddc3c2f38c | |||
| 53275c362c | |||
| f3f6727cdd | |||
| 4681e3a0ef | |||
| 80f4f317b2 | |||
| 9f3d735d9d | |||
| 0e012f73d4 | |||
| 9f850334a1 | |||
| af273e3da5 | |||
| 1f3e96f4ad | |||
| e7ba639beb | |||
| 1f2399de36 | |||
| 43201ead95 | |||
| 7dce64e540 | |||
| 1184eb59c5 | |||
| 4c2a4929ea | |||
| be77a7e27e | |||
| 934723faa5 | |||
| f07295cc78 | |||
| 26c1d67556 | |||
| 3d5889c308 | |||
| 213c1c4860 | |||
| 63cb8ca24c | |||
| dc5d1fa21c | |||
| 563d158e49 | |||
| 1478b5bbd7 | |||
| 19e0b87aa1 | |||
| 17ea4ed8f5 | |||
| feaef7cc4a | |||
| c6d3fbdfab | |||
| 700a585b1b | |||
| 62752db4c4 | |||
| f025d1b495 | |||
| 8c4417cad1 | |||
| d4db2b84f2 | |||
| bb8e04c835 | |||
| b504791bad | |||
| d5749c11f3 | |||
| f54ab5e2ca | |||
| 1e45019f8a | |||
| 2eb708e5ad | |||
| 4fcb371bc8 | |||
| 6401d93b8e | |||
| 8a9a39c065 | |||
| 13e8b26989 | |||
| 8a6d6577bd | |||
| 4a7ba7ef4c | |||
| 2b5d9f349f | |||
| 3a502f2189 | |||
| b6dad375a3 | |||
| 3cbad7f0df | |||
| b80a0a8d74 | |||
| f844b0a161 | |||
| 6bd31b0333 | |||
| 7de1a7a6d1 | |||
| 3815e7d61e | |||
| 30e6fc07d6 | |||
| fe1c5d41f9 | |||
| fa5ba63542 | |||
| 073db54354 | |||
| ef10b5a834 | |||
| 1c5ff92c93 | |||
| b24ea29bf5 | |||
| 5cf3ddb7b1 | |||
| 1e1a41f0e7 | |||
| 28e8190e6b | |||
| 670c928a9f | |||
| d07a69278d | |||
| bb52530eb2 | |||
| 309dfa36e7 | |||
| 5c57f5aa0b | |||
| a36e575500 | |||
| 8702031bcd | |||
| 1571508aac | |||
| 6dacec22a4 | |||
| fdbbea2609 | |||
| dffed5a259 | |||
| 5d681a74ad | |||
| d80e00f5d7 | |||
| 21a8bff011 | |||
| fb14f7706c | |||
| 2284c31f90 | |||
| b5b2c42242 | |||
| a2f92b642c | |||
| c996356fab | |||
| d71ae412bb | |||
| 68a125bf6e | |||
| 37c7ca8b87 | |||
| 4663970722 | |||
| a68d17c17e | |||
| fa3b74a5b4 | |||
| fd999b996f | |||
| b4f57247b8 | |||
| abdc69aa94 | |||
| 1b02216f2d | |||
| db340f96d6 | |||
| 0cdca534a8 | |||
| 71b9bbd1ac | |||
| 2f3969b4be | |||
| ff7479f437 | |||
| 487d828fa0 | |||
| f41081ba51 | |||
| ede910d655 | |||
| 0f4c9a43b3 | |||
| 9aa414b1f6 | |||
| 2d9ddb065f | |||
| 1f542e1e75 | |||
| 68e0d99f62 | |||
| f43287f43d | |||
| 2e7bd6498f | |||
| 786397f77d | |||
| 960c339a4c | |||
| fddb2304c6 | |||
| 1b8dc4d096 | |||
| fcc03f4ed8 | |||
| 78b8b30766 | |||
| 91d8cc4c5b | |||
| 11619be8b9 | |||
| e767ded69f | |||
| 83a579fb9a | |||
| 244f87917c | |||
| 6f0da68915 | |||
| af438527e9 | |||
| ad4c4e462b | |||
| ed33a4f75b | |||
| f3d7d4ee37 | |||
| bd4916ee84 | |||
| feee50e695 | |||
| 54710a782b | |||
| d44a1d0867 | |||
| c2780e1de4 | |||
| 4e1f54ff9c | |||
| 3755bf5bcd | |||
| 25d422d32b | |||
| 697bc8d8e8 | |||
| 4bdc9824a0 | |||
| ded98ed3de | |||
| 13bcc4ef14 | |||
| ce92c9b21b | |||
| b332fbd7a7 | |||
| eaf4e69cf1 | |||
| 2f67c704fe | |||
| 8348392af2 | |||
| 8116ad9b28 | |||
| cb7435982c | |||
| 776583a665 | |||
| 91c3363c15 | |||
| b7542fd6f2 | |||
| 0c860a77c0 | |||
| 2d591f7f59 | |||
| 9cb96f3bfb | |||
| 286a9edb1e | |||
| c4da496834 | |||
| ade92395a0 | |||
| c6741d3765 | |||
| 25e3408ff6 | |||
| 35588cc521 | |||
| 32bb63f047 | |||
| 27912e1e8f | |||
| b678aa64d8 | |||
| c3e9fc4a8d | |||
| 66ab59d163 | |||
| deb79e830d | |||
| a6dd65f916 | |||
| 0448e386de | |||
| 749de0054f | |||
| 7849667a19 | |||
| e03efdee97 | |||
| d6a8d27265 | |||
| 5e18a7292b | |||
| e66063e630 | |||
| 9ec18a3b02 | |||
| 773a1f3075 | |||
| b3f4ba0082 | |||
| 34da226bd9 | |||
| 16280f4f7f | |||
| 42f954ff7d | |||
| 09f5591aba | |||
| f690cd802e | |||
| d43e1fb800 | |||
| 41b40f6504 | |||
| f7adc0b35b | |||
| 710c02f3bd | |||
| 7f69d2b95f | |||
| a18e3f3380 | |||
| 63a4201d15 | |||
| b751800ff4 | |||
| f32149117a | |||
| 1cb11bba5d | |||
| f29c88bcd5 | |||
| f5e78d7c88 | |||
| 25c4985518 | |||
| cd4f6da735 | |||
| 6e032ded6e | |||
| e2b47e001f | |||
| b32c961c2e | |||
| 088337ea07 | |||
| e8c00b9e8b | |||
| 023d4b44ec | |||
| 87d2f4b8d7 | |||
| 39ca53cfcf | |||
| 46f2f3bd8f | |||
| cb56d50837 | |||
| b19dddb0f6 | |||
| acceabe3a8 | |||
| c3993b3123 | |||
| f277be0f26 | |||
| 1a2486d2ec | |||
| a735095965 | |||
| ef75e171bc | |||
| 5bf7dee559 | |||
| f858164dee | |||
| 924f6849fe | |||
| b5ec57a3f9 | |||
| 6d978486cd | |||
| d2832b1045 | |||
| 1a4fc39d7b | |||
| 97388abb99 | |||
| 57ec310512 | |||
| ffd5c045e4 | |||
| cc3c2b6999 | |||
| c549aa4e76 | |||
| 714831b249 | |||
| d6879c4a25 | |||
| 2caf5868d0 | |||
| c585964e60 | |||
| 936a50df23 | |||
| 3e9888092a | |||
| 821826a566 | |||
| 7ec803f610 | |||
| b1a075b462 | |||
| 3be75cbcb3 | |||
| 2667f9046e | |||
| 2601871391 | |||
| a3d0ab3d09 | |||
| a1b36ec0a5 | |||
| 48e995ddf2 | |||
| df971befb2 | |||
| 1cd65878db | |||
| 6148ffa669 | |||
| 717b4c3406 | |||
| 74361bec05 | |||
| a087e7f664 | |||
| 3ad93a31c9 | |||
| 184b346166 | |||
| b2c807dc8c | |||
| 60548aa00b | |||
| a45d1555d3 | |||
| 121ae0b189 | |||
| 8bf8832b70 | |||
| 4dd7e261f5 | |||
| f4329df11c | |||
| 98729a6c78 | |||
| 742ba970b0 | |||
| 115f94bfc2 | |||
| 7e5727288d | |||
| 13915d8b57 | |||
| 9962fae1a1 | |||
| 9fcbe293e2 | |||
| fd4b52ec38 | |||
| b59602abf8 | |||
| fd21c36725 | |||
| b999c6ca53 | |||
| 583954d3a1 | |||
| 8fb1604f64 | |||
| 284af258bf | |||
| e7887c1f01 | |||
| 076ebafa1b | |||
| 6922bd239c | |||
| 13aa58ce5d | |||
| c8c23158a4 | |||
| 1782ce260c | |||
| b28d3746f5 | |||
| 469a04e7e0 | |||
| 605b5d5717 | |||
| f7aa46fb33 | |||
| b4450294af | |||
| 57327a5e33 | |||
| 4a3c64291f | |||
| 036b3c9053 | |||
| 7da33344d1 | |||
| cbdb9f59f3 | |||
| 5d3d6bcead | |||
| 0cdc628db0 | |||
| 4a733c93d4 | |||
| 03d2378a9f | |||
| 5e027c196d | |||
| 3aeaef5b9a | |||
| 4d26070a92 | |||
| f601b04594 | |||
| ca169489b2 | |||
| 713c2eb704 | |||
| 660e0c78ac | |||
| 0862de6577 | |||
| 2cd511d3a3 | |||
| efe5fedde9 | |||
| c8c6845452 | |||
| bd62c4891e | |||
| 9535541f5a | |||
| 711a570d24 | |||
| cb9ccc443d | |||
| c681bdd2e3 | |||
| 74844c0f28 | |||
| 905207093b | |||
| 73a944fb74 | |||
| d1328d876a | |||
| faa85564fc | |||
| 8dec0c1f17 | |||
| 8098ed899a | |||
| 77c98f0750 | |||
| 8dbdfa9a44 | |||
| 685e99be02 | |||
| b14b7bd55e | |||
| 365769d14c | |||
| 01b901eba1 | |||
| 26de1d9f93 | |||
| 451fb82e54 | |||
| c02d51f523 | |||
| b95027ba28 | |||
| 5b476a2597 | |||
| bceeda8087 | |||
| ee9636bba2 | |||
| ddfb16de1a | |||
| 2555d0d637 | |||
| ed73d76751 | |||
| 4fe49af840 | |||
| beabbb3a20 | |||
| b4888c21ed | |||
| b75fa1c6ec | |||
| 3fbf39b25d | |||
| 15a833283b | |||
| 5a0d04bb81 | |||
| fbae3344ff | |||
| 95469fde30 | |||
| 9f46972f19 | |||
| 46a3afadb9 | |||
| 1b2f3bf369 | |||
| bb3b421385 | |||
| 1ee3d3d810 | |||
| 97c2e0957d | |||
| 09a5791bc6 | |||
| 8db5ecd736 | |||
| e9aa04a8f4 | |||
| 8eb23e7d48 | |||
| 093b3d258e | |||
| 48e6221cf0 | |||
| ef0c095712 | |||
| a0355dfd9d | |||
| 6fe2d8af97 | |||
| 90e5d0feaa | |||
| d79e22bfaa | |||
| a9fb6bab15 | |||
| dd968c07be | |||
| feb81c51d2 | |||
| aecf675e6b | |||
| bcaf406747 | |||
| f234a2bfab | |||
| 28d17a40ce | |||
| 7cfca37e2a | |||
| c38b6392c5 | |||
| ee38756982 | |||
| eea7d2eb77 | |||
| b15410fd3a | |||
| c83b2b73d7 | |||
| dfbb5264fa | |||
| f49a3e03c1 | |||
| 109d1744a0 | |||
| 470f8af97c | |||
| a1296a3b7c | |||
| f38fe242cd | |||
| 536ea2189a | |||
| ab0422b4d4 | |||
| 18bd33f9a4 | |||
| d436e4ca4a | |||
| 1372dc1953 | |||
| 9ef7352e69 | |||
| 2529ff6dae | |||
| 7bdf592f7e | |||
| f463b772b0 | |||
| eec897762c | |||
| f87c665b63 | |||
| 36d3fd1710 | |||
| d26a19b41d | |||
| a55b3742cb | |||
| 83556667fd | |||
| faf5f3128f | |||
| a53a797271 | |||
| 08583dc107 | |||
| c362a1e077 | |||
| 140208e5ee | |||
| 679d3c373f | |||
| 557eceeefc | |||
| 9704ccc8a6 | |||
| e62664138b | |||
| 3eadc1509f | |||
| 9910aa3cc6 | |||
| 2a53e5f80e | |||
| 2e8acfb98c | |||
| 48fa096943 | |||
| bf559d788f | |||
| 3bfc8e9a39 | |||
| a162f1d18e | |||
| a86873c93e | |||
| 05933e9f21 | |||
| ab2e34d817 | |||
| e7a8bcc30b | |||
| 34c6c664c9 | |||
| 4a3ee91c55 | |||
| 6f0d1af596 | |||
| 01feb5b489 | |||
| 8975b52cc3 | |||
| 7acbbbbf5b | |||
| 4fecafa612 | |||
| a4ded88e85 | |||
| 1b6aab0cd7 | |||
| c669820481 | |||
| ecc2fc6029 | |||
| e490202a1b | |||
| fd2412a5f6 | |||
| 07528ea8f2 | |||
| ce8a069eb5 | |||
| 2ba97aee6c | |||
| a674d81caf | |||
| efb61ed4a8 | |||
| 2e7d08c10b | |||
| 47b87e903b | |||
| ddeff72544 | |||
| 43995b4c6d | |||
| 512d23d60f | |||
| 0eb9152749 | |||
| 4403849126 | |||
| 9efebe5461 | |||
| 7198fa73d1 | |||
| 03ba592c48 | |||
| 57a06f72e2 | |||
| 3019ba6f43 | |||
| 2784cd17fc | |||
| 03cc9eb5c5 | |||
| 72b8f4609b | |||
| d36e53f702 | |||
| a36f14c1bf | |||
| 292e187524 | |||
| 16cab979da | |||
| fd7f542bd9 | |||
| 5ead326454 | |||
| a1c635b050 | |||
| d896bf9a1c | |||
| 49dd1c3409 | |||
| fce491e18c | |||
| 87d0fc8bb5 | |||
| f638d1078a | |||
| 8af2465a61 | |||
| 1b3f2567bc | |||
| 036d4514f0 | |||
| 80721d1873 | |||
| aa9e33cf74 | |||
| 86900175c8 | |||
| d5c1d6ebec | |||
| 35e328bcb6 | |||
| befb4b3644 | |||
| 4235df2b28 | |||
| a6c8a6a9f2 | |||
| 1a3ba00c24 | |||
| e8a2072792 | |||
| 4886b56edb | |||
| 15d29edae9 | |||
| 3009540a00 | |||
| a0ad3c4fef | |||
| 265006b691 | |||
| 11b3b8a5ff | |||
| 2783c82685 | |||
| 184e7b3f64 | |||
| 18377ac9fd | |||
| 184e14ea83 | |||
| 21125cf2cb | |||
| 0d20c47703 | |||
| 7f9a5e01c6 | |||
| eb9b12ed11 | |||
| 4a4c0886cc | |||
| 02476332ea | |||
| 49d3c97b67 | |||
| 97467cb2c8 | |||
| 6a43886807 | |||
| 5d56a2486e | |||
| eb138a02d6 | |||
| 2a4d0e3e89 | |||
| 9f7a2e4da2 | |||
| 25e995b0f5 | |||
| ad5da2a988 | |||
| 6ab7cf9689 | |||
| 099ead02a5 | |||
| f1d04a2f8e | |||
| aed53dbb47 | |||
| a507816701 | |||
| c41c828574 | |||
| 5fe41fb8a0 | |||
| 0ba566491e | |||
| 2a4d57a1ca | |||
| 71c433cc50 | |||
| 2b10cc84ea | |||
| cb6ef574e3 | |||
| 37e02a3594 | |||
| 7d1cfe9514 | |||
| 9870ee04dd | |||
| 1a286397e3 | |||
| 697dc89382 | |||
| 4d342d955d | |||
| c5eb349d41 | |||
| 7790a7f98c | |||
| 246f44b988 | |||
| a85112172d | |||
| 5f18cb018d | |||
| 872bc3fa5e | |||
| 1625a5af0c | |||
| 2e9a632e14 | |||
| 3c9d4e9daf | |||
| c792c7f62d | |||
| e512760364 | |||
| ac41137ce2 | |||
| 28aba58e25 | |||
| 4ec661c0bb | |||
| 87bdf73cb7 | |||
| 21c8e89671 | |||
| 8fbe36635c | |||
| 5cd4fefb4c | |||
| 82e588a790 | |||
| 7b7301eeff | |||
| 70d65376b7 | |||
| af8cf445b8 | |||
| be4ec3c0c4 | |||
| 587e5d9421 | |||
| 35f03811e8 | |||
| 14e396baf7 | |||
| ba01e7a3bb | |||
| 52d9ed428f | |||
| 8f825821e0 | |||
| d1ba920729 | |||
| 56b269e6b3 | |||
| 7e03427272 | |||
| 72ab27af76 | |||
| 3445f4d680 | |||
| aab915f2e9 | |||
| 27652144ec | |||
| 4f8dfc2132 | |||
| 4415a779a3 | |||
| 8662b0989e | |||
| 12c5314863 | |||
| 0d2db1f9f9 | |||
| fe6d7913ce | |||
| dc1252597a | |||
| 721ef7d345 | |||
| 5209e73995 | |||
| 07e2ec0fa7 | |||
| f5d20579ee | |||
| cbd0f52eff | |||
| 4fb4858952 | |||
| 477ff30cec | |||
| daa97f0343 | |||
| 3edc6d70b9 | |||
| 9db85375ee | |||
| e3f368f67b | |||
| 2170823059 | |||
| 011582ff3c | |||
| 98bdd9749a | |||
| cd21bd758c | |||
| fb9f41b3e5 | |||
| a7e5d51616 | |||
| b8df88a1bc | |||
| 257fb256e9 | |||
| 8ff0b0ed99 | |||
| 180aa6b67b | |||
| a26f119bc8 | |||
| a79da4bba1 | |||
| 09160d1289 | |||
| 1d931401cd | |||
| bd7b6b16ec | |||
| ec5fa9e63e | |||
| 7e47b97740 | |||
| 1bd975b90e | |||
| eb8f3a799c | |||
| 791c2b89a5 | |||
| 4f317a2421 | |||
| f3c2933542 | |||
| 4ddb469864 | |||
| d24e810262 | |||
| bc812eeb03 | |||
| 5e9db23883 | |||
| c4075c032e | |||
| dc0c07b408 | |||
| afb55a1842 | |||
| d7aa5f6a3a | |||
| 717c123441 | |||
| 0ac77d0e42 | |||
| 5ca2df1edb | |||
| b3dd5668f6 | |||
| 63b1f9ce88 | |||
| d5e6bd8391 | |||
| 7e62fcf4b3 | |||
| 21a61f162e | |||
| 7df71750cb | |||
| b4f675adcf | |||
| 5298107ae8 | |||
| 7f4362138a | |||
| 4da258ff78 | |||
| 9ab50eedf2 | |||
| 64a3bda235 | |||
| acec166702 | |||
| 00ed18b421 | |||
| 10833f9d3f | |||
| 592060ac75 | |||
| 92338c13b8 | |||
| 3fa2659309 | |||
| 58a3e2bbb7 | |||
| ab5ebc2245 | |||
| cf98cd3e06 | |||
| 632f8df76b | |||
| 663a8b9a1c | |||
| 90f0a7c92a | |||
| 0d684191e9 | |||
| 3499edc427 | |||
| 8a0cf62d70 | |||
| 59f35732f6 | |||
| 76b10625d9 | |||
| b0070bbd3b | |||
| 0a8bb88085 | |||
| a62d824cb4 | |||
| e3afb119b9 | |||
| d44f7971b1 | |||
| 70056dd468 | |||
| 5d9df2bdc1 | |||
| 9d2ef3f130 | |||
| 6ca09be663 | |||
| 7db5e19f74 | |||
| f3840ed110 | |||
| 7d5893a1c8 | |||
| d646d455e2 | |||
| 05e6815d91 | |||
| 3459206980 | |||
| 6f707920ff | |||
| ce69f294a1 | |||
| f8ee95ef98 | |||
| 1e3d2f3739 | |||
| aa9ab7c6db | |||
| 22f2b25f97 | |||
| ebd2997b79 | |||
| 06faf6affc | |||
| 5ec605e424 | |||
| 227909e2cf | |||
| f71fb6e813 | |||
| 74566d869a | |||
| 61e7564633 | |||
| 86c1dab286 | |||
| cd1e9f3181 | |||
| ccc6109879 | |||
| 8131851058 | |||
| 6239b5a053 | |||
| e7ac33fd62 | |||
| 630f3815ce | |||
| 4da2af64ec | |||
| 22b9da7f1d | |||
| 47872e53ed | |||
| e30370af10 | |||
| 89c5b203c3 | |||
| f00e76d30a | |||
| 9eb7562bee | |||
| 46813ccb8c | |||
| fdd196e50b | |||
| 7a522d1c34 | |||
| f276927365 | |||
| d70f1a43bc | |||
| 4319319f97 | |||
| e820e1af0d | |||
| 26ba944d55 | |||
| 4cc6604326 | |||
| 5fbe0c845c | |||
| 2aac8b05ef | |||
| 10d901084f | |||
| 334e5a4ef9 | |||
| 56045afda2 | |||
| c2ddecc2b1 | |||
| 73fb94c553 | |||
| ea9b945830 | |||
| 2803190255 | |||
| f20512c849 | |||
| ada65a3baf | |||
| 8a4c6ae618 | |||
| 88d3338fdd | |||
| 32c31f25ec | |||
| 6608f16b7d | |||
| fb551f0d5d | |||
| 931b0777fb | |||
| b180d5f975 | |||
| fa7684b3a3 | |||
| e65d8b2f3d | |||
| 2575008baa | |||
| 5fb10d27de | |||
| de8eeab2d9 | |||
| c2a97d9f3f | |||
| a950ed8cab | |||
| 4d0a1aaabd | |||
| c24ec06861 | |||
| d4c7f67b58 | |||
| d05afb3ca3 | |||
| bbff5ae4d3 | |||
| de7643a14f | |||
| 46e88e3595 | |||
| f78243b6b1 | |||
| 9da927889f | |||
| 8703afe116 | |||
| 9696118ff5 | |||
| 263f69a40e | |||
| a659f82814 | |||
| 44387a2587 | |||
| 59ee16c7cb | |||
| 7b27a4e491 | |||
| 4ffdd7ca6b | |||
| 503215f39c | |||
| ddb886aa99 | |||
| 48d58d9b88 | |||
| 15a0f998a7 | |||
| ca26c4d9ca | |||
| 80f0351a8b | |||
| 5258549305 | |||
| 94371e69a9 | |||
| f887b37453 | |||
| fd31d4aa29 | |||
| 4fe1c9233c | |||
| 90976b6672 | |||
| e8d6524411 | |||
| d59c1b95e1 | |||
| 2f6c0e435c | |||
| cb3a18e524 | |||
| 5b68782133 | |||
| 084766069c | |||
| 1175ef320e | |||
| a65e9df8dc | |||
| bfd94136c6 | |||
| 11663765e2 | |||
| c770c47e18 | |||
| 9d0d44d738 | |||
| 602d2378f5 | |||
| afb3782aa3 | |||
| ef651b667e | |||
| 7a7b8933bb | |||
| a68e215bad | |||
| 174cc58a8d | |||
| 527304ed2c | |||
| 0cacbf30d2 | |||
| 8e6fe99181 | |||
| e353b15df8 | |||
| 5ed69ed678 | |||
| abfc9926db | |||
| cc64903179 | |||
| 04200cc838 | |||
| 06cb137fde | |||
| 971df4825c | |||
| aa9610a56f | |||
| 4700c96268 | |||
| a2573a2c30 | |||
| 4b870cc5f9 | |||
| 66c0e280ee | |||
| 92edce8ef9 | |||
| 502c985072 | |||
| 1144744c85 | |||
| d4048134af | |||
| 57bb759305 | |||
| 6e6b6b46aa | |||
| 8ea033dd35 | |||
| aa2c1009ee | |||
| 707268f30b | |||
| ae38212c1c | |||
| 15d7f0f6fe | |||
| 5cd986e82b | |||
| 2328c3e7ec | |||
| b218d52a31 | |||
| b899a5c269 | |||
| f9cd3f4238 | |||
| a22f8d3b2d | |||
| 43b1e43afb | |||
| 63d7142465 | |||
| a495213026 | |||
| fa622aae38 | |||
| 07ec79e881 | |||
| 4b1e76c3bb | |||
| 166d6f5d09 | |||
| 7e20659522 | |||
| 1cf4ebb231 | |||
| 8f8b1e46d6 | |||
| f71d5b4d3a | |||
| de1bf10690 | |||
| 950cfcd31e | |||
| 1037a469d3 | |||
| d99ee2d9a4 | |||
| f1cb4b86b7 | |||
| 4502038e3d | |||
| 85b07a94d7 | |||
| 2e4099e9f2 | |||
| 00aa4a0ad4 | |||
| 28e12bc24a | |||
| 051ebe3eea | |||
| f17c4d4d04 | |||
| 0eb007a1b3 | |||
| 1e53c2d50a | |||
| ccc92376be | |||
| 8cf8faf529 | |||
| 6e1fa85cbc | |||
| 9269d20a70 | |||
| 57caa0b53f | |||
| d49aee6cf8 | |||
| e51d6e2fe1 | |||
| 36c646c7d2 | |||
| 4e31757f14 | |||
| 6dc3af5db4 | |||
| c7cb8897b4 | |||
| d5ee411aca | |||
| 03fbc7d281 | |||
| cbcead4e89 | |||
| e447933c02 | |||
| 7bb90e1922 | |||
| c4233e9f9a | |||
| 959a1a69a5 | |||
| 7e872db956 | |||
| 980a2feff8 | |||
| e8d7c65ecf | |||
| 6a8c359b4f | |||
| 1e20877e2f | |||
| fb16ce72a0 | |||
| 36bf5fcb26 | |||
| 16854ae793 | |||
| 17040c088a | |||
| 0d2d7e9968 | |||
| 63d7bee2a6 | |||
| 381c9c8870 | |||
| e8a1570ed9 | |||
| 968e4d0bdd | |||
| 7b7e2a6150 | |||
| 448eadd747 | |||
| 68b54f3fb5 | |||
| 7530c030a9 | |||
| 2528dc80bd | |||
| 52058fe87b | |||
| 43e951aed5 | |||
| c2ae11dd92 | |||
| 87ac831206 | |||
| f74f82619d | |||
| 03dcccc461 | |||
| 35a1c2c1bf | |||
| a2131b7da6 | |||
| c0ea25fb94 | |||
| e05919a1a5 | |||
| d5fd2f5d57 | |||
| 31acdea1aa | |||
| 7b1f345284 | |||
| df9d291bcb | |||
| 7c4a9cf979 | |||
| e6447fa2c4 | |||
| 6cd8849466 | |||
| b8f9116b19 | |||
| 435c9116e9 | |||
| c43666e344 | |||
| 1394c96173 | |||
| f0a44ba894 | |||
| 4a2b9ebcf3 | |||
| 2fba686904 | |||
| 3a2c2a916a | |||
| 0358ae062b | |||
| cab6fcc82d | |||
| 17ab410400 | |||
| 2a22d9c2fd | |||
| c477360dbf | |||
| ee57f57193 | |||
| c966d7ec17 | |||
| f049124905 | |||
| 81a45520a7 | |||
| e6263dba84 | |||
| 631d11d6a8 | |||
| 4e1286ca10 | |||
| 4149afd45d | |||
| 6db15e1783 | |||
| e78a055c2b | |||
| af805e5b45 | |||
| b775c84402 | |||
| ebfff71599 | |||
| 9439cac6b1 | |||
| a93be9ff1c | |||
| 5d437d9ab5 | |||
| 031bc4a8b0 | |||
| 503958aa77 | |||
| c1d161dec4 | |||
| 73e93305c1 | |||
| fa82890696 | |||
| 2ba89de64d | |||
| c4b725b2e1 | |||
| 428d930e2b | |||
| cc3104fc3f | |||
| 1c7c4708d0 | |||
| bc86550c2c | |||
| ad45dbacbb | |||
| 116e5c7479 | |||
| 2d7e5c07d0 | |||
| 184b96946a | |||
| a8b6e44c69 | |||
| 3a2eb6307f | |||
| 4e6ede0e18 | |||
| 475f5afafc |
@@ -1,5 +1,5 @@
|
||||
___
|
||||
/ _ \ http://www.anope.org
|
||||
/ _ \ https://www.anope.org/
|
||||
| /_\ | _ __ _ _ _ _ ___
|
||||
| _ || '_ \/ _ \/ _ \ / _ \
|
||||
| | | || | | |_| |_| | __/
|
||||
@@ -7,12 +7,13 @@
|
||||
| |
|
||||
|_| IRC Services
|
||||
CURVER
|
||||
This program will help you to compile your Services, and ask you
|
||||
This program will help you to compile your services, and ask you
|
||||
questions regarding the compile-time settings of it during the
|
||||
process. For more options type SOURCE_DIR/Config --help
|
||||
|
||||
Anope is a set of Services for IRC networks that allows users to
|
||||
Anope is a set of services for IRC networks that allows users to
|
||||
manage their nicks and channels in a secure and efficient way,
|
||||
and administrators to manage their network with powerful tools.
|
||||
|
||||
For all your Anope needs please visit our portal at www.anope.org
|
||||
For all your Anope needs please visit our portal at
|
||||
https://www.anope.org/
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
---
|
||||
name: Bug report
|
||||
description: Report a non-security bug in Anope.
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report! Please make sure to answer the questions properly and don't just enter the same text into every field as this will make it harder for us to fix your bug.
|
||||
|
||||
If you're looking for help with setting up your services please post on [our support forum](https://github.com/orgs/anope/discussions/categories/support) instead.
|
||||
|
||||
If you're reporting a crash or other security issue [please read our security policy](https://github.com/anope/anope/security/policy#reporting-a-vulnerability) for how to report security issues privately.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps to reproduce the issue
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the results you received
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the results you expected
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Anope version
|
||||
description: |-
|
||||
Either the output of `services --version` (2.0) or `anope --version` (2.1).
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
description: Request that a new feature is added to Anope.
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this feature request!
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Description
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Why this would be useful?
|
||||
validations:
|
||||
required: true
|
||||
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Support forum
|
||||
url: https://github.com/orgs/anope/discussions/categories/support
|
||||
about: Please ask support questions here.
|
||||
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
Please fill in the template below. It will help us process your pull request a lot faster.
|
||||
-->
|
||||
|
||||
## Summary
|
||||
|
||||
<!--
|
||||
Briefly describe what this pull request changes.
|
||||
-->
|
||||
|
||||
## Rationale
|
||||
|
||||
<!--
|
||||
Describe why you have made this change.
|
||||
-->
|
||||
|
||||
## Testing Environment
|
||||
|
||||
<!--
|
||||
Describe the environment in which you have tested this change:
|
||||
-->
|
||||
|
||||
I have tested this pull request on:
|
||||
|
||||
**Operating system name and version:** <!-- e.g. Linux 3.11 -->
|
||||
**Compiler name and version:** <!-- e.g. GCC 4.2.0 -->
|
||||
|
||||
## Checks
|
||||
|
||||
<!--
|
||||
Tick the boxes for the checks you have made.
|
||||
-->
|
||||
|
||||
I have ensured that:
|
||||
|
||||
- [ ] The code I am submitting is my own work and/or I have permission from the author to share it.
|
||||
- [ ] Generative AI (Copilot, ChatGPT, etc) was not used to create any part of this pull request.
|
||||
- [ ] I have documented any features added by this pull request.
|
||||
- [ ] This pull request does not introduce any incompatible API changes (stable branches only, delete if not applicable).
|
||||
@@ -0,0 +1,19 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Currently the 2.0 (stable) branch is actively receiving security fixes.
|
||||
|
||||
The 2.1 (development) branch is still early in development and currently only receives security fixes when they are synced from the 2.0 branch.
|
||||
|
||||
Version | Supported
|
||||
------- | ---------
|
||||
2.1.x | :warning:
|
||||
2.0.x | :white_check_mark:
|
||||
1.8.x | :x:
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please do not report security vulnerabilities on GitHub. Instead, email the details to team@anope.org or get the attention of a developer in our development IRC channel at irc.teranova.net #anope-devel and PM them the details.
|
||||
|
||||
We will triage your issue as soon as possible and try to release a fixed version within a week of receiving your report.
|
||||
@@ -0,0 +1,7 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: /
|
||||
schedule:
|
||||
interval: monthly
|
||||
target-branch: "2.1"
|
||||
@@ -0,0 +1,59 @@
|
||||
name: Alpine CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip alpine ci]')"
|
||||
container: alpine:edge
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CXX: ${{ matrix.compiler }}
|
||||
CXXFLAGS: -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
|
||||
apk update
|
||||
apk add \
|
||||
argon2-dev \
|
||||
clang \
|
||||
cmake \
|
||||
g++ \
|
||||
gettext \
|
||||
git \
|
||||
gnutls-dev \
|
||||
mariadb-dev \
|
||||
openldap-dev \
|
||||
openssl-dev \
|
||||
pcre2-dev \
|
||||
samurai \
|
||||
sqlite-dev \
|
||||
tre-dev
|
||||
|
||||
- name: Enable extras
|
||||
run: |
|
||||
for MODULE in enc_argon2 enc_posix ldap mysql regex_pcre2 regex_posix regex_tre sqlite ssl_gnutls ssl_openssl
|
||||
do
|
||||
ln -s $PWD/modules/extra/$MODULE.cpp $PWD/modules
|
||||
done
|
||||
|
||||
- name: Run CMake
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=DEBUG -DINSTDIR:STRING=$(readlink -f ../run) ..
|
||||
|
||||
- name: Build Anope
|
||||
run: |
|
||||
ninja -C build install
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler:
|
||||
- clang++
|
||||
- g++
|
||||
@@ -0,0 +1,54 @@
|
||||
name: Ubuntu CI
|
||||
on:
|
||||
- pull_request
|
||||
- push
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
CXX: ${{ matrix.compiler }}
|
||||
CXXFLAGS: -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update --assume-yes
|
||||
sudo apt-get install --assume-yes --no-install-recommends \
|
||||
clang \
|
||||
g++ \
|
||||
gettext \
|
||||
git \
|
||||
libargon2-dev \
|
||||
libgnutls28-dev \
|
||||
libldap2-dev \
|
||||
libmysqlclient-dev \
|
||||
libpcre2-dev \
|
||||
libsqlite3-dev \
|
||||
libssl-dev \
|
||||
libtre-dev \
|
||||
ninja-build
|
||||
|
||||
- name: Enable extras
|
||||
run: |
|
||||
for MODULE in enc_argon2 enc_posix ldap mysql regex_pcre2 regex_posix regex_tre sqlite ssl_gnutls ssl_openssl
|
||||
do
|
||||
ln -s ${{ github.workspace }}/modules/extra/$MODULE.cpp ${{ github.workspace }}/modules
|
||||
done
|
||||
|
||||
- name: Run CMake
|
||||
run: |
|
||||
mkdir build && cd build
|
||||
cmake -GNinja -DCMAKE_BUILD_TYPE:STRING=DEBUG -DINSTDIR:STRING=${{ github.workspace }}/run ..
|
||||
|
||||
- name: Build Anope
|
||||
run: |
|
||||
ninja -C ${{ github.workspace }}/build install
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
compiler:
|
||||
- clang++
|
||||
- g++
|
||||
@@ -0,0 +1,68 @@
|
||||
name: Windows CI
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
schedule:
|
||||
- cron: '0 0 * * 0'
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
|
||||
runs-on: windows-2025
|
||||
env:
|
||||
BUILD_TYPE: ${{ github.event_name == 'release' && 'Release' || 'Debug' }}
|
||||
CONAN_USER_HOME: ${{ github.workspace }}/win/build
|
||||
CONAN_USER_HOME_SHORT: None
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup NSIS
|
||||
run: |-
|
||||
choco install nsis
|
||||
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Setup Conan
|
||||
uses: turtlebrowser/get-conan@v1.2
|
||||
with:
|
||||
version: 1.64.0
|
||||
|
||||
- name: Try to restore libraries from the cache
|
||||
uses: actions/cache/restore@v4
|
||||
id: library-cache
|
||||
with:
|
||||
key: conan-${{ hashFiles('src/win32/conanfile.txt') }}
|
||||
path: ${{ env.CONAN_USER_HOME }}/.conan
|
||||
|
||||
- name: Install libraries
|
||||
run: |
|
||||
conan install ${{ github.workspace }}\src\win32 --build=missing
|
||||
|
||||
- name: Save libraries to the cache
|
||||
if: ${{ steps.library-cache.outputs.cache-hit != 'true' }}
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: ${{ steps.library-cache.outputs.cache-primary-key }}
|
||||
path: ${{ env.CONAN_USER_HOME }}/.conan
|
||||
|
||||
- name: Run CMake
|
||||
run: |
|
||||
mkdir ${{ github.workspace }}\build
|
||||
cd ${{ github.workspace }}\build
|
||||
cmake -A x64 -D "CMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}" -G "Visual Studio 17 2022" ..
|
||||
|
||||
- name: Build Anope
|
||||
working-directory: ${{ github.workspace }}\build
|
||||
run: |
|
||||
msbuild PACKAGE.vcxproj /M:5 /P:Configuration=${{ env.BUILD_TYPE }} /P:Platform=x64 /VERBOSITY:MINIMAL
|
||||
|
||||
- name: Upload installer
|
||||
if: "${{ github.event_name == 'release' }}"
|
||||
working-directory: ${{ github.workspace }}\build
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem anope-*.exe)
|
||||
+17
-4
@@ -1,5 +1,18 @@
|
||||
/autom4te.cache
|
||||
Makefile
|
||||
build/
|
||||
config.cache
|
||||
config.log
|
||||
config.status
|
||||
include/sysconf.h
|
||||
modules/enc_argon2.cpp
|
||||
modules/enc_posix.cpp
|
||||
modules/ldap.cpp
|
||||
modules/mysql.cpp
|
||||
modules/regex_pcre2.cpp
|
||||
modules/regex_posix.cpp
|
||||
modules/regex_tre.cpp
|
||||
modules/sqlite.cpp
|
||||
modules/ssl_gnutls.cpp
|
||||
modules/ssl_openssl.cpp
|
||||
modules/stats
|
||||
modules/xmlrpc.cpp
|
||||
run/
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
(svnadmin) <svn@localhost> <svn svn@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Adam <adam@anope.org> <adam-@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Adam <adam@anope.org> <adam@adam-laptop.(none)>
|
||||
Adam <adam@anope.org> <Adam@anope.org>
|
||||
Adam <adam@anope.org> <Adam@drink-coca-cola.info>
|
||||
Adam <adam@anope.org> <Adam@sigterm.info>
|
||||
Adam Kramer <ribosome@anope.org> <ribosome ribosome@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Alvaro Toledo <atoledo@keldon.org> <atoledo atoledo@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Attila Molnar <attilamolnar@hush.com>
|
||||
Björn Stiddien <keeper@anope.org> <keeper keeper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Charles Kingsley <chaz@anope.org>
|
||||
Charles Kingsley <chaz@anope.org> <sjaz@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Cronus <cronus@nite-serv.com>
|
||||
Daniel Engel <dane@zero.org> <dane dane@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
David Robson <rob@anope.org> <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
David Robson <rob@anope.org> <robbeh@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Dennis Friis <peavey@inspircd.org> <peavey peavey@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Dragone2 <dragone2@risposteinformatiche.it> <davide.paolini8@gmail.com>
|
||||
Fabio Scotoni <cculex@gmail.com>
|
||||
Filippo Cortigiani <simos@simosnap.org> <devel@devel.crtnet.it>
|
||||
Filippo Cortigiani <simos@simosnap.org> <simos@H7-25.fritz.box>
|
||||
Florian Schulze <certus@anope.org> <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Gabriel Acevedo H. <drstein@anope.org> <drstein drstein@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Harakiri <harakiri@overstack.fr>
|
||||
Hendrik Jäger <gitcommit@henk.geekmail.org> <github@henk.geekmail.org>
|
||||
Jan Milants <viper@anope.org>
|
||||
Jan Milants <viper@anope.org> <jantje_85@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Jan Milants <viper@anope.org> <viper viper@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Jens Voss <dukepyrolator@anope.org> <anope@s15355730.onlinehome-server.info>
|
||||
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Jens Voss <dukepyrolator@anope.org> <DukePyrolator@anope.org>
|
||||
Jens Voss <dukepyrolator@anope.org> <jens@pyrobook.(none)>
|
||||
k4be <k4be@pirc.pl> <34816207+k4bek4be@users.noreply.github.com>
|
||||
Lee Holmes <lethality@anope.org>
|
||||
Lee Holmes <lethality@anope.org> <lee@lethality.me.uk>
|
||||
Mark Summers <mark@goopler.net> <mark mark@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Matt Schatz <genius3000@g3k.solutions>
|
||||
Matt Ullman <matt@airraidsirens.com> <blindsight@gamesurge.net>
|
||||
Michael Hazell <michaelhazell@hotmail.com> <Techman-@users.noreply.github.com>
|
||||
Michael Stapelberg <michael@robustirc.net> <stapelberg@users.noreply.github.com>
|
||||
Michael Wobst <wobst.michael@web.de>
|
||||
Michael Wobst <wobst.michael@web.de> <michael@static.163.129.251.148.clients.your-server.de>
|
||||
Michael Wobst <wobst.michael@web.de> <michael@wobst.at>
|
||||
Naram Qashat <cyberbotx@anope.org> <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Naram Qashat <cyberbotx@anope.org> <cyberbotx@cyberbotx.com>
|
||||
Naram Qashat <cyberbotx@anope.org> <Naram Qashat cyberbotx@cyberbotx.com@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
PeGaSuS <droider.pc@gmail.com>
|
||||
PeGaSuS <droider.pc@gmail.com> <25697531+TehPeGaSuS@users.noreply.github.com>
|
||||
Pieter Bootsma <geniusdex@anope.org> <geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Robby <robby@chatbelgie.be> <robby@anope.org>
|
||||
Robby <robby@chatbelgie.be> <robby@chat.be>
|
||||
Robert Scheck <robert@fedoraproject.org> <robert-scheck@users.noreply.github.com>
|
||||
Robin Burchell <w00t@inspircd.org> <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Robin Burchell <w00t@inspircd.org> <Robin Burchell w00t@inspircd.org@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Sadie Powell <sadie@witchery.services> <petpow@saberuk.com>
|
||||
Sebastian Barfurth <github@afreshmelon.com>
|
||||
Sebastian V. <hal9000@denorastats.org>
|
||||
Sebastian V. <hal9000@denorastats.org> <pimpmylinux@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Trystan S. Lee <trystan@nomadirc.net> <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>
|
||||
Val Lorentz <progval+git@progval.net> <progval+git@progval.net>
|
||||
-501
@@ -1,501 +0,0 @@
|
||||
###############################################################################
|
||||
# strip_string(<input string> <output string>)
|
||||
#
|
||||
# A macro to handle stripping the leading and trailing spaces from a string,
|
||||
# uses string(STRIP) if using CMake 2.6.x or better, otherwise uses
|
||||
# string(REGEX REPLACE).
|
||||
###############################################################################
|
||||
macro(strip_string INPUT_STRING OUTPUT_STRING)
|
||||
if(CMAKE26_OR_BETTER)
|
||||
# For CMake 2.6.x or better, we can just use the STRIP sub-command of string()
|
||||
string(STRIP ${INPUT_STRING} ${OUTPUT_STRING})
|
||||
else(CMAKE26_OR_BETTER)
|
||||
# For CMake 2.4.x, we will have to use the REGEX REPLACE sub-command of string() instead
|
||||
# First check if the input string is empty or not
|
||||
if (${INPUT_STRING} STREQUAL "")
|
||||
set(${OUTPUT_STRING} "")
|
||||
else(${INPUT_STRING} STREQUAL "")
|
||||
# Determine if the string is entirely empty or not
|
||||
string(REGEX MATCH "^[ \t]*$" EMPTY_STRING "${INPUT_STRING}")
|
||||
if(EMPTY_STRING)
|
||||
set(${OUTPUT_STRING} "")
|
||||
else(EMPTY_STRING)
|
||||
# We detect if there is any leading whitespace and remove any if there is
|
||||
string(SUBSTRING "${INPUT_STRING}" 0 1 FIRST_CHAR)
|
||||
if(FIRST_CHAR STREQUAL " " OR FIRST_CHAR STREQUAL "\t")
|
||||
string(REGEX REPLACE "^[ \t]+" "" TEMP_STRING "${INPUT_STRING}")
|
||||
else(FIRST_CHAR STREQUAL " " OR FIRST_CHAR STREQUAL "\t")
|
||||
set(TEMP_STRING "${INPUT_STRING}")
|
||||
endif(FIRST_CHAR STREQUAL " " OR FIRST_CHAR STREQUAL "\t")
|
||||
# Next we detect if there is any trailing whitespace and remove any if there is
|
||||
string(LENGTH "${TEMP_STRING}" STRING_LEN)
|
||||
math(EXPR STRING_LEN "${STRING_LEN} - 1")
|
||||
string(SUBSTRING "${TEMP_STRING}" ${STRING_LEN} 1 LAST_CHAR)
|
||||
if(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
|
||||
string(REGEX REPLACE "[ \t]+$" "" ${OUTPUT_STRING} "${TEMP_STRING}")
|
||||
else(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
|
||||
set(${OUTPUT_STRING} "${TEMP_STRING}")
|
||||
endif(LAST_CHAR STREQUAL " " OR LAST_CHAR STREQUAL "\t")
|
||||
endif(EMPTY_STRING)
|
||||
endif(${INPUT_STRING} STREQUAL "")
|
||||
endif(CMAKE26_OR_BETTER)
|
||||
endmacro(strip_string)
|
||||
|
||||
###############################################################################
|
||||
# append_to_list(<list> <args>...)
|
||||
#
|
||||
# A macro to handle appending to lists, uses list(APPEND) if using CMake 2.4.2
|
||||
# or better, otherwise uses set() instead.
|
||||
###############################################################################
|
||||
macro(append_to_list LIST)
|
||||
if(CMAKE242_OR_BETTER)
|
||||
# For CMake 2.4.2 or better, we can just use the APPEND sub-command of list()
|
||||
list(APPEND ${LIST} ${ARGN})
|
||||
else(CMAKE242_OR_BETTER)
|
||||
# For CMake 2.4.x before 2.4.2, we have to do this manually use set() instead
|
||||
set(${LIST} ${${LIST}} ${ARGN})
|
||||
endif(CMAKE242_OR_BETTER)
|
||||
endmacro(append_to_list)
|
||||
|
||||
###############################################################################
|
||||
# find_in_list(<list> <value> <output variable>)
|
||||
#
|
||||
# A macro to handle searching within a list, will store the result in the
|
||||
# given <output variable>, uses list(FIND) if using CMake 2.6.x or better
|
||||
# (or CMake 2.4.8 or better), otherwise it iterates through the list to find
|
||||
# the item.
|
||||
###############################################################################
|
||||
macro(find_in_list LIST ITEM_TO_FIND FOUND)
|
||||
if(CMAKE248_OR_BETTER)
|
||||
# For CMake 2.4.8 or better, we can use the FIND sub-command of list()
|
||||
list(FIND ${LIST} ${ITEM_TO_FIND} ITEM_FOUND)
|
||||
else(CMAKE248_OR_BETTER)
|
||||
# For CMake 2.4.x before 2.4.8, we have to do this ourselves (NOTE: This is very slow due to a lack of break() as well)
|
||||
# Firstly we set the position to -1 indicating nothing found, we also use a temporary position
|
||||
set(ITEM_FOUND -1)
|
||||
set(POS 0)
|
||||
# Iterate through the list
|
||||
foreach(ITEM ${${LIST}})
|
||||
# If the item we are looking at is the item we are trying to find, set that we've found the item
|
||||
if(${ITEM} STREQUAL ${ITEM_TO_FIND})
|
||||
set(ITEM_FOUND ${POS})
|
||||
endif(${ITEM} STREQUAL ${ITEM_TO_FIND})
|
||||
# Increase the position value by 1
|
||||
math(EXPR POS "${POS} + 1")
|
||||
endforeach(ITEM)
|
||||
endif(CMAKE248_OR_BETTER)
|
||||
# Set the given FOUND variable to the result
|
||||
set(${FOUND} ${ITEM_FOUND})
|
||||
endmacro(find_in_list)
|
||||
|
||||
###############################################################################
|
||||
# remove_list_duplicates(<list>)
|
||||
#
|
||||
# A macro to handle removing duplicates from a list, uses
|
||||
# list(REMOVE_DUPLICATES) if using CMake 2.6.x or better, otherwise it uses
|
||||
# a slower method of creating a temporary list and only adding to it when
|
||||
# a duplicate item hasn't been found.
|
||||
###############################################################################
|
||||
macro(remove_list_duplicates LIST)
|
||||
if(CMAKE26_OR_BETTER)
|
||||
# For CMake 2.6.x or better, this can be done automatically
|
||||
list(REMOVE_DUPLICATES ${LIST})
|
||||
else(CMAKE26_OR_BETTER)
|
||||
# For CMake 2.4.x, we have to do this ourselves, firstly we'll clear a temporary list
|
||||
set(NEW_LIST)
|
||||
# Iterate through the old list
|
||||
foreach(ITEM ${${LIST}})
|
||||
# Check if the item is in the new list
|
||||
find_in_list(NEW_LIST ${ITEM} FOUND_ITEM)
|
||||
if(FOUND_ITEM EQUAL -1)
|
||||
# If the item was not found, append it to the list
|
||||
append_to_list(NEW_LIST ${ITEM})
|
||||
endif(FOUND_ITEM EQUAL -1)
|
||||
endforeach(ITEM)
|
||||
# Replace the old list with the new list
|
||||
set(${LIST} ${NEW_LIST})
|
||||
endif(CMAKE26_OR_BETTER)
|
||||
endmacro(remove_list_duplicates)
|
||||
|
||||
###############################################################################
|
||||
# remove_item_from_list(<list> <value>)
|
||||
#
|
||||
# A macro to handle removing a value from a list, uses list(REMOVE_ITEM) in
|
||||
# both cases, but can remove the value itself using CMake 2.4.2 or better,
|
||||
# while older versions use a slower method of iterating the list to find the
|
||||
# index of the value to remove.
|
||||
###############################################################################
|
||||
macro(remove_item_from_list LIST VALUE)
|
||||
if(CMAKE242_OR_BETTER)
|
||||
# For CMake 2.4.2 or better, this can be done automatically
|
||||
list(REMOVE_ITEM ${LIST} ${VALUE})
|
||||
else(CMAKE242_OR_BETTER)
|
||||
# For CMake 2.4.x before 2.4.2, we have to do this ourselves, firstly we set the index and a variable to indicate if the item was found
|
||||
set(INDEX 0)
|
||||
set(FOUND FALSE)
|
||||
# Iterate through the old list
|
||||
foreach(ITEM ${${LIST}})
|
||||
# If the item hasn't been found yet, but the current item is the same, remove it
|
||||
if(NOT FOUND)
|
||||
if(ITEM STREQUAL ${VALUE})
|
||||
set(FOUND TRUE)
|
||||
list(REMOVE_ITEM ${LIST} ${INDEX})
|
||||
endif(ITEM STREQUAL ${VALUE})
|
||||
endif(NOT FOUND)
|
||||
# Increase the index value by 1
|
||||
math(EXPR INDEX "${INDEX} + 1")
|
||||
endforeach(ITEM)
|
||||
endif(CMAKE242_OR_BETTER)
|
||||
endmacro(remove_item_from_list)
|
||||
|
||||
###############################################################################
|
||||
# sort_list(<list>)
|
||||
#
|
||||
# A macro to handle sorting a list, uses list(SORT) if using CMake 2.4.4 or
|
||||
# better, otherwise it uses a slower method of creating a temporary list and
|
||||
# adding elements in alphabetical order.
|
||||
###############################################################################
|
||||
macro(sort_list LIST)
|
||||
if(CMAKE244_OR_BETTER)
|
||||
# For CMake 2.4.4 or better, this can be done automatically
|
||||
list(SORT ${LIST})
|
||||
else(CMAKE244_OR_BETTER)
|
||||
# For CMake 2.4.x before 2.4.4, we have to do this ourselves, firstly we'll create a teporary list
|
||||
set(NEW_LIST)
|
||||
# Iterate through the old list
|
||||
foreach(ITEM ${${LIST}})
|
||||
# Temporary index position for the new list, as well as temporary value to store if the item was ever found
|
||||
set(INDEX 0)
|
||||
set(FOUND FALSE)
|
||||
# Iterate through the new list
|
||||
foreach(NEW_ITEM ${NEW_LIST})
|
||||
# Compare the items, only if nothing was found before
|
||||
if(NOT FOUND)
|
||||
if(NEW_ITEM STRGREATER "${ITEM}")
|
||||
set(FOUND TRUE)
|
||||
list(INSERT NEW_LIST ${INDEX} ${ITEM})
|
||||
endif(NEW_ITEM STRGREATER "${ITEM}")
|
||||
endif(NOT FOUND)
|
||||
# Increase the index value by 1
|
||||
math(EXPR INDEX "${INDEX} + 1")
|
||||
endforeach(NEW_ITEM)
|
||||
# If the item was never found, just append it to the end
|
||||
if(NOT FOUND)
|
||||
append_to_list(NEW_LIST ${ITEM})
|
||||
endif(NOT FOUND)
|
||||
endforeach(ITEM)
|
||||
# Replace the old list with the new list
|
||||
set(${LIST} ${NEW_LIST})
|
||||
endif(CMAKE244_OR_BETTER)
|
||||
endmacro(sort_list)
|
||||
|
||||
###############################################################################
|
||||
# read_from_file(<filename> <regex> <output variable>)
|
||||
#
|
||||
# A macro to handle reading specific lines from a file, uses file(STRINGS) if
|
||||
# using CMake 2.6.x or better, otherwise we read in the entire file and
|
||||
# perform a string(REGEX MATCH) on each line of the file instead. This
|
||||
# macro can also be used to read in all the lines of a file if REGEX is set
|
||||
# to "".
|
||||
###############################################################################
|
||||
macro(read_from_file FILE REGEX STRINGS)
|
||||
if(CMAKE26_OR_BETTER)
|
||||
# For CMake 2.6.x or better, we can just use the STRINGS sub-command to get the lines that match the given regular expression (if one is given, otherwise get all lines)
|
||||
if(REGEX STREQUAL "")
|
||||
file(STRINGS ${FILE} RESULT)
|
||||
else(REGEX STREQUAL "")
|
||||
file(STRINGS ${FILE} RESULT REGEX ${REGEX})
|
||||
endif(REGEX STREQUAL "")
|
||||
else(CMAKE26_OR_BETTER)
|
||||
# For CMake 2.4.x, we need to do this manually, firstly we read the file in
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -DFILE:STRING=${FILE} -P ${Anope_SOURCE_DIR}/ReadFile.cmake ERROR_VARIABLE ALL_STRINGS)
|
||||
# Next we replace all newlines with semicolons
|
||||
string(REGEX REPLACE "\n" ";" ALL_STRINGS ${ALL_STRINGS})
|
||||
if(REGEX STREQUAL "")
|
||||
# For no regular expression, just set the result to all the lines
|
||||
set(RESULT ${ALL_STRINGS})
|
||||
else(REGEX STREQUAL "")
|
||||
# Clear the result list
|
||||
set(RESULT)
|
||||
# Iterate through all the lines of the file
|
||||
foreach(STRING ${ALL_STRINGS})
|
||||
# Check for a match against the given regular expression
|
||||
string(REGEX MATCH ${REGEX} STRING_MATCH ${STRING})
|
||||
# If we had a match, append the match to the list
|
||||
if(STRING_MATCH)
|
||||
append_to_list(RESULT ${STRING})
|
||||
endif(STRING_MATCH)
|
||||
endforeach(STRING)
|
||||
endif(REGEX STREQUAL "")
|
||||
endif(CMAKE26_OR_BETTER)
|
||||
# Set the given STRINGS variable to the result
|
||||
set(${STRINGS} ${RESULT})
|
||||
endmacro(read_from_file)
|
||||
|
||||
###############################################################################
|
||||
# extract_include_filename(<line> <output variable> [<optional output variable of quote type>])
|
||||
#
|
||||
# This macro will take a #include line and extract the filename.
|
||||
###############################################################################
|
||||
macro(extract_include_filename INCLUDE FILENAME)
|
||||
# Strip the leading and trailing spaces from the include line
|
||||
strip_string(${INCLUDE} INCLUDE_STRIPPED)
|
||||
# Make sure to only do the following if there is a string
|
||||
if(INCLUDE_STRIPPED STREQUAL "")
|
||||
set(FILE "")
|
||||
else(INCLUDE_STRIPPED STREQUAL "")
|
||||
# Extract the filename including the quotes or angle brackets
|
||||
string(REGEX REPLACE "^.*([\"<].*[\">]).*$" "\\1" FILE "${INCLUDE_STRIPPED}")
|
||||
# If an optional 3rd argument is given, we'll store if the quote style was quoted or angle bracketed
|
||||
if(${ARGC} GREATER 2)
|
||||
string(SUBSTRING ${FILE} 0 1 QUOTE)
|
||||
if(QUOTE STREQUAL "<")
|
||||
set(${ARGV2} "angle brackets")
|
||||
else(QUOTE STREQUAL "<")
|
||||
set(${ARGV2} "quotes")
|
||||
endif(QUOTE STREQUAL "<")
|
||||
endif(${ARGC} GREATER 2)
|
||||
# Now remove the quotes or angle brackets
|
||||
string(REGEX REPLACE "^[\"<](.*)[\">]$" "\\1" FILE "${FILE}")
|
||||
endif(INCLUDE_STRIPPED STREQUAL "")
|
||||
# Set the filename to the the given variable
|
||||
set(${FILENAME} "${FILE}")
|
||||
endmacro(extract_include_filename)
|
||||
|
||||
###############################################################################
|
||||
# find_includes(<source filename> <output variable>)
|
||||
#
|
||||
# This macro will search through a file for #include lines, regardless of
|
||||
# whitespace, but only returns the lines that are valid for the current
|
||||
# platform CMake is running on.
|
||||
###############################################################################
|
||||
macro(find_includes SRC INCLUDES)
|
||||
# Read all lines from the file that start with #, regardless of whitespace before the #
|
||||
read_from_file(${SRC} "^[ \t]*#.*$" LINES)
|
||||
# Set that any #include lines found are valid, and create temporary variables for the last found #ifdef/#ifndef
|
||||
set(VALID_LINE TRUE)
|
||||
set(LAST_DEF)
|
||||
set(LAST_CHECK)
|
||||
# Create an empty include list
|
||||
set(INCLUDES_LIST)
|
||||
# Iterate through all the # lines
|
||||
foreach(LINE ${LINES})
|
||||
# Search for #ifdef, #ifndef, #else, #endif, and #include
|
||||
string(REGEX MATCH "^[ \t]*#[ \t]*ifdef[ \t]*.*$" FOUND_IFDEF ${LINE})
|
||||
string(REGEX MATCH "^[ \t]*#[ \t]*ifndef[ \t]*.*$" FOUND_IFNDEF ${LINE})
|
||||
string(REGEX MATCH "^[ \t]*#[ \t]*else.*$" FOUND_ELSE ${LINE})
|
||||
string(REGEX MATCH "^[ \t]*#[ \t]*endif.*$" FOUND_ENDIF ${LINE})
|
||||
string(REGEX MATCH "^[ \t]*#[ \t]*include[ \t]*[\"<].*[\">][\ t]*.*$" FOUND_INCLUDE ${LINE})
|
||||
# If we found a #ifdef on the line, extract the data after the #ifdef and set if the lines after it are valid based on the variables in CMake
|
||||
if(FOUND_IFDEF)
|
||||
# Extract the define
|
||||
string(REGEX REPLACE "^[ \t]*#[ \t]*ifdef[ \t]*(.*)$" "\\1" DEFINE ${LINE})
|
||||
# Replace _WIN32 with WIN32, so we can check if the WIN32 variable of CMake is set instead of _WIN32
|
||||
if(DEFINE STREQUAL "_WIN32")
|
||||
set(DEFINE WIN32)
|
||||
endif(DEFINE STREQUAL "_WIN32")
|
||||
# Set the last define to this one, and set the last check to true, so when #else is encountered, we can do an opposing check
|
||||
set(LAST_DEF ${DEFINE})
|
||||
set(LAST_CHECK TRUE)
|
||||
# If the define is true (it either exists or is a non-false result), the lines following will be checked, otherwise they will be skipped
|
||||
if(${DEFINE})
|
||||
set(VALID_LINE TRUE)
|
||||
else(${DEFINE})
|
||||
set(VALID_LINE FALSE)
|
||||
endif(${DEFINE})
|
||||
else(FOUND_IFDEF)
|
||||
# If we found a #ifndef on the line, the same thing as #ifdef is done, except with the checks in the opposite direction
|
||||
if(FOUND_IFNDEF)
|
||||
# Extract the define
|
||||
string(REGEX REPLACE "^[ \t]*#[ \t]*ifndef[ \t]*(.*)$" "\\1" DEFINE ${LINE})
|
||||
# Replace _WIN32 with WIN32, so we can check if the WIN32 variable of CMake is set instead of _WIN32
|
||||
if(DEFINE STREQUAL "_WIN32")
|
||||
set(DEFINE WIN32)
|
||||
endif(DEFINE STREQUAL "_WIN32")
|
||||
# Set the last define to this one, and set the last check to false, so when #else is encountered, we can do an opposing check
|
||||
set(LAST_DEF ${DEFINE})
|
||||
set(LAST_CHECK FALSE)
|
||||
# If the define is not true (it either doesn't exists or is a false result), the lines following will be checked, otherwise they will be skipped
|
||||
if(${DEFINE})
|
||||
set(VALID_LINE FALSE)
|
||||
else(${DEFINE})
|
||||
set(VALUE_LINE TRUE)
|
||||
endif(${DEFINE})
|
||||
else(FOUND_IFNDEF)
|
||||
# If we found a #else on the line, we check the last define in the opposite direction
|
||||
if(FOUND_ELSE)
|
||||
# When LAST_CHECK is true, we were inside a #ifdef, now act as if we are entering a #ifndef section by doing an opposing check
|
||||
if(LAST_CHECK)
|
||||
if(${LAST_DEF})
|
||||
set(VALID_LINE FALSE)
|
||||
else(${LAST_DEF})
|
||||
set(VALID_LINE TRUE)
|
||||
endif(${LAST_DEF})
|
||||
# When LAST_CHECK is false, we were inside a #ifndef, now act as if we are entering a #ifdef section by doing an opposing check
|
||||
else(LAST_CHECK)
|
||||
if(${LAST_DEF})
|
||||
set(VALID_LINE TRUE)
|
||||
else(${LAST_DEF})
|
||||
set(VALID_LINE FALSE)
|
||||
endif(${LAST_DEF})
|
||||
endif(LAST_CHECK)
|
||||
else(FOUND_ELSE)
|
||||
# If we found a #endif on the line, we'll assume everything following the line is valid until we meet another one of the above lines
|
||||
if(FOUND_ENDIF)
|
||||
set(VALID_LINE TRUE)
|
||||
else(FOUND_ENDIF)
|
||||
# If we found a #include on the line, add the entire line to the list of includes unless the line isn't valid
|
||||
if(FOUND_INCLUDE)
|
||||
if(VALID_LINE)
|
||||
append_to_list(INCLUDES_LIST "${LINE}")
|
||||
endif(VALID_LINE)
|
||||
endif(FOUND_INCLUDE)
|
||||
endif(FOUND_ENDIF)
|
||||
endif(FOUND_ELSE)
|
||||
endif(FOUND_IFNDEF)
|
||||
endif(FOUND_IFDEF)
|
||||
endforeach(LINE)
|
||||
set(${INCLUDES} ${INCLUDES_LIST})
|
||||
endmacro(find_includes)
|
||||
|
||||
###############################################################################
|
||||
# calculate_depends(<source filename> [<optional output variable for includes>])
|
||||
#
|
||||
# This macro is used in most of the src (sub)directories to calculate the
|
||||
# header file dependencies for the given source file.
|
||||
###############################################################################
|
||||
macro(calculate_depends SRC)
|
||||
# Temporarily set that we didn't get a 2nd argument before we actually check if we did get one or not
|
||||
set(CHECK_ANGLE_INCLUDES FALSE)
|
||||
# Check for a second argument
|
||||
if(${ARGC} GREATER 1)
|
||||
set(CHECK_ANGLE_INCLUDES TRUE)
|
||||
endif(${ARGC} GREATER 1)
|
||||
# Find all the lines in the given source file that have any form of #include on them, regardless of whitespace, but only if they are valid for the platform we are on
|
||||
find_includes(${SRC} INCLUDES)
|
||||
# Reset the list of headers to empty
|
||||
set(HEADERS)
|
||||
# Iterate through the strings containing #include (if any)
|
||||
foreach(INCLUDE ${INCLUDES})
|
||||
# Extract the filename from the #include line
|
||||
extract_include_filename(${INCLUDE} FILENAME QUOTE_TYPE)
|
||||
if(QUOTE_TYPE STREQUAL "angle brackets")
|
||||
# The following checks will only be done if there was a request for angle includes to be checked
|
||||
if(CHECK_ANGLE_INCLUDES)
|
||||
# Find the path of the include file
|
||||
if(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
|
||||
find_path(FOUND_${FILENAME}_INCLUDE NAMES ${FILENAME} PATHS ${DEFAULT_INCLUDE_DIRS} ${WSDK_PATH}/include $ENV{VCINSTALLDIR}/include)
|
||||
else(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
|
||||
find_path(FOUND_${FILENAME}_INCLUDE NAMES ${FILENAME})
|
||||
endif(DEFAULT_INCLUDE_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
|
||||
# If the include file was found, add it's path to the list of include paths, but only if it doesn't already exist and isn't in the defaults for the compiler
|
||||
if(FOUND_${FILENAME}_INCLUDE)
|
||||
find_in_list(DEFAULT_INCLUDE_DIRS "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_DEFAULTS)
|
||||
if(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
find_in_list(${ARGV1} "${FOUND_${FILENAME}_INCLUDE}" FOUND_IN_INCLUDES)
|
||||
if(FOUND_IN_INCLUDES EQUAL -1)
|
||||
append_to_list(${ARGV1} "${FOUND_${FILENAME}_INCLUDE}")
|
||||
endif(FOUND_IN_INCLUDES EQUAL -1)
|
||||
endif(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
else(FOUND_${FILENAME}_INCLUDE)
|
||||
message(FATAL_ERROR "${SRC} needs header file ${FILENAME} but we were unable to locate that header file! Check that the header file is within the search path of your OS.")
|
||||
endif(FOUND_${FILENAME}_INCLUDE)
|
||||
endif(CHECK_ANGLE_INCLUDES)
|
||||
endif(QUOTE_TYPE STREQUAL "angle brackets")
|
||||
endforeach(INCLUDE)
|
||||
endmacro(calculate_depends)
|
||||
|
||||
###############################################################################
|
||||
# calculate_libraries(<source filename> <output variable for linker flags> <output variable for extra depends>)
|
||||
#
|
||||
# This macro is used in most of the src (sub)directories to calculate the
|
||||
# library dependencies for the given source file.
|
||||
###############################################################################
|
||||
macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
# Set up a temporary LDFLAGS for this file
|
||||
set(THIS_LDFLAGS "${LDFLAGS}")
|
||||
# Reset extra dependencies
|
||||
set(EXTRA_DEPENDENCIES)
|
||||
# Reset library paths
|
||||
set(LIBRARY_PATHS)
|
||||
# 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)
|
||||
# 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})
|
||||
# Replace all commas with semicolons
|
||||
string(REGEX REPLACE "," ";" REQUIRED_LIBRARY ${REQUIRED_LIBRARY})
|
||||
# Iterate through the libraries given
|
||||
foreach(LIBRARY ${REQUIRED_LIBRARY})
|
||||
# Locate the library to see if it exists
|
||||
if(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} PATHS ${DEFAULT_LIBRARY_DIRS} ${WSDK_PATH}/lib $ENV{VCINSTALLDIR}/lib)
|
||||
else(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY})
|
||||
endif(DEFAULT_LIBRARY_DIRS OR WSDK_PATH OR DEFINED $ENV{VCINSTALLDIR})
|
||||
# If the library was found, we will add it to the linker flags
|
||||
if(FOUND_${LIBRARY}_LIBRARY)
|
||||
# Get the path only of the library, to add it to linker flags
|
||||
get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH)
|
||||
if(MSVC)
|
||||
# For Visual Studio, instead of editing the linker flags, we'll add the library to a separate list of extra dependencies
|
||||
append_to_list(EXTRA_DEPENDENCIES "${FOUND_${LIBRARY}_LIBRARY}")
|
||||
else(MSVC)
|
||||
# For all others, add the library paths and libraries
|
||||
append_to_list(LIBRARY_PATHS "${LIBRARY_PATH}")
|
||||
append_to_list(LIBRARIES "${LIBRARY}")
|
||||
endif(MSVC)
|
||||
else(FOUND_${LIBRARY}_LIBRARY)
|
||||
# In the case of the library not being found, we fatally error so CMake stops trying to generate
|
||||
message(FATAL_ERROR "${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.")
|
||||
endif(FOUND_${LIBRARY}_LIBRARY)
|
||||
endforeach(LIBRARY)
|
||||
endforeach(REQUIRED_LIBRARY)
|
||||
# Remove duplicates from the library paths
|
||||
if(LIBRARY_PATHS)
|
||||
remove_list_duplicates(LIBRARY_PATHS)
|
||||
endif(LIBRARY_PATHS)
|
||||
# Remove diplicates from the libraries
|
||||
if(LIBRARIES)
|
||||
remove_list_duplicates(LIBRARIES)
|
||||
endif(LIBRARIES)
|
||||
# Iterate through library paths and add them to the linker flags
|
||||
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
|
||||
find_in_list(DEFAULT_LIBRARY_DIRS "${LIBRARY_PATH}" FOUND_IN_DEFAULTS)
|
||||
if(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
|
||||
endif(FOUND_IN_DEFAULTS EQUAL -1)
|
||||
endforeach(LIBRARY_PATH)
|
||||
# Iterate through libraries and add them to the linker flags
|
||||
foreach(LIBRARY ${LIBRARIES})
|
||||
set(THIS_LDFLAGS "${THIS_LDFLAGS} -l${LIBRARY}")
|
||||
endforeach(LIBRARY)
|
||||
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
|
||||
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
|
||||
endmacro(calculate_libraries)
|
||||
|
||||
###############################################################################
|
||||
# add_to_cpack_ignored_files(<item> [TRUE])
|
||||
#
|
||||
# A macro to update the environment variable CPACK_IGNORED_FILES which
|
||||
# contains a list of files for CPack to ignore. If the optional 2nd argument
|
||||
# of TRUE is given, periods will be converted to \\. for CPack.
|
||||
###############################################################################
|
||||
macro(add_to_cpack_ignored_files ITEM)
|
||||
# Temporary copy of the orignal item
|
||||
set(REAL_ITEM "${ITEM}")
|
||||
# If we have 2+ arguments, assume that the second one was something like TRUE (doesn't matter really) and convert periods so they will be \\. for CPack
|
||||
if(${ARGC} GREATER 1)
|
||||
string(REPLACE "." "\\\\." REAL_ITEM ${REAL_ITEM})
|
||||
endif(${ARGC} GREATER 1)
|
||||
# If the environment variable is already defined, just tack the item to the end
|
||||
if(DEFINED ENV{CPACK_IGNORED_FILES})
|
||||
set(ENV{CPACK_IGNORED_FILES} "$ENV{CPACK_IGNORED_FILES};${REAL_ITEM}")
|
||||
# Otherwise set the environment variable to the item
|
||||
else(DEFINED ENV{CPACK_IGNORED_FILES})
|
||||
set(ENV{CPACK_IGNORED_FILES} "${REAL_ITEM}")
|
||||
endif(DEFINED ENV{CPACK_IGNORED_FILES})
|
||||
endmacro(add_to_cpack_ignored_files)
|
||||
+209
-285
@@ -1,74 +1,12 @@
|
||||
# This usage of CMake requires at least version 2.4 (checks are made to determine what to use when certain versions lack functions)
|
||||
cmake_minimum_required(VERSION 2.4 FATAL_ERROR)
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
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)
|
||||
if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32)
|
||||
message(FATAL_ERROR "You can not use CMake to build Anope from the root of it's source tree! Remove the CMakeCache.txt file from this directory, then create a separate directory (either below this directory or elsewhere), and then re-run CMake from there.")
|
||||
endif(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR} AND NOT WIN32)
|
||||
# This usage of CMake requires at least version 3.20
|
||||
cmake_minimum_required(VERSION 3.20 FATAL_ERROR)
|
||||
|
||||
# Set the project as C++ primarily, but have C enabled for the checks required later
|
||||
project(Anope CXX)
|
||||
enable_language(C)
|
||||
|
||||
# Detect the version of CMake for the later conditional checks
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} --version OUTPUT_VARIABLE VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REGEX REPLACE "cmake version 2\\.(.*)" "\\1" ONLY_VERSION "${VERSION}")
|
||||
string(REGEX MATCH "-patch .*$" HAS_PATCH "${ONLY_VERSION}")
|
||||
if(HAS_PATCH)
|
||||
string(REGEX REPLACE "(.*)-patch .*" "\\1" MINOR_VERSION "${ONLY_VERSION}")
|
||||
string(REGEX REPLACE ".*-patch (.*)" "\\1" PATCH_VERSION "${ONLY_VERSION}")
|
||||
else(HAS_PATCH)
|
||||
string(REGEX MATCH "\\." HAS_DOT "${ONLY_VERSION}")
|
||||
if(HAS_DOT)
|
||||
string(REGEX REPLACE "(.*)\\..*" "\\1" MINOR_VERSION "${ONLY_VERSION}")
|
||||
string(REGEX REPLACE ".*\\.(.*)" "\\1" PATCH_VERSION "${ONLY_VERSION}")
|
||||
else(HAS_DOT)
|
||||
string(REGEX REPLACE "(.*)-beta" "\\1" MINOR_VERSION "${ONLY_VERSION}")
|
||||
if(MINOR_VERSION STREQUAL "4-1\n")
|
||||
set(PATCH_VERSION 1)
|
||||
else(MINOR_VERSION STREQUAL "4-1\n")
|
||||
set(PATCH_VERSION 0)
|
||||
endif(MINOR_VERSION STREQUAL "4-1\n")
|
||||
set(MINOR_VERSION 4)
|
||||
endif(HAS_DOT)
|
||||
endif(HAS_PATCH)
|
||||
|
||||
# Detect is we are using CMake 2.6 or better, these versions include functions that require less work than CMake 2.4 does
|
||||
if(MINOR_VERSION GREATER 5)
|
||||
set(CMAKE26_OR_BETTER TRUE)
|
||||
set(CMAKE248_OR_BETTER TRUE)
|
||||
set(CMAKE244_OR_BETTER TRUE)
|
||||
set(CMAKE242_OR_BETTER TRUE)
|
||||
else(MINOR_VERSION GREATER 5)
|
||||
set(CMAKE26_OR_BETTER FALSE)
|
||||
# Also detect if we are using CMake 2.4.8 or better, the FIND sub-command of list() is non-existant in earlier versions
|
||||
if(PATCH_VERSION GREATER 7)
|
||||
set(CMAKE248_OR_BETTER TRUE)
|
||||
set(CMAKE244_OR_BETTER TRUE)
|
||||
set(CMAKE242_OR_BETTER TRUE)
|
||||
else(PATCH_VERSION GREATER 7)
|
||||
set(CMAKE248_OR_BETTER FALSE)
|
||||
# Also detect if we are using CMake 2.4.4 or better, the CheckCXXCompilerFlag module and SORT sub-command of list() are non-existant in earlier versions
|
||||
if(PATCH_VERSION GREATER 3)
|
||||
set(CMAKE244_OR_BETTER TRUE)
|
||||
set(CMAKE242_OR_BETTER TRUE)
|
||||
else(PATCH_VERSION GREATER 3)
|
||||
set(CMAKE244_OR_BETTER FALSE)
|
||||
# ALSO detect if we are using CMake 2.4.2 or better, the APPEND sub-command of list() is non-existant in earlier versions
|
||||
if(PATCH_VERSION GREATER 1)
|
||||
set(CMAKE242_OR_BETTER TRUE)
|
||||
else(PATCH_VERSION GREATER 1)
|
||||
set(CMAKE242_OR_BETTER FALSE)
|
||||
endif(PATCH_VERSION GREATER 1)
|
||||
endif(PATCH_VERSION GREATER 3)
|
||||
endif(PATCH_VERSION GREATER 7)
|
||||
endif(MINOR_VERSION GREATER 5)
|
||||
|
||||
# Override the module include path to include our directory, for our Anope.cmake, as well as we are using our own version of the NSIS template
|
||||
set(CMAKE_MODULE_PATH ${Anope_SOURCE_DIR})
|
||||
set(CMAKE_MODULE_PATH ${Anope_SOURCE_DIR}/cmake)
|
||||
|
||||
include(Anope)
|
||||
|
||||
@@ -79,18 +17,22 @@ set(ENV{LC_ALL} C)
|
||||
set(DEFAULT_LIBRARY_DIRS)
|
||||
set(DEFAULT_INCLUDE_DIRS)
|
||||
|
||||
# We require C++17 to build
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Put modules in their own folder
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# If we are using a GNU compiler (have to use CXX because it seems to fail on C), we will be able to determine it's default paths for libraries and includes
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "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: "
|
||||
string(REGEX REPLACE ".*\nlibraries: (.*)$" "\\1" LINE "${LINES}")
|
||||
# Replace the colons in the list with semicolons (only when not on MinGW, which uses semicolons already), and if on MinGW, just copy the line
|
||||
if(NOT MINGW)
|
||||
string(REGEX REPLACE ":" ";" LIBRARIES ${LINE})
|
||||
else(NOT MINGW)
|
||||
set(LIBRARIES "${LINE}")
|
||||
endif(NOT MINGW)
|
||||
# Replace the colons in the list with semicolons
|
||||
string(REGEX REPLACE ":" ";" LIBRARIES ${LINE})
|
||||
# Iterate through the libraries
|
||||
foreach(LIBRARY ${LIBRARIES})
|
||||
# Check if the first character is an equal sign, and skip that library directory as it is (I believe) the primary default and shows up later in the list anyways
|
||||
@@ -98,16 +40,20 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
if(NOT FIRST_CHAR STREQUAL "=")
|
||||
# If the directory had no = in front of it, make sure it's absolute and add it to the list of default library directories
|
||||
get_filename_component(LIBRARY ${LIBRARY} ABSOLUTE)
|
||||
append_to_list(DEFAULT_LIBRARY_DIRS ${LIBRARY})
|
||||
endif(NOT FIRST_CHAR STREQUAL "=")
|
||||
endforeach(LIBRARY)
|
||||
list(APPEND DEFAULT_LIBRARY_DIRS ${LIBRARY})
|
||||
endif()
|
||||
endforeach()
|
||||
# Remove duplicate entries from the list
|
||||
if(DEFAULT_LIBRARY_DIRS)
|
||||
remove_list_duplicates(DEFAULT_LIBRARY_DIRS)
|
||||
endif(DEFAULT_LIBRARY_DIRS)
|
||||
list(REMOVE_DUPLICATES DEFAULT_LIBRARY_DIRS)
|
||||
endif()
|
||||
# Create a temporary file to test for the default include directories
|
||||
FILE(WRITE empty.cpp "")
|
||||
# Next, we look for the compiler's default include directories
|
||||
# Run the command to find the default include directories
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -v -x c++ -E ${CMAKE_CURRENT_SOURCE_DIR}/empty.c ERROR_VARIABLE LINES OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${CMAKE_C_COMPILER} -v -x c++ -E ${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp ERROR_VARIABLE LINES OUTPUT_QUIET ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
# Remove the empty file, it is no longer needed
|
||||
FILE(REMOVE empty.cpp)
|
||||
# Convert the new lines to semicolons
|
||||
string(REGEX REPLACE "\n" ";" LINES ${LINES})
|
||||
# Temporary variable saying if we are in the search list or not
|
||||
@@ -117,61 +63,32 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
# If the line has the following on it, the next lines will contain directory names
|
||||
if(LINE STREQUAL "#include <...> search starts here:")
|
||||
set(IN_SEARCH TRUE)
|
||||
else(LINE STREQUAL "#include <...> search starts here:")
|
||||
else()
|
||||
# If the line has the following on it, we hit the end of the list
|
||||
if(LINE STREQUAL "End of search list.")
|
||||
set(IN_SEARCH FALSE)
|
||||
else(LINE STREQUAL "End of search list.")
|
||||
else()
|
||||
# If we are within the block between the above two lines...
|
||||
if(IN_SEARCH)
|
||||
# Get everything but the first character of the line
|
||||
string(LENGTH ${LINE} LINE_LENGTH)
|
||||
math(EXPR LINE_LENGTH "${LINE_LENGTH} - 1")
|
||||
string(SUBSTRING ${LINE} 1 ${LINE_LENGTH} INCLUDE)
|
||||
# For systems like Mac OS X, look for include paths that say " (framework directory)" at the end of them and strip that off
|
||||
string(REGEX REPLACE " \\(framework directory\\)$" "" INCLUDE ${INCLUDE})
|
||||
# Convert the path to an absolute one, just in case it wasn't
|
||||
get_filename_component(INCLUDE ${INCLUDE} ABSOLUTE)
|
||||
# Add that directory to the list of default include directories
|
||||
append_to_list(DEFAULT_INCLUDE_DIRS ${INCLUDE})
|
||||
endif(IN_SEARCH)
|
||||
endif(LINE STREQUAL "End of search list.")
|
||||
endif(LINE STREQUAL "#include <...> search starts here:")
|
||||
endforeach(LINE)
|
||||
list(APPEND DEFAULT_INCLUDE_DIRS ${INCLUDE})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
# Remove duplicate entries from the list
|
||||
if(DEFAULT_INCLUDE_DIRS)
|
||||
remove_list_duplicates(DEFAULT_INCLUDE_DIRS)
|
||||
endif(DEFAULT_INCLUDE_DIRS)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
# 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)
|
||||
# If the path comes up as "/registry" from any of these, the path wasn't found, otherwise, we'll set WSDK_PATH to the corresponding path
|
||||
# Look for the 2008 SDK under HKLM first
|
||||
get_filename_component(WSDK2008_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE CACHE)
|
||||
if(WSDK2008_PATH STREQUAL "/registry")
|
||||
# If not found, look for the 2003 SDK under HKLM
|
||||
get_filename_component(WSDK2003_PATH "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir]" ABSOLUTE CACHE)
|
||||
if(WSDK2003_PATH STREQUAL "/registry")
|
||||
# If not found, look for the 2008 SDK under HKCU
|
||||
get_filename_component(WSDK2008_PATH "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows;CurrentInstallFolder]" ABSOLUTE CACHE)
|
||||
if(WSDK2008_PATH STREQUAL "/registry")
|
||||
# If not found, look for the 2003 SDK under HKCU
|
||||
get_filename_component(WSDK2003_PATH "[HKEY_CURRENT_USER\\SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1;Install Dir]" ABSOLUTE CACHE)
|
||||
if(WSDK2003_PATH STREQUAL "/regsitry")
|
||||
# The SDK was never found, set the path to nothing
|
||||
set(WSDK_PATH "")
|
||||
else(WSDK2003_PATH STREQUAL "/regsitry")
|
||||
set(WSDK_PATH "${WSDK2003_PATH}")
|
||||
endif(WSDK2003_PATH STREQUAL "/regsitry")
|
||||
else(WSDK2008_PATH STREQUAL "/registry")
|
||||
set(WSDK_PATH "${WSDK2008_PATH}")
|
||||
endif(WSDK2008_PATH STREQUAL "/registry")
|
||||
else(WSDK2003_PATH STREQUAL "/registry")
|
||||
set(WSDK_PATH "${WSDK2003_PATH}")
|
||||
endif(WSDK2003_PATH STREQUAL "/registry")
|
||||
else(WSDK2008_PATH STREQUAL "/registry")
|
||||
set(WSDK_PATH "${WSDK2008_PATH}")
|
||||
endif(WSDK2008_PATH STREQUAL "/registry")
|
||||
endif(MSVC)
|
||||
list(REMOVE_DUPLICATES DEFAULT_INCLUDE_DIRS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If the user specifies -DCMAKE_BUILD_TYPE on the command line, take their definition
|
||||
# and dump it in the cache along with proper documentation, otherwise set CMAKE_BUILD_TYPE
|
||||
@@ -180,39 +97,55 @@ endif(MSVC)
|
||||
if(NOT MSVC)
|
||||
if(CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE} CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
|
||||
else(CMAKE_BUILD_TYPE)
|
||||
else()
|
||||
set(CMAKE_BUILD_TYPE DEBUG CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
|
||||
endif(CMAKE_BUILD_TYPE)
|
||||
endif(NOT MSVC)
|
||||
|
||||
# If running under MinGW, we have to force the resource compiler settings (hopefully this will be fixed in a later version of CMake)
|
||||
if(MINGW)
|
||||
set(CMAKE_RC_COMPILER_INIT windres)
|
||||
enable_language(RC)
|
||||
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>")
|
||||
endif(MINGW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Include the checking functions used later in this CMakeLists.txt
|
||||
include(CheckFunctionExists)
|
||||
include(CheckIncludeFile)
|
||||
include(CheckTypeSize)
|
||||
include(CheckLibraryExists)
|
||||
if(CMAKE244_OR_BETTER)
|
||||
include(CheckCXXCompilerFlag)
|
||||
else(CMAKE244_OR_BETTER)
|
||||
include(TestCXXAcceptsFlag)
|
||||
endif(CMAKE244_OR_BETTER)
|
||||
include(CheckCXXCompilerFlag)
|
||||
|
||||
# Add an optional variable for using run-cc.pl for building, Perl will be checked later regardless of this setting
|
||||
option(USE_RUN_CC_PL "Use run-cc.pl for building" OFF)
|
||||
# If extra include directories were specified, tell cmake about them.
|
||||
if(EXTRA_INCLUDE)
|
||||
include_directories(${EXTRA_INCLUDE})
|
||||
endif()
|
||||
|
||||
# If extra library directories were specified, tell cmake about them.
|
||||
if(EXTRA_LIBS)
|
||||
link_directories(${EXTRA_LIBS})
|
||||
endif()
|
||||
|
||||
# setup conan
|
||||
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/conanbuildinfo.cmake")
|
||||
conan_basic_setup()
|
||||
endif()
|
||||
|
||||
# Find gettext
|
||||
find_package(Gettext)
|
||||
find_package(Intl)
|
||||
if(GETTEXT_FOUND AND Intl_FOUND)
|
||||
set(HAVE_LOCALIZATION ON)
|
||||
include_directories(${Intl_INCLUDE_DIRS})
|
||||
else()
|
||||
message("Unable to find gettext and libintl; disabling localization")
|
||||
set(HAVE_LOCALIZATION OFF)
|
||||
endif()
|
||||
|
||||
# Use the following directories as includes
|
||||
include_directories(${Anope_SOURCE_DIR}/include ${Anope_BINARY_DIR}/include ${Anope_BINARY_DIR}/lang)
|
||||
include_directories(
|
||||
${Anope_BINARY_DIR}/include
|
||||
${Anope_SOURCE_DIR}/include
|
||||
${Anope_SOURCE_DIR}/vendor
|
||||
)
|
||||
|
||||
# If using Windows, always add the _WIN32 define
|
||||
if(WIN32)
|
||||
add_definitions(-D_WIN32)
|
||||
endif(WIN32)
|
||||
# If using Windows, include the windows specific folder for anope_windows.h
|
||||
include_directories(${Anope_SOURCE_DIR}/src/win32)
|
||||
endif()
|
||||
|
||||
# If using Visual Studio, set the C++ flags accordingly
|
||||
if(MSVC)
|
||||
@@ -221,155 +154,138 @@ if(MSVC)
|
||||
string(REPLACE "/GX " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
string(REPLACE "/W3 " "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
|
||||
# Set the compile flags to have warnings on the max setting (but disable a few annoying ones), exception handling turned on, the proper defines
|
||||
set(CXXFLAGS "${CXXFLAGS} /W4 /wd4100 /wd4251 /wd4706 /wd4800 /wd4996 /EHs")
|
||||
add_definitions(-DMSVCPP -D_CRT_SECURE_NO_WARNINGS)
|
||||
set(CXXFLAGS "${CXXFLAGS} /W4 /wd4100 /wd4127 /wd4250 /wd4251 /wd4267 /wd4275 /wd4355 /wd4706 /wd4800 /wd4996 /EHs")
|
||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||
# Otherwise, we're not using Visual Studio
|
||||
else(MSVC)
|
||||
else()
|
||||
# Set the compile flags to have all warnings on (including shadowed variables)
|
||||
set(CXXFLAGS "${CXXFLAGS} -Wall -Wshadow")
|
||||
# If on a *nix system, also set the compile flags to remove GNU extensions (favor ISO C++) as well as reject non-ISO C++ code, also remove all leading underscores in exported symbols
|
||||
if(UNIX)
|
||||
set(CXXFLAGS "${CXXFLAGS} -ansi -pedantic -fno-leading-underscore")
|
||||
# Set the module-specific compile flags to the same setting as the compile flags
|
||||
set(MODULE_CXXFLAGS "${CXXFLAGS}")
|
||||
# If we aren't on a *nix system, we are using MinGW
|
||||
else(UNIX)
|
||||
# Also, if we are building under MinGW, add another define for MinGW
|
||||
if(MINGW)
|
||||
add_definitions(-DMINGW)
|
||||
endif(MINGW)
|
||||
endif(UNIX)
|
||||
endif(MSVC)
|
||||
set(CXXFLAGS "${CXXFLAGS} -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -Wformat=2 -Wmissing-format-attribute -Wpedantic -Wno-format-nonliteral -Wno-format-zero-length -Wno-unused-parameter ${CMAKE_CXX_FLAGS}")
|
||||
endif()
|
||||
|
||||
# If CMake has found that the given system requires a special library for dl* calls, include it with the linker flags
|
||||
if(CMAKE_DL_LIBS)
|
||||
set(LDFLAGS "${LDFLAGS} -l${CMAKE_DL_LIBS}")
|
||||
endif(CMAKE_DL_LIBS)
|
||||
list(APPEND LINK_LIBS ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
|
||||
# Under MinGW, the -shared flag isn't properly set in the module-specific linker flags, add it from the C flags for shared libraries
|
||||
if(MINGW)
|
||||
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS}")
|
||||
endif(MINGW)
|
||||
# Find the linker flags required for using threads.
|
||||
find_package("Threads" REQUIRED)
|
||||
if(CMAKE_THREAD_LIBS_INIT)
|
||||
list(APPEND LINK_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
|
||||
# Under Windows, we set the executable name for Anope to be anope
|
||||
if(WIN32)
|
||||
if(NOT PROGRAM_NAME)
|
||||
set(PROGRAM_NAME anope)
|
||||
# Under *nix, we set the executable name for Anope to be services
|
||||
else(WIN32)
|
||||
set(PROGRAM_NAME services)
|
||||
endif(WIN32)
|
||||
endif()
|
||||
|
||||
# If we are not using Visual Studio, we'll run the following checks
|
||||
if(NOT MSVC)
|
||||
# Check if the C++ compiler can accept the -pipe flag, and add it to the compile flags if it works
|
||||
if(CMAKE244_OR_BETTER)
|
||||
# If using CMake 2.4.4 or better, we can use check_cxx_compiler_flag
|
||||
check_cxx_compiler_flag(-pipe HAVE_PIPE_FLAG)
|
||||
else(CMAKE244_OR_BETTER)
|
||||
# If using CMake 2.4.3 or older, we will use check_cxx_accepts_flags instead
|
||||
check_cxx_accepts_flag(-pipe HAVE_PIPE_FLAG)
|
||||
endif(CMAKE244_OR_BETTER)
|
||||
check_cxx_compiler_flag(-pipe HAVE_PIPE_FLAG)
|
||||
# If the flag was accepted, add it to the list of flags
|
||||
if(HAVE_PIPE_FLAG)
|
||||
set(CXXFLAGS "${CXXFLAGS} -pipe")
|
||||
endif(HAVE_PIPE_FLAG)
|
||||
|
||||
# The following are additional library checks, they are not required for Windows
|
||||
if(NOT WIN32)
|
||||
# Check if socket is within the socket library (if the library exists), and add it to the linker flags if needed
|
||||
check_library_exists(socket socket "" HAVE_SOCKET_LIB)
|
||||
if(HAVE_SOCKET_LIB)
|
||||
set(LDFLAGS "${LDFLAGS} -lsocket")
|
||||
endif(HAVE_SOCKET_LIB)
|
||||
# Check if inet_addr is within the nsl library (if the library exists), and add it to the linker flags if needed
|
||||
check_library_exists(nsl inet_addr "" HAVE_NSL_LIB)
|
||||
if(HAVE_NSL_LIB)
|
||||
set(LDFLAGS "${LDFLAGS} -lnsl")
|
||||
endif(HAVE_NSL_LIB)
|
||||
endif(NOT WIN32)
|
||||
endif(NOT MSVC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# If DEFUMASK wasn't passed to CMake, set a default depending on if RUNGROUP was passed in or not
|
||||
if(NOT DEFUMASK)
|
||||
if(RUNGROUP)
|
||||
set(DEFUMASK "007")
|
||||
else(RUNGROUP)
|
||||
else()
|
||||
set(DEFUMASK "077")
|
||||
endif(RUNGROUP)
|
||||
endif(NOT DEFUMASK)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Check for the existance of the following include files
|
||||
check_include_file(sys/types.h HAVE_SYS_TYPES_H)
|
||||
check_include_file(strings.h HAVE_STRINGS_H)
|
||||
check_include_file(sys/select.h HAVE_SYS_SELECT_H)
|
||||
# Set the DEBUG_BUILD for sysconf.h
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "DEBUG" OR CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
set(DEBUG_BUILD TRUE)
|
||||
endif()
|
||||
|
||||
# Check for the existance of the following functions
|
||||
check_function_exists(gethostbyname HAVE_GETHOSTBYNAME)
|
||||
check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
|
||||
check_function_exists(setgrent HAVE_SETGRENT)
|
||||
check_function_exists(strcasecmp HAVE_STRCASECMP)
|
||||
check_function_exists(stricmp HAVE_STRICMP)
|
||||
check_function_exists(strlcat HAVE_STRLCAT)
|
||||
check_function_exists(strlcpy HAVE_STRLCPY)
|
||||
# Check for the existence of the following functions
|
||||
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
|
||||
check_function_exists(umask HAVE_UMASK)
|
||||
check_function_exists(backtrace HAVE_BACKTRACE)
|
||||
|
||||
# Check for the existance of the following types
|
||||
check_type_size(uint8_t UINT8_T)
|
||||
check_type_size(u_int8_t U_INT8_T)
|
||||
check_type_size(int16_t INT16_T)
|
||||
check_type_size(uint16_t UINT16_T)
|
||||
check_type_size(u_int16_t U_INT16_T)
|
||||
check_type_size(int32_t INT32_T)
|
||||
check_type_size(uint32_t UINT32_T)
|
||||
check_type_size(u_int32_t U_INT32_T)
|
||||
check_function_exists(epoll_wait HAVE_EPOLL)
|
||||
check_function_exists(poll HAVE_POLL)
|
||||
check_function_exists(kqueue HAVE_KQUEUE)
|
||||
|
||||
# Strip the leading and trailing spaces from the compile flags
|
||||
if(CXXFLAGS)
|
||||
strip_string(${CXXFLAGS} CXXFLAGS)
|
||||
endif(CXXFLAGS)
|
||||
string(STRIP ${CXXFLAGS} CXXFLAGS)
|
||||
endif()
|
||||
# Strip the leading and trailing spaces from the linker flags
|
||||
if(LDFLAGS)
|
||||
strip_string(${LDFLAGS} LDFLAGS)
|
||||
endif(LDFLAGS)
|
||||
string(STRIP ${LDFLAGS} LDFLAGS)
|
||||
endif()
|
||||
|
||||
# Search for the following programs
|
||||
find_program(GREP grep)
|
||||
find_program(SH sh)
|
||||
find_program(CHGRP chgrp)
|
||||
find_program(CHMOD chmod)
|
||||
find_program(PERL perl)
|
||||
if(NOT WIN32 AND RUNGROUP)
|
||||
find_program(CHGRP "chgrp" REQUIRED)
|
||||
find_program(CHMOD "chmod" REQUIRED)
|
||||
endif()
|
||||
|
||||
# If perl is included on the system and the user wants to use run-cc.pl, change the commands for compiling and linking
|
||||
if(PERL AND USE_RUN_CC_PL)
|
||||
set(CMAKE_CXX_COMPILE_OBJECT "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_COMPILE_OBJECT}")
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_LINK_EXECUTABLE}")
|
||||
set(CMAKE_CXX_CREATE_SHARED_MODULE "${PERL} ${Anope_SOURCE_DIR}/run-cc.pl -q ${CMAKE_CXX_CREATE_SHARED_MODULE}")
|
||||
endif(PERL AND USE_RUN_CC_PL)
|
||||
|
||||
# If a INSTDIR was passed in to CMake, use it as the install prefix, otherwise set the default install prefix to the services directory under the user's home directory
|
||||
# If a INSTDIR was passed in to CMake, use it as the install prefix, otherwise set the default install prefix to the anope directory under the user's home directory
|
||||
if(INSTDIR)
|
||||
set(CMAKE_INSTALL_PREFIX "${INSTDIR}")
|
||||
else(INSTDIR)
|
||||
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/services")
|
||||
endif(INSTDIR)
|
||||
elseif(NOT CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/anope")
|
||||
endif()
|
||||
|
||||
# Set default paths for various directories if not already defined
|
||||
if(NOT BIN_DIR)
|
||||
set(BIN_DIR "bin")
|
||||
endif()
|
||||
if(NOT DATA_DIR)
|
||||
set(DATA_DIR "data")
|
||||
endif()
|
||||
if(NOT DOC_DIR)
|
||||
set(DOC_DIR "doc")
|
||||
endif()
|
||||
if(NOT CONF_DIR)
|
||||
set(CONF_DIR "conf")
|
||||
endif()
|
||||
if(NOT MODULE_DIR)
|
||||
set(MODULE_DIR "modules")
|
||||
endif()
|
||||
if(NOT LOCALE_DIR)
|
||||
set(LOCALE_DIR "locale")
|
||||
endif()
|
||||
if(NOT LOG_DIR)
|
||||
set(LOG_DIR "logs")
|
||||
endif()
|
||||
|
||||
# Version number processing
|
||||
# Find all lines in version.log that start with VERSION_
|
||||
read_from_file(${Anope_SOURCE_DIR}/version.log "^VERSION_" VERSIONS)
|
||||
# Find all lines in src/version.sh that start with VERSION_
|
||||
file(STRINGS ${Anope_SOURCE_DIR}/src/version.sh VERSIONS REGEX "^VERSION_")
|
||||
# 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})
|
||||
endforeach(VERSION_STR ${VERSIONS})
|
||||
string(REGEX REPLACE "^VERSION_([A-Z]+)=\"?([^\"]*)\"?$" "\\1;\\2" VERSION_OUT ${VERSION_STR})
|
||||
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()
|
||||
endforeach()
|
||||
|
||||
# Default build version to 0
|
||||
set(VERSION_BUILD 0)
|
||||
|
||||
# Only change the build number if version.h exists
|
||||
if(EXISTS "${Anope_SOURCE_DIR}/include/version.h")
|
||||
# Attempt to read the build number from include/version.h
|
||||
file(STRINGS ${Anope_SOURCE_DIR}/src/version.sh VERSIONS REGEX "^#define VERSION_BUILD")
|
||||
foreach(VERSION_STR ${VERSIONS})
|
||||
# Get the length of the string
|
||||
string(LENGTH ${VERSION_STR} VERSION_LEN)
|
||||
# Subtract 22 from the string's length
|
||||
math(EXPR VERSION_NUM_LEN "${VERSION_LEN} - 22")
|
||||
# Extract the value from the string
|
||||
string(SUBSTRING ${VERSION_STR} 22 ${VERSION_NUM_LEN} VERSION)
|
||||
# Set VERSION_BUILD correctly
|
||||
set(VERSION_BUILD ${VERSION})
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# Set the version variables based on what was found above
|
||||
set(VERSION_COMMA "${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_BUILD}")
|
||||
@@ -381,11 +297,11 @@ set(VERSION_FULL_NOBUILD "${VERSION_DOTTED_NOBUILD}${VERSION_EXTRA}")
|
||||
# Only do the following for Windows
|
||||
if(WIN32)
|
||||
# Generate the win32.rc file using the above variables
|
||||
configure_file(${Anope_SOURCE_DIR}/src/win32.rc.cmake ${Anope_BINARY_DIR}/src/win32.rc)
|
||||
endif(WIN32)
|
||||
configure_file(${Anope_SOURCE_DIR}/src/win32/win32.rc.cmake ${Anope_BINARY_DIR}/src/win32/win32.rc)
|
||||
endif()
|
||||
|
||||
# Add the initial files to ignore which will be ignored regardless of if you are building in-source or out-of-source
|
||||
add_to_cpack_ignored_files(".git\;config.cache\;.svn\;CMakeFiles\;sysconf.h$\;Makefile.inc$\;config.log\;config.status\;build\;autom4te.cache" TRUE)
|
||||
add_to_cpack_ignored_files(".git\;config.cache\;CMakeFiles\;sysconf.h$\;build" TRUE)
|
||||
# Add the files we don't want the periods converted for
|
||||
add_to_cpack_ignored_files(".\\\\\\\\.so$;.\\\\\\\\.o$;.\\\\\\\\.s$;${Anope_SOURCE_DIR}/Makefile$")
|
||||
# If the two directories are the same, we are building in-source, thus we need to ignore more files from the build
|
||||
@@ -397,40 +313,36 @@ if(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
|
||||
# If using Visual Studio, add these files as well
|
||||
if(MSVC)
|
||||
add_to_cpack_ignored_files(".vcproj$\;.sln$\;.ncb$\;.suo$\;.dir$\;.ilk$\;.exp$\;.pdb$\;.lib$\;/debug$;/release$;/relwithdebinfo$;/minsizerel$" TRUE)
|
||||
endif(MSVC)
|
||||
endif(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
|
||||
|
||||
# Go into the following directories and run their CMakeLists.txt as well
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(docs)
|
||||
add_subdirectory(lang)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(include)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Get the filename of the Anope binary, to use later
|
||||
get_target_property(SERVICES_BINARY ${PROGRAM_NAME} LOCATION)
|
||||
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
|
||||
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
|
||||
|
||||
# At install time, create the following additional directories
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/data/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/data/logs\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\${CMAKE_INSTALL_PREFIX}/data/modules/runtime\")")
|
||||
get_filename_component(ABSOLUTE_DATA_DIR ${DATA_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
get_filename_component(ABSOLUTE_LOG_DIR ${LOG_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
|
||||
if(WIN32)
|
||||
install(CODE "file(MAKE_DIRECTORY \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/runtime\")")
|
||||
endif()
|
||||
# On non-Windows platforms, if RUNGROUP is set, change the permissions of the below directories, as well as the group of the data directory
|
||||
if(NOT WIN32 AND RUNGROUP)
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/data/backups\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/data/logs\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\${CMAKE_INSTALL_PREFIX}/data/modules/runtime\")")
|
||||
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\${CMAKE_INSTALL_PREFIX}\")")
|
||||
endif(NOT WIN32 AND RUNGROUP)
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}${ABSOLUTE_DATA_DIR}/backups\")")
|
||||
install(CODE "execute_process(COMMAND ${CHMOD} 2775 \"\$ENV{DESTDIR}${ABSOLUTE_LOG_DIR}\")")
|
||||
install(CODE "execute_process(COMMAND ${CHGRP} -R ${RUNGROUP} \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\")")
|
||||
endif()
|
||||
# On Windows platforms, install extra files
|
||||
if(WIN32)
|
||||
install(FILES ${Anope_SOURCE_DIR}/anope.bat
|
||||
DESTINATION bin
|
||||
install(FILES ${Anope_SOURCE_DIR}/src/win32/anope.bat
|
||||
DESTINATION ${BIN_DIR}
|
||||
)
|
||||
install(FILES ${Anope_SOURCE_DIR}/docs/Changes ${Anope_SOURCE_DIR}/docs/Changes.conf ${Anope_SOURCE_DIR}/docs/Changes.lang
|
||||
DESTINATION .
|
||||
)
|
||||
endif(WIN32)
|
||||
endif()
|
||||
|
||||
get_filename_component(ABSOLUTE_MODULE_DIR ${MODULE_DIR} REALPATH BASE_DIR ${CMAKE_INSTALL_PREFIX})
|
||||
install(CODE "file(REMOVE_RECURSE \"$ENV{DESTDIR}${ABSOLUTE_MODULE_DIR}\")")
|
||||
|
||||
# Only process the CPack section if we have CPack
|
||||
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
@@ -446,6 +358,10 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
#set(CPACK_RESOURCE_FILE_README "${Anope_SOURCE_DIR}/docs/README")
|
||||
# The following is primarily for NSIS
|
||||
if(WIN32)
|
||||
# By default, do not warn when built on machines using only VS Express:
|
||||
IF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS ON)
|
||||
ENDIF(NOT DEFINED CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS)
|
||||
# Also for Windows, include installing the MSVCRT library
|
||||
include(InstallRequiredSystemLibraries)
|
||||
set(CPACK_GENERATOR "NSIS")
|
||||
@@ -456,19 +372,27 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
"bin\\\\anope.bat\\\" \\\"-debug -nofork" "Anope IRC Services (Debug and Window Logging)"
|
||||
"bin\\\\anope.bat\\\" \\\"-nofork" "Anope IRC Services (Window Logging)"
|
||||
"bin\\\\anope.bat\\\" \\\"-nothird" "Anope IRC Services (No Third Party Modules)"
|
||||
"http://www.anope.org/" "Anope Web Site"
|
||||
"https://www.anope.org/" "Anope Web Site"
|
||||
)
|
||||
# The following doesn't work, but a bug report has been filed about it
|
||||
#set(CPACK_CREATE_DESKTOP_LINK_${SERVICES_BINARY} TRUE)
|
||||
set(CPACK_NSIS_MUI_ICON "${Anope_SOURCE_DIR}/src\\\\anope-icon.ico")
|
||||
set(CPACK_NSIS_MUI_UNIICON "${Anope_SOURCE_DIR}/src\\\\anope-icon.ico")
|
||||
set(CPACK_NSIS_MUI_ICON "${Anope_SOURCE_DIR}/src\\\\win32\\\\anope-icon.ico")
|
||||
set(CPACK_NSIS_MUI_UNIICON "${Anope_SOURCE_DIR}/src\\\\win32\\\\anope-icon.ico")
|
||||
set(CPACK_NSIS_INSTALLED_ICON_NAME "${SERVICES_BINARY}")
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "http://www.anope.org/")
|
||||
set(CPACK_NSIS_URL_INFO_ABOUT "https://www.anope.org/")
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
endif(WIN32)
|
||||
endif()
|
||||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "anope-${VERSION_FULL_NOBUILD}-source")
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
set(CPACK_SOURCE_IGNORE_FILES "$ENV{CPACK_IGNORED_FILES}")
|
||||
set(CPACK_MONOLITHIC_INSTALL TRUE)
|
||||
include(CPack)
|
||||
endif(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
endif()
|
||||
|
||||
# Go into the following directories and run their CMakeLists.txt as well
|
||||
add_subdirectory(data)
|
||||
add_subdirectory(docs)
|
||||
add_subdirectory(language)
|
||||
add_subdirectory(src)
|
||||
add_subdirectory(modules)
|
||||
add_subdirectory(include)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Configuration script for Services.
|
||||
# Configuration script for Anope.
|
||||
#
|
||||
# Anope (c) 2003-2010 Anope team
|
||||
# Anope (C) 2003-2025 Anope Team
|
||||
# Contact us at team@anope.org
|
||||
#
|
||||
# This program is free but copyrighted software; see the file COPYING for
|
||||
@@ -13,10 +13,6 @@
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
echo2 () {
|
||||
$ECHO2 "$*$ECHO2SUF" # these are defined later
|
||||
}
|
||||
|
||||
exists () { # because some shells don't have test -e
|
||||
if [ -f $1 -o -d $1 -o -p $1 -o -c $1 -o -b $1 ] ; then
|
||||
return 0
|
||||
@@ -40,128 +36,67 @@ Run_Build_System () {
|
||||
WITH_INST=""
|
||||
WITH_RUN=""
|
||||
WITH_PERM=""
|
||||
BUILD_TYPE=""
|
||||
RUN_CC_PL=""
|
||||
GEN_TYPE=""
|
||||
EXTRA_INCLUDE=""
|
||||
EXTRA_LIBS=""
|
||||
|
||||
if [ "$INSTDIR" != "" ] ; then
|
||||
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
|
||||
WITH_INST="-DINSTDIR:STRING=$INSTDIR"
|
||||
else
|
||||
WITH_INST="--with-instdir=$INSTDIR"
|
||||
fi
|
||||
WITH_INST="-DINSTDIR:STRING=$INSTDIR"
|
||||
fi
|
||||
|
||||
if [ "$RUNGROUP" != "" ] ; then
|
||||
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
|
||||
WITH_RUN="-DRUNGROUP:STRING=$RUNGROUP"
|
||||
else
|
||||
WITH_RUN="--with-rungroup=$RUNGROUP"
|
||||
fi
|
||||
WITH_RUN="-DRUNGROUP:STRING=$RUNGROUP"
|
||||
fi
|
||||
|
||||
if [ "$UMASK" != "" ] ; then
|
||||
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
|
||||
WITH_PERM="-DDEFUMASK:STRING=$UMASK"
|
||||
else
|
||||
WITH_PERM="--with-permissions=$UMASK"
|
||||
fi
|
||||
WITH_PERM="-DDEFUMASK:STRING=$UMASK"
|
||||
fi
|
||||
|
||||
if [ "$DEBUG" = "yes" ] ; then
|
||||
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=DEBUG"
|
||||
else
|
||||
BUILD_TYPE="--with-debugsym"
|
||||
fi
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=DEBUG"
|
||||
else
|
||||
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=RELEASE"
|
||||
fi
|
||||
BUILD_TYPE="-DCMAKE_BUILD_TYPE:STRING=RELEASE"
|
||||
fi
|
||||
|
||||
if [ "$USE_RUN_CC_PL" = "yes" ] ; then
|
||||
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
|
||||
RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=ON"
|
||||
else
|
||||
pwdsave=`pwd`
|
||||
cd "`dirname $SOURCE_DIR/run-cc.pl`"
|
||||
RUN_CC_PL="--with-makebin=`pwd`/run-cc.pl"
|
||||
cd "$pwdsave"
|
||||
fi
|
||||
else
|
||||
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
|
||||
RUN_CC_PL="-DUSE_RUN_CC_PL:BOOLEAN=OFF"
|
||||
else
|
||||
RUN_CC_PL="--with-makebin="
|
||||
fi
|
||||
if [ "$EXTRA_INCLUDE_DIRS" != "" ] ; then
|
||||
EXTRA_INCLUDE="-DEXTRA_INCLUDE:STRING=$EXTRA_INCLUDE_DIRS"
|
||||
fi
|
||||
|
||||
if [ "$BUILD_SYSTEM" = "cmake" ] ; then
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
GEN_TYPE="-G\"MSYS Makefiles\""
|
||||
;;
|
||||
esac
|
||||
if [ "$EXTRA_LIB_DIRS" != "" ] ; then
|
||||
EXTRA_LIBS="-DEXTRA_LIBS:STRING=$EXTRA_LIB_DIRS"
|
||||
fi
|
||||
|
||||
if [ "$SOURCE_DIR" = "." ] ; then
|
||||
pwdsave=`pwd`
|
||||
test -d build || mkdir build
|
||||
cd "build"
|
||||
REAL_SOURCE_DIR=".."
|
||||
else
|
||||
REAL_SOURCE_DIR="$SOURCE_DIR"
|
||||
fi
|
||||
BUILD_PATHS="-B ${SOURCE_DIR}/build ${SOURCE_DIR}"
|
||||
|
||||
echo "cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR"
|
||||
CMAKE="cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $EXTRA_INCLUDE $EXTRA_LIBS $EXTRA_CONFIG_ARGS $BUILD_PATHS"
|
||||
echo $CMAKE
|
||||
$CMAKE
|
||||
|
||||
cmake $GEN_TYPE $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $RUN_CC_PL $EXTRA_CONFIG_ARGS $REAL_SOURCE_DIR
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "You should fix these issues and then run ./Config -quick to rerun CMake."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
if [ "$SOURCE_DIR" = "." ] ; then
|
||||
echo "Now cd build, then run make to build Anope."
|
||||
cd "$pwdsave"
|
||||
else
|
||||
echo "Now run make to build Anope."
|
||||
fi
|
||||
echo ""
|
||||
if [ "$PWD" = "${SOURCE_DIR}/build" ]; then
|
||||
echo "Now run make to build Anope."
|
||||
else
|
||||
echo "./configure $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $EXTRA_CONFIG_ARGS $RUN_CC_PL"
|
||||
|
||||
./configure $WITH_INST $WITH_RUN $WITH_PERM $BUILD_TYPE $EXTRA_CONFIG_ARGS $RUN_CC_PL
|
||||
echo "Now cd build, then run make to build Anope."
|
||||
fi
|
||||
}
|
||||
|
||||
ECHO2SUF=''
|
||||
if [ "`echo -n a ; echo -n b`" = "ab" ] ; then
|
||||
ECHO2='echo -n'
|
||||
elif [ "`echo 'a\c' ; echo 'b\c'`" = "ab" ] ; then
|
||||
ECHO2='echo' ; ECHO2SUF='\c'
|
||||
elif [ "`printf 'a' 2>&1 ; printf 'b' 2>&1`" = "ab" ] ; then
|
||||
ECHO2='printf "%s"'
|
||||
else
|
||||
# oh well...
|
||||
ECHO2='echo'
|
||||
fi
|
||||
export ECHO2 ECHO2SUF
|
||||
|
||||
###########################################################################
|
||||
# Init values
|
||||
###########################################################################
|
||||
|
||||
BUILD_SYSTEM="cmake"
|
||||
INSTDIR=$HOME/services
|
||||
INSTDIR=$HOME/anope
|
||||
RUNGROUP=
|
||||
UMASK=
|
||||
DEBUG="yes"
|
||||
USE_RUN_CC_PL="no"
|
||||
DEBUG="no"
|
||||
EXTRA_INCLUDE_DIRS=
|
||||
EXTRA_LIB_DIRS=
|
||||
EXTRA_CONFIG_ARGS=
|
||||
CAN_QUICK="no"
|
||||
SOURCE_DIR=`dirname $0`
|
||||
|
||||
which cmake > /dev/null
|
||||
if [ $? -ne 0 ] ; then
|
||||
BUILD_SYSTEM="configure"
|
||||
fi
|
||||
SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
###########################################################################
|
||||
# Check out the options
|
||||
@@ -176,6 +111,10 @@ while [ $# -ge 1 ] ; do
|
||||
echo "-nointro Skip intro (disclaimer, etc)"
|
||||
echo "-quick Skip questions, go straight to cmake"
|
||||
exit 0
|
||||
elif [ $1 = "-devel" ] ; then
|
||||
DEBUG="yes"
|
||||
DEVEL="yes"
|
||||
INSTDIR="$SOURCE_DIR/run"
|
||||
elif [ $1 = "-nocache" ] ; then
|
||||
IGNORE_CACHE="1"
|
||||
elif [ $1 = "-nointro" ] ; then
|
||||
@@ -193,26 +132,30 @@ while [ $# -ge 1 ] ; do
|
||||
shift 1
|
||||
done
|
||||
|
||||
###########################################################################
|
||||
# Check for CMake and (optionally) install it
|
||||
###########################################################################
|
||||
|
||||
cmake --version 2>&1 > /dev/null
|
||||
if [ $? -ne 0 ] ; then
|
||||
clear
|
||||
echo "Anope requires CMake 3.20 or newer, which can be downloaded at https://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
|
||||
|
||||
###########################################################################
|
||||
|
||||
if [ ! "$NO_INTRO" ] ; then
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
PAGER=less
|
||||
;;
|
||||
*)
|
||||
PAGER=more
|
||||
clear
|
||||
;;
|
||||
esac
|
||||
. $SOURCE_DIR/version.log
|
||||
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | $PAGER
|
||||
export MORE='-e'
|
||||
. $SOURCE_DIR/src/version.sh
|
||||
cat $SOURCE_DIR/.BANNER | sed "s/CURVER/$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH$VERSION_EXTRA/" | sed "s@SOURCE_DIR@$SOURCE_DIR@" | more
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "Beginning Services configuration."
|
||||
echo "Beginning Anope configuration."
|
||||
echo ""
|
||||
|
||||
###########################################################################
|
||||
@@ -229,40 +172,37 @@ export ok INPUT
|
||||
|
||||
####
|
||||
|
||||
ok=0
|
||||
echo "Note: press Return for the default, or enter a new value."
|
||||
echo "Are you using configure or cmake?"
|
||||
while [ $ok -eq 0 ] ; do
|
||||
echo2 "[$BUILD_SYSTEM] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$BUILD_SYSTEM
|
||||
TEMP_YN="n"
|
||||
if [ "$DEVEL" = "yes" ] ; then
|
||||
TEMP_YN="y"
|
||||
fi
|
||||
echo "You are building the 2.1 development branch. This branch is not as well tested"
|
||||
echo "as the 2.0 stable branch and may have compatibility breaks without notice. Are"
|
||||
echo "you sure you want to use this version?"
|
||||
echo -n "[$TEMP_YN] "
|
||||
read YN
|
||||
if [ "$YN" ] ; then
|
||||
if [ "$YN" = "y" ] ; then
|
||||
DEVEL="yes"
|
||||
else
|
||||
DEVEL="no"
|
||||
fi
|
||||
case $INPUT in
|
||||
cmake)
|
||||
ok=1
|
||||
;;
|
||||
configure)
|
||||
ok=1
|
||||
;;
|
||||
*)
|
||||
echo "That is not a valid choice!"
|
||||
ok=0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
BUILD_SYSTEM=$INPUT
|
||||
fi
|
||||
echo ""
|
||||
|
||||
if [ "$SOURCE_DIR" != "." -a "$BUILD_SYSTEM" = "configure" ] ; then
|
||||
echo "You can not use configure unless you are in the same folder as Config!"
|
||||
exit 0
|
||||
if [ "$DEVEL" != "yes" ] ; then
|
||||
echo "If you are building from Git you can run \`git checkout 2.0\` to get the latest"
|
||||
echo "stable code. Otherwise, you can download the latest 2.0 release tarball from"
|
||||
echo "https://github.com/anope/anope/releases/latest"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
####
|
||||
|
||||
ok=0
|
||||
echo "In what directory do you want the binaries to be installed?"
|
||||
echo "In what directory should Anope be installed?"
|
||||
while [ $ok -eq 0 ] ; do
|
||||
echo2 "[$INSTDIR] "
|
||||
echo -n "[$INSTDIR] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$INSTDIR
|
||||
@@ -272,7 +212,7 @@ while [ $ok -eq 0 ] ; do
|
||||
echo "$INPUT exists, but is not a directory!"
|
||||
else
|
||||
echo "$INPUT does not exist. Create it?"
|
||||
echo2 "[y] "
|
||||
echo -n "[y] "
|
||||
read YN
|
||||
if [ "$YN" != "n" ] ; then
|
||||
if mkdir -p $INPUT ; then
|
||||
@@ -281,7 +221,7 @@ while [ $ok -eq 0 ] ; do
|
||||
fi
|
||||
fi
|
||||
elif exists "$INPUT/include/services.h" ; then
|
||||
echo "You cannot use the Services source directory as a target directory."
|
||||
echo "You cannot use the Anope source directory as a target directory."
|
||||
else
|
||||
ok=1
|
||||
fi
|
||||
@@ -293,15 +233,15 @@ echo ""
|
||||
|
||||
OLD_RUNGROUP="$RUNGROUP"
|
||||
if [ "$RUNGROUP" ] ; then
|
||||
echo "Which group should all Services data files be owned by? (If Services"
|
||||
echo "Which group should all Anope data files be owned by? (If Anope"
|
||||
echo "should not force files to be owned by a particular group, type \"none\""
|
||||
echo "(without the quotes) and press Return.)"
|
||||
else
|
||||
echo "Which group should all Services data files be owned by? (If Services"
|
||||
echo "Which group should all Anope data files be owned by? (If Anope"
|
||||
echo "should not force files to be owned by a particular group, just press"
|
||||
echo "Return.)"
|
||||
fi
|
||||
echo2 "[$RUNGROUP] "
|
||||
echo -n "[$RUNGROUP] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "none" ] ; then
|
||||
@@ -326,7 +266,7 @@ ok=0
|
||||
echo "What should the default umask for data files be (in octal)?"
|
||||
echo "(077 = only accessible by owner; 007 = accessible by owner and group)"
|
||||
while [ $ok -eq 0 ] ; do
|
||||
echo2 "[$UMASK] "
|
||||
echo -n "[$UMASK] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ ! "$INPUT" ] ; then
|
||||
INPUT=$UMASK
|
||||
@@ -350,7 +290,7 @@ if [ "$DEBUG" = "yes" ] ; then
|
||||
TEMP_YN="y"
|
||||
fi
|
||||
echo "Would you like to build a debug version of Anope?"
|
||||
echo2 "[$TEMP_YN] "
|
||||
echo -n "[$TEMP_YN] "
|
||||
read YN
|
||||
if [ "$YN" ] ; then
|
||||
if [ "$YN" = "y" ] ; then
|
||||
@@ -363,37 +303,52 @@ echo ""
|
||||
|
||||
####
|
||||
|
||||
TEMP_YN="n"
|
||||
if [ "$USE_RUN_CC_PL" = "yes" ] ; then
|
||||
TEMP_YN="y"
|
||||
fi
|
||||
echo "You can optionally have the build run through run-cc.pl, which will"
|
||||
echo "cause warnings and errors (if any) to be colored yellow and red,"
|
||||
echo "respectively. This relies on Perl being installed, so if you say yes"
|
||||
echo "to this without Perl, the option will be ignored."
|
||||
echo "NOTE: If you are using MinGW, it is NOT recommended to say yes to"
|
||||
echo "this, it may fail."
|
||||
echo "Would you like to utilize run-cc.pl?"
|
||||
echo2 "[$TEMP_YN] "
|
||||
read YN
|
||||
if [ "$YN" ] ; then
|
||||
if [ "$YN" = "y" ] ; then
|
||||
USE_RUN_CC_PL="yes"
|
||||
echo "Are there any extra include directories you wish to use?"
|
||||
echo "You may only need to do this if CMake is unable to locate"
|
||||
echo "missing dependencies without hints."
|
||||
echo "Separate directories with semicolons."
|
||||
echo "If you need no extra include directories, enter NONE in all caps."
|
||||
echo -n "[$EXTRA_INCLUDE_DIRS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
EXTRA_INCLUDE_DIRS=""
|
||||
else
|
||||
USE_RUN_CC_PL="no"
|
||||
EXTRA_INCLUDE_DIRS=$INPUT
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
|
||||
####
|
||||
|
||||
echo "Are there any extra arguments you wish to pass to $BUILD_SYSTEM?"
|
||||
echo "(You may only need to do this if $BUILD_SYSTEM is unable to locate"
|
||||
echo "missing dependencies without hints)"
|
||||
echo2 "[$EXTRA_CONFIG_ARGS] "
|
||||
echo "Are there any extra library directories you wish to use?"
|
||||
echo "You may only need to do this if CMake is unable to locate"
|
||||
echo "missing dependencies without hints."
|
||||
echo "Separate directories with semicolons."
|
||||
echo "If you need no extra library directories, enter NONE in all caps."
|
||||
echo -n "[$EXTRA_LIB_DIRS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
EXTRA_CONFIG_ARGS=$INPUT
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
EXTRA_LIB_DIRS=""
|
||||
else
|
||||
EXTRA_LIB_DIRS=$INPUT
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
|
||||
####
|
||||
|
||||
echo "Are there any extra arguments you wish to pass to CMake?"
|
||||
echo "If you need no extra arguments to CMake, enter NONE in all caps."
|
||||
echo -n "[$EXTRA_CONFIG_ARGS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
EXTRA_CONFIG_ARGS=""
|
||||
else
|
||||
EXTRA_CONFIG_ARGS=$INPUT
|
||||
fi
|
||||
fi
|
||||
echo ""
|
||||
|
||||
@@ -403,15 +358,16 @@ echo ""
|
||||
# Store values
|
||||
################################################################################
|
||||
|
||||
echo2 "Saving configuration results in config.cache... "
|
||||
echo -n "Saving configuration results in config.cache... "
|
||||
|
||||
cat <<EOT >$SOURCE_DIR/config.cache
|
||||
BUILD_SYSTEM="$BUILD_SYSTEM"
|
||||
INSTDIR="$INSTDIR"
|
||||
RUNGROUP="$RUNGROUP"
|
||||
UMASK=$UMASK
|
||||
DEBUG="$DEBUG"
|
||||
USE_RUN_CC_PL="$USE_RUN_CC_PL"
|
||||
DEVEL="$DEVEL"
|
||||
EXTRA_INCLUDE_DIRS="$EXTRA_INCLUDE_DIRS"
|
||||
EXTRA_LIB_DIRS="$EXTRA_LIB_DIRS"
|
||||
EXTRA_CONFIG_ARGS="$EXTRA_CONFIG_ARGS"
|
||||
EOT
|
||||
echo "done."
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
@echo off
|
||||
cscript /nologo "%~dp0\install.js"
|
||||
pause
|
||||
BIN
Binary file not shown.
-103
@@ -1,103 +0,0 @@
|
||||
CC=g++ # probably wrong but oh well.
|
||||
INCLUDEDIR=../include
|
||||
ANOPELIBS=@ANOPELIBS@
|
||||
CFLAGS=@CFLAGS@ -Wall -ansi -pedantic -Wshadow
|
||||
PROFILE=-pg
|
||||
LDPROFILE=
|
||||
SHELL=/bin/sh
|
||||
INSTDIR=@INSTDIR@
|
||||
MAKEBIN=@MAKEBIN@
|
||||
MYSQLDIR=@MYSQLDIR@
|
||||
INSTALL=@INSTALL@
|
||||
RM=@RM@
|
||||
CP=@CP@
|
||||
TOUCH=@TOUCH@
|
||||
LDFLAGS=@LDFLAGS@
|
||||
RUNGROUP=@RUNGROUP@
|
||||
SHARED=@SHARED@
|
||||
MODULEFLAGS=@MODULEFLAGS@
|
||||
|
||||
all: language headers build core protocols tools modules
|
||||
profile: language headers profile_build profile_core profile_protocols profile_tools profile_modules
|
||||
|
||||
MAKEARGS = 'CFLAGS=${CFLAGS}' 'CC=${CC}' 'ANOPELIBS=${ANOPELIBS}' \
|
||||
'LDFLAGS=${LDFLAGS}' 'INSTDIR=${INSTDIR}' 'INSTALL=${INSTALL}' \
|
||||
'INCLUDEDIR=${INCLUDEDIR}' 'RM=${RM}' 'CP=${CP}' \
|
||||
'TOUCH=${TOUCH}' 'SHELL=${SHELL}' \
|
||||
'RUNGROUP=${RUNGROUP}' \
|
||||
'SHARED=${SHARED}' 'MODULEFLAGS=${MODULEFLAGS}' \
|
||||
'MAKEBIN=${MAKEBIN}' 'MYSQLDIR=${MYSQLDIR}'
|
||||
|
||||
build: language headers
|
||||
@${MAKE} -C src ${MAKEARGS} all
|
||||
|
||||
profile_build:
|
||||
@${MAKE} -C src ${MAKEARGS} 'CFLAGS=${CFLAGS} $(PROFILE)' 'LDFLAGS=${LDFLAGS} ${PROFILE}' all
|
||||
|
||||
modules: build
|
||||
@src/modules/configure src/modules
|
||||
@${MAKE} -C src/modules ${MAKEARGS} all
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules";
|
||||
|
||||
clean_modules:
|
||||
@${MAKE} -C src ${MAKEARGS} clean_modules
|
||||
|
||||
distclean_modules:
|
||||
@${MAKE} -C src ${MAKEARGS} distclean_modules
|
||||
|
||||
protocols: build
|
||||
@echo "*** Building protocol support";
|
||||
@src/protocol/configure src/protocol
|
||||
@${MAKE} -C src/protocol ${MAKEARGS} all
|
||||
|
||||
profile_protocols: build
|
||||
@echo "*** Building protocol support";
|
||||
@src/protocol/configure src/protocol
|
||||
@${MAKE} -C src/protocol ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all
|
||||
|
||||
core: build
|
||||
@echo "*** Building Core modules";
|
||||
@${MAKE} -C src ${MAKEARGS} core
|
||||
|
||||
profile_core: build
|
||||
@echo "*** Building Core modules";
|
||||
@${MAKE} -C src ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' core
|
||||
|
||||
tools: build
|
||||
@${MAKE} -C src/tools ${MAKEARGS} all
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules/Tools";
|
||||
|
||||
profile_tools: profile_build
|
||||
@${MAKE} -C src/tools ${MAKEARGS} 'CFLAGS=${CFLAGS} $(PROFILE)' all
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules/Tools";
|
||||
|
||||
profile_modules: profile_build
|
||||
@src/modules/configure src/modules
|
||||
@${MAKE} -C src/modules ${MAKEARGS} 'CFLAGS=${CFLAGS} ${PROFILE}' 'PROFILE=${PROFILE}' all
|
||||
@echo "*** All done, now (g)make install to install Anope/Modules";
|
||||
|
||||
language:
|
||||
@$(MAKE) -C lang ${MAKEARGS} all language.h
|
||||
|
||||
headers:
|
||||
@${MAKE} -C include ${MAKEARGS}
|
||||
|
||||
clean:
|
||||
${MAKE} -C lang ${MAKEARGS} clean
|
||||
${MAKE} -C include ${MAKEARGS} clean
|
||||
${MAKE} -C src ${MAKEARGS} clean
|
||||
${MAKE} -C src/tools ${MAKEARGS} clean
|
||||
|
||||
distclean: clean
|
||||
${MAKE} -C lang ${MAKEARGS} distclean
|
||||
${MAKE} -C include ${MAKEARGS} distclean
|
||||
${MAKE} -C src ${MAKEARGS} distclean
|
||||
${MAKE} -C src/tools ${MAKEARGS} distclean
|
||||
rm -f config.log config.status config.cache Makefile src/bin/anoperc
|
||||
|
||||
install: DUMMY
|
||||
${MAKE} -C src ${MAKEARGS} install
|
||||
${MAKE} -C src/tools ${MAKEARGS} install
|
||||
@echo "*** All done, Anope is now installed. Please read docs/INSTALL for details on what to do now.";
|
||||
|
||||
DUMMY:
|
||||
@@ -0,0 +1,46 @@
|
||||
## About
|
||||
|
||||
Anope is an open source set of IRC services. It is highly modular, with a vast number of configurable parameters, and is the most used IRC services package. There are also many modules on the [modsite](https://modules.anope.org) to add additional features. It runs on Linux, BSD, and Windows, and supports many modern IRCds, including InspIRCd, UnrealIRCd, and ircd-hybrid. For more details, credits, command line options, and contact information see [docs/README](https://github.com/anope/anope/blob/2.0/docs/README).
|
||||
|
||||
* [Website](https://anope.org)
|
||||
* [GitHub](https://github.com/anope)
|
||||
* IRC \#anope on irc.teranova.net
|
||||
|
||||
## Installation
|
||||
|
||||
### Linux/BSD
|
||||
Download the latest release off of the [releases page](https://github.com/anope/anope/releases).
|
||||
|
||||
|
||||
```
|
||||
$ ./Config
|
||||
$ cd build
|
||||
$ make
|
||||
$ make install
|
||||
```
|
||||
|
||||
Now change to the directory where you installed Anope to, e.g. `$ cd ~/anope/`
|
||||
|
||||
### Windows
|
||||
Download the latest release off of the [releases page](https://github.com/anope/anope/releases) and run the installer.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
Copy conf/anope.example.conf to conf/anope.conf
|
||||
|
||||
```
|
||||
$ cp conf/anope.example.conf conf/anope.conf
|
||||
```
|
||||
|
||||
Edit anope.conf, configuring the uplink, serverinfo, and protocol module configurations. Example link blocks for popular IRCds are included in the the example.conf documentation. The [Anope wiki](https://wiki.anope.org) is also a good source of information. Our support channel is located at #anope on [irc.teranova.net](ircs://irc.teranova.net/anope).
|
||||
|
||||
Note that the example configuration file includes other example configuration files. If you want to modify the other example configuration files, copy them (e.g. `modules.example.conf` to `modules.conf`) and modify the `include` directive in `anope.conf` to include the new file.
|
||||
|
||||
## Running
|
||||
|
||||
Run `$ ./bin/anope` to start Anope. If asked to provide logs for support, use the `--support` flag, e.g.: `$ ./bin/anope --support`
|
||||
|
||||
## Installing extra modules
|
||||
|
||||
Extra modules, which are usually modules which require extra libraries to use, such as m\_mysql, can be enabled with the `./extras` command from the source directory. Then re-run `Config`, `make` and `make install` again. Third party modules can be installed by placing them into the `modules/third` directory.
|
||||
@@ -1,5 +0,0 @@
|
||||
# This file is external to the read_from_file macro in Anope.cmake in order to
|
||||
# get around a possible memory leak in older versions of CMake.
|
||||
|
||||
file(READ "${FILE}" RESULT)
|
||||
message("${RESULT}")
|
||||
Vendored
-871
@@ -1,871 +0,0 @@
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4-p6
|
||||
|
||||
dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl This program is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
dnl PARTICULAR PURPOSE.
|
||||
|
||||
# lib-prefix.m4 serial 4 (gettext-0.14.2)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
|
||||
dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
|
||||
dnl require excessive bracketing.
|
||||
ifdef([AC_HELP_STRING],
|
||||
[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
|
||||
[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
|
||||
|
||||
dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
|
||||
dnl to access previously installed libraries. The basic assumption is that
|
||||
dnl a user will want packages to use other packages he previously installed
|
||||
dnl with the same --prefix option.
|
||||
dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
|
||||
dnl libraries, but is otherwise very convenient.
|
||||
AC_DEFUN([AC_LIB_PREFIX],
|
||||
[
|
||||
AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
|
||||
AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib-prefix],
|
||||
[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
|
||||
--without-lib-prefix don't search for libraries in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
if test $use_additional = yes; then
|
||||
dnl Potentially add $additional_includedir to $CPPFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's already present in $CPPFLAGS,
|
||||
dnl 3. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
for x in $CPPFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $CPPFLAGS.
|
||||
CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Potentially add $additional_libdir to $LDFLAGS.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's already present in $LDFLAGS,
|
||||
dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux*) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LDFLAGS.
|
||||
LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
|
||||
dnl acl_final_exec_prefix, containing the values to which $prefix and
|
||||
dnl $exec_prefix will expand at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_PREPARE_PREFIX],
|
||||
[
|
||||
dnl Unfortunately, prefix and exec_prefix get only finally determined
|
||||
dnl at the end of configure.
|
||||
if test "X$prefix" = "XNONE"; then
|
||||
acl_final_prefix="$ac_default_prefix"
|
||||
else
|
||||
acl_final_prefix="$prefix"
|
||||
fi
|
||||
if test "X$exec_prefix" = "XNONE"; then
|
||||
acl_final_exec_prefix='${prefix}'
|
||||
else
|
||||
acl_final_exec_prefix="$exec_prefix"
|
||||
fi
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
|
||||
dnl variables prefix and exec_prefix bound to the values they will have
|
||||
dnl at the end of the configure script.
|
||||
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
|
||||
[
|
||||
acl_save_prefix="$prefix"
|
||||
prefix="$acl_final_prefix"
|
||||
acl_save_exec_prefix="$exec_prefix"
|
||||
exec_prefix="$acl_final_exec_prefix"
|
||||
$1
|
||||
exec_prefix="$acl_save_exec_prefix"
|
||||
prefix="$acl_save_prefix"
|
||||
])
|
||||
|
||||
# lib-link.m4 serial 6 (gettext-0.14.3)
|
||||
dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl From Bruno Haible.
|
||||
|
||||
AC_PREREQ(2.50)
|
||||
|
||||
dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
|
||||
dnl augments the CPPFLAGS variable.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
ac_cv_lib[]Name[]_libs="$LIB[]NAME"
|
||||
ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
|
||||
ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
|
||||
])
|
||||
LIB[]NAME="$ac_cv_lib[]Name[]_libs"
|
||||
LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
|
||||
INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
|
||||
dnl results of this search when this library appears as a dependency.
|
||||
HAVE_LIB[]NAME=yes
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
|
||||
dnl searches for libname and the libraries corresponding to explicit and
|
||||
dnl implicit dependencies, together with the specified include files and
|
||||
dnl the ability to compile and link the specified testcode. If found, it
|
||||
dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
|
||||
dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
|
||||
dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
|
||||
dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
|
||||
AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
|
||||
[
|
||||
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
|
||||
AC_REQUIRE([AC_LIB_RPATH])
|
||||
define([Name],[translit([$1],[./-], [___])])
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
|
||||
dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
|
||||
dnl accordingly.
|
||||
AC_LIB_LINKFLAGS_BODY([$1], [$2])
|
||||
|
||||
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
|
||||
dnl because if the user has installed lib[]Name and not disabled its use
|
||||
dnl via --without-lib[]Name-prefix, he wants to use it.
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
|
||||
|
||||
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="$LIBS $LIB[]NAME"
|
||||
AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
|
||||
LIBS="$ac_save_LIBS"
|
||||
])
|
||||
if test "$ac_cv_lib[]Name" = yes; then
|
||||
HAVE_LIB[]NAME=yes
|
||||
AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
|
||||
AC_MSG_CHECKING([how to link with lib[]$1])
|
||||
AC_MSG_RESULT([$LIB[]NAME])
|
||||
else
|
||||
HAVE_LIB[]NAME=no
|
||||
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
|
||||
dnl $INC[]NAME either.
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
fi
|
||||
AC_SUBST([HAVE_LIB]NAME)
|
||||
AC_SUBST([LIB]NAME)
|
||||
AC_SUBST([LTLIB]NAME)
|
||||
undefine([Name])
|
||||
undefine([NAME])
|
||||
])
|
||||
|
||||
dnl Determine the platform dependent parameters needed to use rpath:
|
||||
dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
|
||||
dnl hardcode_direct, hardcode_minus_L.
|
||||
AC_DEFUN([AC_LIB_RPATH],
|
||||
[
|
||||
dnl Tell automake >= 1.10 to complain if config.rpath is missing.
|
||||
m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
|
||||
AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
|
||||
AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
|
||||
AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
|
||||
AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
|
||||
AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
|
||||
CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
|
||||
${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
|
||||
. ./conftest.sh
|
||||
rm -f ./conftest.sh
|
||||
acl_cv_rpath=done
|
||||
])
|
||||
wl="$acl_cv_wl"
|
||||
libext="$acl_cv_libext"
|
||||
shlibext="$acl_cv_shlibext"
|
||||
hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
|
||||
hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
|
||||
hardcode_direct="$acl_cv_hardcode_direct"
|
||||
hardcode_minus_L="$acl_cv_hardcode_minus_L"
|
||||
dnl Determine whether the user wants rpath handling at all.
|
||||
AC_ARG_ENABLE(rpath,
|
||||
[ --disable-rpath do not hardcode runtime library paths],
|
||||
:, enable_rpath=yes)
|
||||
])
|
||||
|
||||
dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
|
||||
dnl the libraries corresponding to explicit and implicit dependencies.
|
||||
dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
|
||||
AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
|
||||
[
|
||||
define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
|
||||
[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
|
||||
dnl By default, look in $includedir and $libdir.
|
||||
use_additional=yes
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
AC_LIB_ARG_WITH([lib$1-prefix],
|
||||
[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
|
||||
--without-lib$1-prefix don't search for lib$1 in includedir and libdir],
|
||||
[
|
||||
if test "X$withval" = "Xno"; then
|
||||
use_additional=no
|
||||
else
|
||||
if test "X$withval" = "X"; then
|
||||
AC_LIB_WITH_FINAL_PREFIX([
|
||||
eval additional_includedir=\"$includedir\"
|
||||
eval additional_libdir=\"$libdir\"
|
||||
])
|
||||
else
|
||||
additional_includedir="$withval/include"
|
||||
additional_libdir="$withval/lib"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
dnl Search the library and its dependencies in $additional_libdir and
|
||||
dnl $LDFLAGS. Using breadth-first-seach.
|
||||
LIB[]NAME=
|
||||
LTLIB[]NAME=
|
||||
INC[]NAME=
|
||||
rpathdirs=
|
||||
ltrpathdirs=
|
||||
names_already_handled=
|
||||
names_next_round='$1 $2'
|
||||
while test -n "$names_next_round"; do
|
||||
names_this_round="$names_next_round"
|
||||
names_next_round=
|
||||
for name in $names_this_round; do
|
||||
already_handled=
|
||||
for n in $names_already_handled; do
|
||||
if test "$n" = "$name"; then
|
||||
already_handled=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$already_handled"; then
|
||||
names_already_handled="$names_already_handled $name"
|
||||
dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
|
||||
dnl or AC_LIB_HAVE_LINKFLAGS call.
|
||||
uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
|
||||
eval value=\"\$HAVE_LIB$uppername\"
|
||||
if test -n "$value"; then
|
||||
if test "$value" = yes; then
|
||||
eval value=\"\$LIB$uppername\"
|
||||
test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
|
||||
eval value=\"\$LTLIB$uppername\"
|
||||
test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
|
||||
else
|
||||
dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
|
||||
dnl that this library doesn't exist. So just drop it.
|
||||
:
|
||||
fi
|
||||
else
|
||||
dnl Search the library lib$name in $additional_libdir and $LDFLAGS
|
||||
dnl and the already constructed $LIBNAME/$LTLIBNAME.
|
||||
found_dir=
|
||||
found_la=
|
||||
found_so=
|
||||
found_a=
|
||||
if test $use_additional = yes; then
|
||||
if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_so="$additional_libdir/lib$name.$shlibext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$additional_libdir/lib$name.$libext"; then
|
||||
found_dir="$additional_libdir"
|
||||
found_a="$additional_libdir/lib$name.$libext"
|
||||
if test -f "$additional_libdir/lib$name.la"; then
|
||||
found_la="$additional_libdir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "X$found_dir" = "X"; then
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
case "$x" in
|
||||
-L*)
|
||||
dir=`echo "X$x" | sed -e 's/^X-L//'`
|
||||
if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
|
||||
found_dir="$dir"
|
||||
found_so="$dir/lib$name.$shlibext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
else
|
||||
if test -f "$dir/lib$name.$libext"; then
|
||||
found_dir="$dir"
|
||||
found_a="$dir/lib$name.$libext"
|
||||
if test -f "$dir/lib$name.la"; then
|
||||
found_la="$dir/lib$name.la"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "X$found_dir" != "X"; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if test "X$found_dir" != "X"; then
|
||||
dnl Found the library.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
|
||||
if test "X$found_so" != "X"; then
|
||||
dnl Linking with a shared library. We attempt to hardcode its
|
||||
dnl directory into the executable's runpath, unless it's the
|
||||
dnl standard /usr/lib.
|
||||
if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
|
||||
dnl No hardcoding is needed.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $found_dir"
|
||||
fi
|
||||
dnl The hardcoding into $LIBNAME is system dependent.
|
||||
if test "$hardcode_direct" = yes; then
|
||||
dnl Using DIR/libNAME.so during linking hardcodes DIR into the
|
||||
dnl resulting binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
|
||||
dnl Use an explicit option to hardcode DIR into the resulting
|
||||
dnl binary.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $found_dir"
|
||||
fi
|
||||
else
|
||||
dnl Rely on "-L$found_dir".
|
||||
dnl But don't add it if it's already contained in the LDFLAGS
|
||||
dnl or the already constructed $LIBNAME
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$found_dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
|
||||
fi
|
||||
if test "$hardcode_minus_L" != no; then
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
|
||||
else
|
||||
dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
|
||||
dnl here, because this doesn't fit in flags passed to the
|
||||
dnl compiler. So give up. No hardcoding. This affects only
|
||||
dnl very old systems.
|
||||
dnl FIXME: Not sure whether we should use
|
||||
dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
|
||||
dnl here.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "X$found_a" != "X"; then
|
||||
dnl Linking with a static library.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
|
||||
else
|
||||
dnl We shouldn't come here, but anyway it's good to have a
|
||||
dnl fallback.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
|
||||
fi
|
||||
fi
|
||||
dnl Assume the include files are nearby.
|
||||
additional_includedir=
|
||||
case "$found_dir" in
|
||||
*/lib | */lib/)
|
||||
basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
|
||||
additional_includedir="$basedir/include"
|
||||
;;
|
||||
esac
|
||||
if test "X$additional_includedir" != "X"; then
|
||||
dnl Potentially add $additional_includedir to $INCNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/include,
|
||||
dnl 2. if it's /usr/local/include and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $CPPFLAGS or the already
|
||||
dnl constructed $INCNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_includedir" != "X/usr/include"; then
|
||||
haveit=
|
||||
if test "X$additional_includedir" = "X/usr/local/include"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
for x in $CPPFLAGS $INC[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-I$additional_includedir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_includedir"; then
|
||||
dnl Really add $additional_includedir to $INCNAME.
|
||||
INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Look for dependencies.
|
||||
if test -n "$found_la"; then
|
||||
dnl Read the .la file. It defines the variables
|
||||
dnl dlname, library_names, old_library, dependency_libs, current,
|
||||
dnl age, revision, installed, dlopen, dlpreopen, libdir.
|
||||
save_libdir="$libdir"
|
||||
case "$found_la" in
|
||||
*/* | *\\*) . "$found_la" ;;
|
||||
*) . "./$found_la" ;;
|
||||
esac
|
||||
libdir="$save_libdir"
|
||||
dnl We use only dependency_libs.
|
||||
for dep in $dependency_libs; do
|
||||
case "$dep" in
|
||||
-L*)
|
||||
additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
|
||||
dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
|
||||
dnl But don't add it
|
||||
dnl 1. if it's the standard /usr/lib,
|
||||
dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
|
||||
dnl 3. if it's already present in $LDFLAGS or the already
|
||||
dnl constructed $LIBNAME,
|
||||
dnl 4. if it doesn't exist as a directory.
|
||||
if test "X$additional_libdir" != "X/usr/lib"; then
|
||||
haveit=
|
||||
if test "X$additional_libdir" = "X/usr/local/lib"; then
|
||||
if test -n "$GCC"; then
|
||||
case $host_os in
|
||||
linux* | gnu* | k*bsd*-gnu) haveit=yes;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
if test -z "$haveit"; then
|
||||
haveit=
|
||||
for x in $LDFLAGS $LIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LIBNAME.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
haveit=
|
||||
for x in $LDFLAGS $LTLIB[]NAME; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X-L$additional_libdir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
if test -d "$additional_libdir"; then
|
||||
dnl Really add $additional_libdir to $LTLIBNAME.
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-R*)
|
||||
dir=`echo "X$dep" | sed -e 's/^X-R//'`
|
||||
if test "$enable_rpath" != no; then
|
||||
dnl Potentially add DIR to rpathdirs.
|
||||
dnl The rpathdirs will be appended to $LIBNAME at the end.
|
||||
haveit=
|
||||
for x in $rpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
rpathdirs="$rpathdirs $dir"
|
||||
fi
|
||||
dnl Potentially add DIR to ltrpathdirs.
|
||||
dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
|
||||
haveit=
|
||||
for x in $ltrpathdirs; do
|
||||
if test "X$x" = "X$dir"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
ltrpathdirs="$ltrpathdirs $dir"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
-l*)
|
||||
dnl Handle this in the next round.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
|
||||
;;
|
||||
*.la)
|
||||
dnl Handle this in the next round. Throw away the .la's
|
||||
dnl directory; it is already contained in a preceding -L
|
||||
dnl option.
|
||||
names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
|
||||
;;
|
||||
*)
|
||||
dnl Most likely an immediate library name.
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
else
|
||||
dnl Didn't find the library; assume it is in the system directories
|
||||
dnl known to the linker and runtime loader. (All the system
|
||||
dnl directories known to the linker should also be known to the
|
||||
dnl runtime loader, otherwise the system is severely misconfigured.)
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
done
|
||||
if test "X$rpathdirs" != "X"; then
|
||||
if test -n "$hardcode_libdir_separator"; then
|
||||
dnl Weird platform: only the last -rpath option counts, the user must
|
||||
dnl pass all path elements in one option. We can arrange that for a
|
||||
dnl single library, but not when more than one $LIBNAMEs are used.
|
||||
alldirs=
|
||||
for found_dir in $rpathdirs; do
|
||||
alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
|
||||
done
|
||||
dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$alldirs"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
else
|
||||
dnl The -rpath options are cumulative.
|
||||
for found_dir in $rpathdirs; do
|
||||
acl_save_libdir="$libdir"
|
||||
libdir="$found_dir"
|
||||
eval flag=\"$hardcode_libdir_flag_spec\"
|
||||
libdir="$acl_save_libdir"
|
||||
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if test "X$ltrpathdirs" != "X"; then
|
||||
dnl When using libtool, the option that works for both libraries and
|
||||
dnl executables is -R. The -R options are cumulative.
|
||||
for found_dir in $ltrpathdirs; do
|
||||
LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
|
||||
dnl unless already present in VAR.
|
||||
dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
|
||||
dnl contains two or three consecutive elements that belong together.
|
||||
AC_DEFUN([AC_LIB_APPENDTOVAR],
|
||||
[
|
||||
for element in [$2]; do
|
||||
haveit=
|
||||
for x in $[$1]; do
|
||||
AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
|
||||
if test "X$x" = "X$element"; then
|
||||
haveit=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test -z "$haveit"; then
|
||||
[$1]="${[$1]}${[$1]:+ }$element"
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
# lib-ld.m4 serial 3 (gettext-0.13)
|
||||
dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
dnl Subroutines of libtool.m4,
|
||||
dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
|
||||
dnl with libtool.m4.
|
||||
|
||||
dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
|
||||
AC_DEFUN([AC_LIB_PROG_LD_GNU],
|
||||
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
|
||||
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
|
||||
case `$LD -v 2>&1 </dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
acl_cv_prog_gnu_ld=yes ;;
|
||||
*)
|
||||
acl_cv_prog_gnu_ld=no ;;
|
||||
esac])
|
||||
with_gnu_ld=$acl_cv_prog_gnu_ld
|
||||
])
|
||||
|
||||
dnl From libtool-1.4. Sets the variable LD.
|
||||
AC_DEFUN([AC_LIB_PROG_LD],
|
||||
[AC_ARG_WITH(gnu-ld,
|
||||
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
|
||||
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
|
||||
AC_REQUIRE([AC_PROG_CC])dnl
|
||||
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
# Prepare PATH_SEPARATOR.
|
||||
# The user is always right.
|
||||
if test "${PATH_SEPARATOR+set}" != set; then
|
||||
echo "#! /bin/sh" >conf$$.sh
|
||||
echo "exit 0" >>conf$$.sh
|
||||
chmod +x conf$$.sh
|
||||
if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
|
||||
PATH_SEPARATOR=';'
|
||||
else
|
||||
PATH_SEPARATOR=:
|
||||
fi
|
||||
rm -f conf$$.sh
|
||||
fi
|
||||
ac_prog=ld
|
||||
if test "$GCC" = yes; then
|
||||
# Check if gcc -print-prog-name=ld gives a path.
|
||||
AC_MSG_CHECKING([for ld used by GCC])
|
||||
case $host in
|
||||
*-*-mingw*)
|
||||
# gcc leaves a trailing carriage return which upsets mingw
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
|
||||
*)
|
||||
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
|
||||
esac
|
||||
case $ac_prog in
|
||||
# Accept absolute paths.
|
||||
[[\\/]* | [A-Za-z]:[\\/]*)]
|
||||
[re_direlt='/[^/][^/]*/\.\./']
|
||||
# Canonicalize the path of ld
|
||||
ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
|
||||
while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
|
||||
ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
|
||||
done
|
||||
test -z "$LD" && LD="$ac_prog"
|
||||
;;
|
||||
"")
|
||||
# If it fails, then pretend we aren't using GCC.
|
||||
ac_prog=ld
|
||||
;;
|
||||
*)
|
||||
# If it is relative, then search for the first ld in PATH.
|
||||
with_gnu_ld=unknown
|
||||
;;
|
||||
esac
|
||||
elif test "$with_gnu_ld" = yes; then
|
||||
AC_MSG_CHECKING([for GNU ld])
|
||||
else
|
||||
AC_MSG_CHECKING([for non-GNU ld])
|
||||
fi
|
||||
AC_CACHE_VAL(acl_cv_path_LD,
|
||||
[if test -z "$LD"; then
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
|
||||
for ac_dir in $PATH; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
|
||||
acl_cv_path_LD="$ac_dir/$ac_prog"
|
||||
# Check to see if the program is GNU ld. I'd rather use --version,
|
||||
# but apparently some GNU ld's only accept -v.
|
||||
# Break only if it was the GNU/non-GNU ld that we prefer.
|
||||
case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
|
||||
*GNU* | *'with BFD'*)
|
||||
test "$with_gnu_ld" != no && break ;;
|
||||
*)
|
||||
test "$with_gnu_ld" != yes && break ;;
|
||||
esac
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
else
|
||||
acl_cv_path_LD="$LD" # Let the user override the test with a path.
|
||||
fi])
|
||||
LD="$acl_cv_path_LD"
|
||||
if test -n "$LD"; then
|
||||
AC_MSG_RESULT($LD)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
|
||||
AC_LIB_PROG_LD_GNU
|
||||
])
|
||||
|
||||
dnl Macro: anope_CHECK_TYPE_SIZES
|
||||
dnl
|
||||
dnl Check the size of several types and define a valid int16_t and int32_t.
|
||||
dnl
|
||||
AC_DEFUN(anope_CHECK_TYPE_SIZES,
|
||||
[dnl Check type sizes
|
||||
dnl AC_CHECK_SIZEOF(short)
|
||||
dnl AC_CHECK_SIZEOF(int)
|
||||
dnl AC_CHECK_SIZEOF(long)
|
||||
dnl if test "$ac_cv_sizeof_int" = 2 ; then
|
||||
dnl AC_CHECK_TYPE(int16_t, int)
|
||||
dnl AC_CHECK_TYPE(u_int16_t, unsigned int)
|
||||
dnl elif test "$ac_cv_sizeof_short" = 2 ; then
|
||||
dnl AC_CHECK_TYPE(int16_t, short)
|
||||
dnl AC_CHECK_TYPE(u_int16_t, unsigned short)
|
||||
dnl else
|
||||
dnl AC_MSG_ERROR([Cannot find a type with size of 16 bits])
|
||||
dnl fi
|
||||
dnl if test "$ac_cv_sizeof_int" = 4 ; then
|
||||
dnl AC_CHECK_TYPE(int32_t, int)
|
||||
dnl AC_CHECK_TYPE(u_int32_t, unsigned int)
|
||||
dnl elif test "$ac_cv_sizeof_short" = 4 ; then
|
||||
dnl AC_CHECK_TYPE(int32_t, short)
|
||||
dnl AC_CHECK_TYPE(u_int32_t, unsigned short)
|
||||
dnl elif test "$ac_cv_sizeof_long" = 4 ; then
|
||||
dnl AC_CHECK_TYPE(int32_t, long)
|
||||
dnl AC_CHECK_TYPE(u_int32_t, unsigned long)
|
||||
dnl else
|
||||
dnl AC_MSG_ERROR([Cannot find a type with size of 32 bits])
|
||||
dnl fi
|
||||
AC_CHECK_TYPE(uint8_t, AC_DEFINE(HAVE_UINT8_T, 1, "Has uint8_t type"))
|
||||
AC_CHECK_TYPE(u_int8_t, AC_DEFINE(HAVE_U_INT8_T, 1, "Has u_int8_t type"))
|
||||
AC_CHECK_TYPE(int16_t, AC_DEFINE(HAVE_INT16_T, 1, "Has int16_t type"))
|
||||
AC_CHECK_TYPE(uint16_t, AC_DEFINE(HAVE_UINT16_T, 1, "Has uint16_t type"))
|
||||
AC_CHECK_TYPE(u_int16_t, AC_DEFINE(HAVE_U_INT16_T, 1, "Has u_int16_t type"))
|
||||
AC_CHECK_TYPE(int32_t, AC_DEFINE(HAVE_INT32_T, 1, "Has int32_t type"))
|
||||
AC_CHECK_TYPE(uint32_t, AC_DEFINE(HAVE_UINT32_T, 1, "Has uint32_t type"))
|
||||
AC_CHECK_TYPE(u_int32_t, AC_DEFINE(HAVE_U_INT32_T, 1, "Has u_int32_t type"))
|
||||
])
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
dnl Macro: anope_CHECK_TYPE_SIZES
|
||||
dnl
|
||||
dnl Check the size of several types and define a valid int16_t and int32_t.
|
||||
dnl
|
||||
AC_DEFUN(anope_CHECK_TYPE_SIZES,
|
||||
[dnl Check type sizes
|
||||
dnl AC_CHECK_SIZEOF(short)
|
||||
dnl AC_CHECK_SIZEOF(int)
|
||||
dnl AC_CHECK_SIZEOF(long)
|
||||
dnl if test "$ac_cv_sizeof_int" = 2 ; then
|
||||
dnl AC_CHECK_TYPE(int16_t, int)
|
||||
dnl AC_CHECK_TYPE(u_int16_t, unsigned int)
|
||||
dnl elif test "$ac_cv_sizeof_short" = 2 ; then
|
||||
dnl AC_CHECK_TYPE(int16_t, short)
|
||||
dnl AC_CHECK_TYPE(u_int16_t, unsigned short)
|
||||
dnl else
|
||||
dnl AC_MSG_ERROR([Cannot find a type with size of 16 bits])
|
||||
dnl fi
|
||||
dnl if test "$ac_cv_sizeof_int" = 4 ; then
|
||||
dnl AC_CHECK_TYPE(int32_t, int)
|
||||
dnl AC_CHECK_TYPE(u_int32_t, unsigned int)
|
||||
dnl elif test "$ac_cv_sizeof_short" = 4 ; then
|
||||
dnl AC_CHECK_TYPE(int32_t, short)
|
||||
dnl AC_CHECK_TYPE(u_int32_t, unsigned short)
|
||||
dnl elif test "$ac_cv_sizeof_long" = 4 ; then
|
||||
dnl AC_CHECK_TYPE(int32_t, long)
|
||||
dnl AC_CHECK_TYPE(u_int32_t, unsigned long)
|
||||
dnl else
|
||||
dnl AC_MSG_ERROR([Cannot find a type with size of 32 bits])
|
||||
dnl fi
|
||||
AC_CHECK_TYPE(uint8_t, AC_DEFINE(HAVE_UINT8_T, 1, "Has uint8_t type"))
|
||||
AC_CHECK_TYPE(u_int8_t, AC_DEFINE(HAVE_U_INT8_T, 1, "Has u_int8_t type"))
|
||||
AC_CHECK_TYPE(int16_t, AC_DEFINE(HAVE_INT16_T, 1, "Has int16_t type"))
|
||||
AC_CHECK_TYPE(uint16_t, AC_DEFINE(HAVE_UINT16_T, 1, "Has uint16_t type"))
|
||||
AC_CHECK_TYPE(u_int16_t, AC_DEFINE(HAVE_U_INT16_T, 1, "Has u_int16_t type"))
|
||||
AC_CHECK_TYPE(int32_t, AC_DEFINE(HAVE_INT32_T, 1, "Has int32_t type"))
|
||||
AC_CHECK_TYPE(uint32_t, AC_DEFINE(HAVE_UINT32_T, 1, "Has uint32_t type"))
|
||||
AC_CHECK_TYPE(u_int32_t, AC_DEFINE(HAVE_U_INT32_T, 1, "Has u_int32_t type"))
|
||||
])
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Generating build information using aclocal, autoheader, automake and autoconf."
|
||||
echo
|
||||
|
||||
# Regerate configuration files
|
||||
aclocal
|
||||
autoheader
|
||||
automake --gnu --add-missing --copy
|
||||
autoconf
|
||||
|
||||
echo
|
||||
echo "Now you are ready to run ./configure"
|
||||
@@ -0,0 +1,106 @@
|
||||
###############################################################################
|
||||
# calculate_libraries(<source filename> <output variable for linker flags> <output variable for extra depends>)
|
||||
#
|
||||
# This macro is used in most of the module (sub)directories to calculate the
|
||||
# library dependencies for the given source file.
|
||||
###############################################################################
|
||||
macro(calculate_libraries SRC SRC_LDFLAGS EXTRA_DEPENDS)
|
||||
# Set up a temporary LDFLAGS for this file
|
||||
set(THIS_LDFLAGS "${LDFLAGS}")
|
||||
# Reset extra dependencies
|
||||
set(EXTRA_DEPENDENCIES)
|
||||
# Reset library paths
|
||||
set(LIBRARY_PATHS)
|
||||
# Reset libraries
|
||||
set(LIBRARIES)
|
||||
# Check to see if there are any lines matching: /* RequiredLibraries: [something] */
|
||||
if(WIN32)
|
||||
file(STRINGS ${SRC} REQUIRED_LIBRARIES REGEX "/\\*[ \t]*RequiredWindowsLibraries:[ \t]*.*[ \t]*\\*/")
|
||||
else()
|
||||
file(STRINGS ${SRC} REQUIRED_LIBRARIES REGEX "/\\*[ \t]*RequiredLibraries:[ \t]*.*[ \t]*\\*/")
|
||||
endif()
|
||||
# Iterate through those lines
|
||||
foreach(REQUIRED_LIBRARY ${REQUIRED_LIBRARIES})
|
||||
# Strip off the /* RequiredLibraries: and */ from the line
|
||||
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
|
||||
foreach(LIBRARY ${REQUIRED_LIBRARY})
|
||||
# If the library has multiple names extract the alternate.
|
||||
unset(LIBRARY_ALT)
|
||||
if (${LIBRARY} MATCHES "^.+\\|.+$")
|
||||
string(REGEX REPLACE ".+\\|(.*)" "\\1" LIBRARY_ALT ${LIBRARY})
|
||||
string(REGEX REPLACE "(.+)\\|.*" "\\1" LIBRARY ${LIBRARY})
|
||||
endif()
|
||||
# Locate the library to see if it exists
|
||||
if(DEFAULT_LIBRARY_DIRS OR DEFINED $ENV{VCINSTALLDIR})
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${DEFAULT_LIBRARY_DIRS} $ENV{VCINSTALLDIR}/lib ${EXTRA_INCLUDE} ${EXTRA_LIBS})
|
||||
else()
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS} NO_DEFAULT_PATH)
|
||||
find_library(FOUND_${LIBRARY}_LIBRARY NAMES ${LIBRARY} ${LIBRARY_ALT} PATHS ${EXTRA_INCLUDE} ${EXTRA_LIBS})
|
||||
endif()
|
||||
# If the library was found, we will add it to the linker flags
|
||||
if(FOUND_${LIBRARY}_LIBRARY)
|
||||
if(MSVC)
|
||||
# For Visual Studio, instead of editing the linker flags, we'll add the library to a separate list of extra dependencies
|
||||
list(APPEND EXTRA_DEPENDENCIES "${FOUND_${LIBRARY}_LIBRARY}")
|
||||
else()
|
||||
# Get the path only of the library, to add it to library paths.
|
||||
get_filename_component(LIBRARY_PATH ${FOUND_${LIBRARY}_LIBRARY} PATH)
|
||||
list(APPEND LIBRARY_PATHS "${LIBRARY_PATH}")
|
||||
# Extract the library short name, add it to the library path
|
||||
get_filename_component(LIBRARY_NAME ${FOUND_${LIBRARY}_LIBRARY} NAME_WE)
|
||||
string(REGEX REPLACE "^lib" "" LIBRARY_NAME ${LIBRARY_NAME})
|
||||
list(APPEND LIBRARIES ${LIBRARY_NAME})
|
||||
endif()
|
||||
else()
|
||||
# In the case of the library not being found, we fatally error so CMake stops trying to generate
|
||||
message(FATAL_ERROR "${SRC} needs library ${LIBRARY} but we were unable to locate that library! Check that the library is within the search path of your OS.")
|
||||
endif()
|
||||
endforeach()
|
||||
endforeach()
|
||||
# Remove duplicates from the library paths
|
||||
if(LIBRARY_PATHS)
|
||||
list(REMOVE_DUPLICATES LIBRARY_PATHS)
|
||||
endif()
|
||||
# Remove diplicates from the libraries
|
||||
if(LIBRARIES)
|
||||
list(REMOVE_DUPLICATES LIBRARIES)
|
||||
endif()
|
||||
# Iterate through library paths and add them to the linker flags
|
||||
foreach(LIBRARY_PATH ${LIBRARY_PATHS})
|
||||
if(NOT "${LIBRARY_PATH}" IN_LIST DEFAULT_LIBRARY_DIRS)
|
||||
set(THIS_LDFLAGS "${THIS_LDFLAGS} -L${LIBRARY_PATH}")
|
||||
endif()
|
||||
endforeach()
|
||||
# Iterate through libraries and add them to the linker flags
|
||||
foreach(LIBRARY ${LIBRARIES})
|
||||
list(APPEND EXTRA_DEPENDENCIES "${LIBRARY}")
|
||||
endforeach()
|
||||
set(${SRC_LDFLAGS} "${THIS_LDFLAGS}")
|
||||
set(${EXTRA_DEPENDS} "${EXTRA_DEPENDENCIES}")
|
||||
endmacro()
|
||||
|
||||
###############################################################################
|
||||
# add_to_cpack_ignored_files(<item> [TRUE])
|
||||
#
|
||||
# A macro to update the environment variable CPACK_IGNORED_FILES which
|
||||
# contains a list of files for CPack to ignore. If the optional 2nd argument
|
||||
# of TRUE is given, periods will be converted to \\. for CPack.
|
||||
###############################################################################
|
||||
macro(add_to_cpack_ignored_files ITEM)
|
||||
# Temporary copy of the original item
|
||||
set(REAL_ITEM "${ITEM}")
|
||||
# If we have 2+ arguments, assume that the second one was something like TRUE (doesn't matter really) and convert periods so they will be \\. for CPack
|
||||
if(${ARGC} GREATER 1)
|
||||
string(REPLACE "." "\\\\." REAL_ITEM ${REAL_ITEM})
|
||||
endif()
|
||||
# If the environment variable is already defined, just tack the item to the end
|
||||
if(DEFINED ENV{CPACK_IGNORED_FILES})
|
||||
set(ENV{CPACK_IGNORED_FILES} "$ENV{CPACK_IGNORED_FILES};${REAL_ITEM}")
|
||||
# Otherwise set the environment variable to the item
|
||||
else()
|
||||
set(ENV{CPACK_IGNORED_FILES} "${REAL_ITEM}")
|
||||
endif()
|
||||
endmacro()
|
||||
@@ -118,7 +118,7 @@ Var AR_RegFlags
|
||||
"exit_${SecName}:"
|
||||
!macroend
|
||||
|
||||
!macro RemoveSection SecName
|
||||
!macro RemoveSection_CPack SecName
|
||||
; This macro is used to call section's Remove_... macro
|
||||
;from the uninstaller.
|
||||
;Input: section index constant name specified in Section command.
|
||||
@@ -348,7 +348,7 @@ Function un.RemoveFromPath
|
||||
FunctionEnd
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
; Uninstall sutff
|
||||
; Uninstall stuff
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
###########################################
|
||||
@@ -452,15 +452,15 @@ Done:
|
||||
Exch $R1
|
||||
FunctionEnd
|
||||
|
||||
Function ConditionalAddToRegisty
|
||||
Function ConditionalAddToRegistry
|
||||
Pop $0
|
||||
Pop $1
|
||||
StrCmp "$0" "" ConditionalAddToRegisty_EmptyString
|
||||
StrCmp "$0" "" ConditionalAddToRegistry_EmptyString
|
||||
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\@CPACK_PACKAGE_NAME@" \
|
||||
"$1" "$0"
|
||||
;MessageBox MB_OK "Set Registry: '$1' to '$0'"
|
||||
DetailPrint "Set install registry entry: '$1' to '$0'"
|
||||
ConditionalAddToRegisty_EmptyString:
|
||||
ConditionalAddToRegistry_EmptyString:
|
||||
FunctionEnd
|
||||
|
||||
;--------------------------------
|
||||
@@ -525,7 +525,7 @@ FunctionEnd
|
||||
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\docs\README.txt"
|
||||
!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\doc\README.txt"
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
!insertmacro MUI_UNPAGE_CONFIRM
|
||||
@@ -558,44 +558,44 @@ Section "-Core installation"
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
Push "DisplayName"
|
||||
Push "@CPACK_NSIS_DISPLAY_NAME@"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "DisplayVersion"
|
||||
Push "@CPACK_PACKAGE_VERSION@"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "Publisher"
|
||||
Push "@CPACK_PACKAGE_VENDOR@"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "UninstallString"
|
||||
Push "$INSTDIR\Uninstall.exe"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "NoRepair"
|
||||
Push "1"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
|
||||
!ifdef CPACK_NSIS_ADD_REMOVE
|
||||
;Create add/remove functionality
|
||||
Push "ModifyPath"
|
||||
Push "$INSTDIR\AddRemove.exe"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
!else
|
||||
Push "NoModify"
|
||||
Push "1"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
!endif
|
||||
|
||||
; Optional registration
|
||||
Push "DisplayIcon"
|
||||
Push "$INSTDIR\@CPACK_NSIS_INSTALLED_ICON_NAME@"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "HelpLink"
|
||||
Push "@CPACK_NSIS_HELP_LINK@"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "URLInfoAbout"
|
||||
Push "@CPACK_NSIS_URL_INFO_ABOUT@"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "Contact"
|
||||
Push "@CPACK_NSIS_CONTACT@"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
|
||||
;Create shortcuts
|
||||
@@ -607,19 +607,19 @@ Section "-Core installation"
|
||||
; Write special uninstall registry entries
|
||||
Push "StartMenu"
|
||||
Push "$STARTMENU_FOLDER"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "DoNotAddToPath"
|
||||
Push "$DO_NOT_ADD_TO_PATH"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "AddToPathAllUsers"
|
||||
Push "$ADD_TO_PATH_ALL_USERS"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "AddToPathCurrentUser"
|
||||
Push "$ADD_TO_PATH_CURRENT_USER"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
Push "InstallToDesktop"
|
||||
Push "$INSTALL_DESKTOP"
|
||||
Call ConditionalAddToRegisty
|
||||
Call ConditionalAddToRegistry
|
||||
|
||||
@CPACK_NSIS_EXTRA_INSTALL_COMMANDS@
|
||||
|
||||
@@ -731,7 +731,7 @@ Section "Uninstall"
|
||||
DeleteRegKey SHCTX "Software\@CPACK_PACKAGE_VENDOR@\@CPACK_PACKAGE_INSTALL_REGISTRY_KEY@"
|
||||
|
||||
; Removes all optional components
|
||||
!insertmacro SectionList "RemoveSection"
|
||||
!insertmacro SectionList "RemoveSection_CPack"
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
|
||||
|
||||
@@ -739,7 +739,7 @@ Section "Uninstall"
|
||||
@CPACK_NSIS_DELETE_ICONS@
|
||||
@CPACK_NSIS_DELETE_ICONS_EXTRA@
|
||||
|
||||
;Delete empty start menu parent diretories
|
||||
;Delete empty start menu parent directories
|
||||
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
|
||||
|
||||
startMenuDeleteLoop:
|
||||
@@ -752,13 +752,13 @@ Section "Uninstall"
|
||||
StrCmp "$MUI_TEMP" "$SMPROGRAMS" startMenuDeleteLoopDone startMenuDeleteLoop
|
||||
startMenuDeleteLoopDone:
|
||||
|
||||
; If the user changed the shortcut, then untinstall may not work. This should
|
||||
; If the user changed the shortcut, then uninstall may not work. This should
|
||||
; try to fix it.
|
||||
StrCpy $MUI_TEMP "$START_MENU"
|
||||
Delete "$SMPROGRAMS\$MUI_TEMP\Uninstall.lnk"
|
||||
@CPACK_NSIS_DELETE_ICONS_EXTRA@
|
||||
|
||||
;Delete empty start menu parent diretories
|
||||
;Delete empty start menu parent directories
|
||||
StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP"
|
||||
|
||||
secondStartMenuDeleteLoop:
|
||||
Vendored
-1526
File diff suppressed because it is too large
Load Diff
Vendored
-1662
File diff suppressed because it is too large
Load Diff
-245
@@ -1,245 +0,0 @@
|
||||
dnl autoconf.in for Services.
|
||||
dnl
|
||||
dnl Anope (c) 2003-2010 Anope team
|
||||
dnl Contact us at team@anope.org
|
||||
|
||||
dnl This program is free but copyrighted software; see the file COPYING for
|
||||
dnl details.
|
||||
|
||||
dnl Based heavily on the Unreal configure.in script, and extra thanks to
|
||||
dnl codemastr from UnrealIRCD.
|
||||
|
||||
AC_INIT
|
||||
|
||||
# Clear out any CFLAGS (cept -g) the os is using, usually -g -O2
|
||||
CFLAGS="-g"
|
||||
|
||||
# If no bindir, we tell him to run ./Config.
|
||||
if test "${with_instdir+set}" != set; then
|
||||
echo "You might want to run ./Config or provide some parameters to this script."
|
||||
echo "./configure --help for information about this script"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
AC_CONFIG_SRCDIR([src/actions.c])
|
||||
AC_CONFIG_HEADER(include/sysconf.h)
|
||||
AC_PROG_CC
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes"; then
|
||||
# CFLAGS="$CFLAGS -funsigned-char"
|
||||
AC_CACHE_CHECK(if gcc has a working -pipe, ac_cv_pipe, [
|
||||
save_cflags="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -pipe"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[ac_cv_pipe="yes"],[ac_cv_pipe="no"])
|
||||
CFLAGS="$save_cflags"
|
||||
])
|
||||
if test "$ac_cv_pipe" = "yes"; then
|
||||
CFLAGS="-pipe $CFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
dnl CFLAGS="$CFLAGS -W -Wall"
|
||||
|
||||
AC_PATH_PROG(RM,rm)
|
||||
AC_PATH_PROG(CP,cp)
|
||||
AC_PATH_PROG(TOUCH,touch)
|
||||
AC_PATH_PROG(INSTALL,install)
|
||||
AC_CHECK_LIB(nsl,inet_ntoa,ANOPELIBS="$ANOPELIBS-lnsl ")
|
||||
AC_CHECK_LIB(socket, socket,ANOPELIBS="$ANOPELIBS-lsocket ")
|
||||
AC_CHECK_LIB(resolv, res_query,ANOPELIBS="$ANOPELIBS-lresolv ")
|
||||
AC_CHECK_LIB(bsd, revoke,ANOPELIBS="$ANOPELIBS-lbsd ")
|
||||
|
||||
dnl Does this platform require array notation to assign to a va_list?
|
||||
dnl If cross-compiling, we assume va_list is "normal". If this breaks
|
||||
dnl you, set ac_cv_valistisarray=true and maybe define HAVE_VA_LIST_AS_ARRAY
|
||||
dnl also just to be sure.
|
||||
|
||||
dnl NOTE: this autoconf test is taken from mozilla: www.mozilla.org.
|
||||
|
||||
AC_MSG_CHECKING(whether va_list assignments need array notation)
|
||||
AC_CACHE_VAL(ac_cv_valistisarray,
|
||||
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
void foo(int i, ...) {
|
||||
va_list ap1, ap2;
|
||||
va_start(ap1, i);
|
||||
ap2 = ap1;
|
||||
if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123) { exit(1); }
|
||||
va_end(ap1); va_end(ap2);
|
||||
}
|
||||
int main()
|
||||
{ foo(0, 123); return(0); }]])],[ac_cv_valistisarray=false],[ac_cv_valistisarray=true],[ac_cv_valistisarray=false])])
|
||||
|
||||
if test "$ac_cv_valistisarray" = true ; then
|
||||
AC_DEFINE(HAVE_VA_LIST_AS_ARRAY,[1],[va_list as array])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(whether this is a bit or little endian system)
|
||||
AC_TRY_RUN([
|
||||
int main()
|
||||
{
|
||||
short s = 1;
|
||||
short* ptr = &s;
|
||||
unsigned char c = *((char*)ptr);
|
||||
return c;
|
||||
}
|
||||
]
|
||||
, AC_DEFINE(BIG_ENDIAN)
|
||||
AC_MSG_RESULT(big)
|
||||
, AC_DEFINE(LITTLE_ENDIAN)
|
||||
AC_MSG_RESULT(little)
|
||||
)
|
||||
|
||||
AC_SUBST(ANOPELIBS)
|
||||
AC_SUBST(LDFLAGS)
|
||||
|
||||
AC_CHECK_HEADER(sys/types.h,AC_DEFINE(HAS_SYS_TYPES_H,1,"Has sys/types.h"))
|
||||
dnl module checking based on Unreal's module checking code
|
||||
AC_DEFUN(AC_ENABLE_DYN,
|
||||
[
|
||||
AC_CHECK_FUNC(dlopen,, AC_CHECK_LIB(dl,dlopen,[
|
||||
ANOPELIBS="$ANOPELIBS -ldl"
|
||||
],
|
||||
[
|
||||
AC_ERROR("dlopen() is required for Anope to be compiled and used. Sorry.")
|
||||
]))
|
||||
|
||||
hold_cflags=$CFLAGS
|
||||
CFLAGS="$CFLAGS -export-dynamic"
|
||||
AC_CACHE_CHECK(if we need the -export-dynamic flag, ac_cv_export_dynamic, [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int i;]])],[ac_cv_export_dynamic=yes],[ac_cv_export_dynamic=no])])
|
||||
if test "$ac_cv_export_dynamic" = "no"; then
|
||||
CFLAGS=$hold_cflags
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(for compiler option to produce PIC,ac_cv_pic,[
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes"; then
|
||||
ac_cv_pic="-fPIC -DPIC -shared"
|
||||
case `uname -s` in
|
||||
Darwin*[)]
|
||||
ac_cv_pic="-bundle -flat_namespace -undefined suppress"
|
||||
;;
|
||||
HP-UX*[)]
|
||||
ac_cv_pic="-fPIC"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case `uname -s` in
|
||||
SunOS*[)]
|
||||
ac_cv_pic="-KPIC -DPIC -G"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
])
|
||||
|
||||
if test "$ac_cv_c_compiler_gnu" = "yes"; then
|
||||
case `uname -s` in
|
||||
Darwin*[)]
|
||||
SHARED="-bundle -flat_namespace -undefined suppress"
|
||||
AC_SUBST(SHARED)
|
||||
;;
|
||||
*[)]
|
||||
SHARED="-shared"
|
||||
AC_SUBST(SHARED)
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK(if your system prepends an underscore on symbols,ac_cv_underscore,[
|
||||
cat >uscore.c << __EOF__
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
__EOF__
|
||||
$CC -o uscore $CFLAGS uscore.c 1>&5
|
||||
if test -z "`strings -a uscore |grep '^_main$'`"; then
|
||||
ac_cv_underscore=no
|
||||
else
|
||||
ac_cv_underscore=yes
|
||||
fi
|
||||
|
||||
rm -f uscore uscore.c
|
||||
])
|
||||
if test "$ac_cv_underscore" = "yes"; then
|
||||
AC_DEFINE(DL_PREFIX,"_","Underscore needed for dlopen")
|
||||
else
|
||||
AC_DEFINE(DL_PREFIX,"","No prefix needed for dlopen")
|
||||
fi
|
||||
|
||||
MODULEFLAGS=$ac_cv_pic
|
||||
AC_SUBST(MODULEFLAGS)
|
||||
])
|
||||
|
||||
AC_ENABLE_DYN
|
||||
anope_CHECK_TYPE_SIZES
|
||||
|
||||
AC_CHECK_HEADER(strings.h,AC_DEFINE(HAVE_STRINGS_H,1,""))
|
||||
AC_CHECK_HEADER(sys/select.h,AC_DEFINE(HAVE_SYS_SELECT_H,1,""))
|
||||
|
||||
AC_CHECK_FUNCS(backtrace,AC_DEFINE(HAVE_BACKTRACE,1))
|
||||
AC_CHECK_FUNCS(stricmp,AC_DEFINE(HAVE_STRICMP,1))
|
||||
AC_CHECK_FUNCS(strcasecmp,AC_DEFINE(HAVE_STRCASECMP,1))
|
||||
AC_CHECK_FUNCS(gettimeofday,AC_DEFINE(HAVE_GETTIMEOFDAY,1))
|
||||
AC_CHECK_FUNCS(setgrent,AC_DEFINE(HAVE_SETGRENT,1))
|
||||
AC_CHECK_FUNCS(umask,AC_DEFINE(HAVE_UMASK,1))
|
||||
AC_CHECK_FUNCS(fork,AC_DEFINE(HAVE_FORK,1))
|
||||
AC_CHECK_FUNCS(gethostbyname,AC_DEFINE(HAVE_GETHOSTBYNAME,1))
|
||||
AC_CHECK_FUNCS(gethostbyname_r,AC_DEFINE(HAVE_GETHOSTBYNAME_R,1))
|
||||
AC_CHECK_FUNCS(strlcpy,AC_DEFINE(HAVE_STRLCPY,1))
|
||||
AC_CHECK_FUNCS(strlcat,AC_DEFINE(HAVE_STRLCAT,1))
|
||||
|
||||
AC_ARG_WITH(rungroup, [ --with-rungroup=group Specify the rungroup for anope], [
|
||||
AC_DEFINE_UNQUOTED(RUNGROUP,"$withval","Run group")
|
||||
RUNGROUP=$withval
|
||||
])
|
||||
|
||||
AC_SUBST(RUNGROUP)
|
||||
|
||||
dnl AC_DEFINE_UNQUOTED(MYOSNAME,"`uname -a`","uname")
|
||||
|
||||
AC_ARG_WITH(permissions, [ --with-permissions=permissions Specify the default permissions for anope], AC_DEFINE_UNQUOTED(DEFUMASK,$withval,"Default umask permissions"), AC_DEFINE(DEFUMASK, 007,"Default umask Permissions"))
|
||||
|
||||
AC_ARG_WITH(instdir, [ --with-instdir=instdir Specify the default install dir for anope], [
|
||||
INSTDIR=$withval
|
||||
])
|
||||
|
||||
MAKEBIN=`pwd`/run-cc.pl
|
||||
|
||||
AC_ARG_WITH(makebin, [ --with-makebin=run-cc.pl Specify the default make binary to use],[MAKEBIN=$withval])
|
||||
|
||||
MYSQLDIR=/usr/local/
|
||||
AC_ARG_WITH(mysqlpp, [ --with-mysqlpp=/usr/local/ The base directory of the MySQL++ installation],[MYSQLDIR=$withval])
|
||||
|
||||
AC_SUBST(INSTDIR)
|
||||
AC_SUBST(MAKEBIN)
|
||||
AC_SUBST(MYSQLDIR)
|
||||
|
||||
AC_ARG_WITH(optimization, [ --with-optimization=1|2|3|4|5 Specify the optimization level], [
|
||||
CFLAGS="$CFLAGS -O$withval"
|
||||
])
|
||||
|
||||
AC_ARG_WITH(debugsym, [ --with-debugsym Include debugging symbols], [
|
||||
CFLAGS="$CFLAGS -g"
|
||||
])
|
||||
|
||||
|
||||
AC_CONFIG_FILES( \
|
||||
Makefile \
|
||||
src/bin/anoperc \
|
||||
)
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
cat <<EOT
|
||||
|
||||
$DIS_MODULES
|
||||
|
||||
|
||||
All done! Now run "make" (or possibly "gmake") to compile Anope.
|
||||
See the INSTALL, README and FAQ files if you have any problems.
|
||||
EOT
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
# Only install example.chk and example.conf from this directory
|
||||
# Only install cron.example.sh and anope.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 example.conf tables.sql)
|
||||
set(DATA cron.example.sh anope.example.conf botserv.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 data
|
||||
DESTINATION ${CONF_DIR}
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,417 @@
|
||||
/*
|
||||
* Example configuration file for BotServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* 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"
|
||||
|
||||
/*
|
||||
* The username of the BotServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the BotServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the BotServ client.
|
||||
*/
|
||||
gecos = "Bot 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"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "BS"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core BotServ module.
|
||||
*
|
||||
* Provides essential functionality for BotServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "botserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be BotServ.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
client = "BotServ"
|
||||
|
||||
/*
|
||||
* The default bot options for newly registered channels. Note that changing these options
|
||||
* will have no effect on channels which are already registered. The list must be separated
|
||||
* by spaces.
|
||||
*
|
||||
* The options are:
|
||||
* - dontkickops: Channel operators will be protected against BotServ kicks
|
||||
* - dontkickvoices: Voiced users will be protected against BotServ kicks
|
||||
* - greet: The channel's BotServ bot will greet incoming users that have set a greet
|
||||
* in their NickServ settings
|
||||
* - fantasy: Enables the use of BotServ fantasy commands in the channel
|
||||
*
|
||||
* This directive is optional, if left blank, there will be no defaults.
|
||||
*/
|
||||
defaults = "greet fantasy"
|
||||
|
||||
/*
|
||||
* The minimum number of users there must be in a channel before the bot joins it. The best
|
||||
* value for this setting is 1 or 2. This can be 0, the service bots will not part unless
|
||||
* specifically unassigned, and will keep the channel open.
|
||||
*/
|
||||
minusers = 1
|
||||
|
||||
/*
|
||||
* The bots are currently not affected by any modes or bans when they try to join a channel.
|
||||
* But some people may want to make it act like a real bot, that is, for example, remove all
|
||||
* the bans affecting the bot before joining the channel, remove a ban that affects the bot
|
||||
* set by a user when it is in the channel, and so on. Since it consumes a bit more CPU
|
||||
* time, you should not enable this on larger networks.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#smartjoin = yes
|
||||
|
||||
/*
|
||||
* Modes to set on service bots when they join channels, comment this out for no modes
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
botmodes = "ao"
|
||||
|
||||
/*
|
||||
* User modes to set on service bots. Read the comment about the service:modes directive
|
||||
* on why this can be a bad idea to set.
|
||||
*/
|
||||
#botumodes = "i"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core BotServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "BotServ"; name = "HELP"; command = "generic/help"; }
|
||||
|
||||
/*
|
||||
* bs_assign
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/assign - Used to assign BotServ bots to channels
|
||||
* botserv/unassign - Used to unassign BotServ bots
|
||||
* botserv/set/nobot - Used to prohibit channels from being assigned BotServ bots.
|
||||
*
|
||||
* Used for assigning and unassigning bots to channels.
|
||||
*/
|
||||
module { name = "bs_assign" }
|
||||
command { service = "BotServ"; name = "ASSIGN"; command = "botserv/assign"; }
|
||||
command { service = "BotServ"; name = "UNASSIGN"; command = "botserv/unassign"; }
|
||||
command { service = "BotServ"; name = "SET NOBOT"; command = "botserv/set/nobot"; permission = "botserv/set/nobot"; }
|
||||
|
||||
/*
|
||||
* bs_autoassign
|
||||
*
|
||||
* Allows service bots to be automatically assigned to channels upon registration.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "bs_autoassign"
|
||||
|
||||
/*
|
||||
* Automatically assign ChanServ to channels upon registration.
|
||||
*/
|
||||
bot = "ChanServ"
|
||||
}
|
||||
|
||||
/*
|
||||
* bs_badwords
|
||||
*
|
||||
* Provides the command botserv/badwords.
|
||||
*
|
||||
* Used for controlling the channel badword list.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "bs_badwords"
|
||||
|
||||
/*
|
||||
* The maximum number of entries a single bad words list can have.
|
||||
*/
|
||||
badwordsmax = 50
|
||||
|
||||
/*
|
||||
* If set, BotServ will use case sensitive checking for badwords.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#casesensitive = yes
|
||||
}
|
||||
command { service = "BotServ"; name = "BADWORDS"; command = "botserv/badwords"; }
|
||||
|
||||
/*
|
||||
* bs_bot
|
||||
*
|
||||
* Provides the command botserv/bot.
|
||||
*
|
||||
* Used for administrating BotServ bots.
|
||||
*/
|
||||
module { name = "bs_bot" }
|
||||
command { service = "BotServ"; name = "BOT"; command = "botserv/bot"; permission = "botserv/bot"; }
|
||||
|
||||
/*
|
||||
* bs_botlist
|
||||
*
|
||||
* Provides the command botserv/botlist.
|
||||
*
|
||||
* Used for listing all available bots.
|
||||
*/
|
||||
module { name = "bs_botlist" }
|
||||
command { service = "BotServ"; name = "BOTLIST"; command = "botserv/botlist"; }
|
||||
|
||||
/*
|
||||
* bs_control
|
||||
*
|
||||
* Provides the commands botserv/act and botserv/say.
|
||||
*
|
||||
* Used for making the bot message a channel.
|
||||
*/
|
||||
module { name = "bs_control" }
|
||||
command { service = "BotServ"; name = "ACT"; command = "botserv/act"; }
|
||||
command { service = "BotServ"; name = "SAY"; command = "botserv/say"; }
|
||||
|
||||
/*
|
||||
* bs_info
|
||||
*
|
||||
* Provides the command botserv/info.
|
||||
*
|
||||
* Used for getting information on bots or channels.
|
||||
*/
|
||||
module { name = "bs_info" }
|
||||
command { service = "BotServ"; name = "INFO"; command = "botserv/info"; }
|
||||
|
||||
/*
|
||||
* bs_kick
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/kick - Dummy help wrapper for the KICK command.
|
||||
* botserv/kick/amsg - Configures BotServ's AMSG kicker.
|
||||
* botserv/kick/badwords - Configures BotServ's badwords kicker.
|
||||
* botserv/kick/bolds - Configures BotServ's bold text kicker.
|
||||
* botserv/kick/caps - Configures BotServ's capital letters kicker.
|
||||
* botserv/kick/colors - Configures BotServ's color kicker.
|
||||
* botserv/kick/flood - Configures BotServ's flood kicker.
|
||||
* botserv/kick/italics - Configures BotServ's italics kicker.
|
||||
* botserv/kick/repeat - Configures BotServ's repeat kicker.
|
||||
* botserv/kick/reverses - Configures BotServ's reverse kicker.
|
||||
* botserv/kick/underlines - Configures BotServ's underline kicker.
|
||||
* botserv/set/dontkickops - Used for preventing BotServ from kicking channel operators.
|
||||
* botserv/set/dontkickvoices - Used for preventing BotServ from kicking voices.
|
||||
*
|
||||
* Used for configuring what bots should kick for.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "bs_kick"
|
||||
|
||||
/*
|
||||
* The amount of time that data for a user is valid in BotServ. If the data exceeds this time,
|
||||
* it is reset or deleted depending on the case. Do not set it too high, otherwise your
|
||||
* resources will be slightly affected.
|
||||
*/
|
||||
keepdata = 10m
|
||||
|
||||
/*
|
||||
* If set, the bots will use a kick reason that does not state the word when it is kicking.
|
||||
* This is especially useful if you have young people on your network.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
gentlebadwordreason = yes
|
||||
}
|
||||
command { service = "BotServ"; name = "KICK"; command = "botserv/kick"; }
|
||||
command { service = "BotServ"; name = "KICK AMSG"; command = "botserv/kick/amsg"; }
|
||||
command { service = "BotServ"; name = "KICK BADWORDS"; command = "botserv/kick/badwords"; }
|
||||
command { service = "BotServ"; name = "KICK BOLDS"; command = "botserv/kick/bolds"; }
|
||||
command { service = "BotServ"; name = "KICK CAPS"; command = "botserv/kick/caps"; }
|
||||
command { service = "BotServ"; name = "KICK COLORS"; command = "botserv/kick/colors"; }
|
||||
command { service = "BotServ"; name = "KICK FLOOD"; command = "botserv/kick/flood"; }
|
||||
command { service = "BotServ"; name = "KICK ITALICS"; command = "botserv/kick/italics"; }
|
||||
command { service = "BotServ"; name = "KICK REPEAT"; command = "botserv/kick/repeat"; }
|
||||
command { service = "BotServ"; name = "KICK REVERSES"; command = "botserv/kick/reverses"; }
|
||||
command { service = "BotServ"; name = "KICK UNDERLINES"; command = "botserv/kick/underlines"; }
|
||||
|
||||
command { service = "BotServ"; name = "SET DONTKICKOPS"; command = "botserv/set/dontkickops"; }
|
||||
command { service = "BotServ"; name = "SET DONTKICKVOICES"; command = "botserv/set/dontkickvoices"; }
|
||||
|
||||
|
||||
/*
|
||||
* bs_set
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/private - Used to prohibit specific BotServ bots from being assigned to channels.
|
||||
*/
|
||||
module { name = "bs_set" }
|
||||
command { service = "BotServ"; name = "SET"; command = "botserv/set"; }
|
||||
command { service = "BotServ"; name = "SET BANEXPIRE"; command = "botserv/set/banexpire"; }
|
||||
command { service = "BotServ"; name = "SET PRIVATE"; command = "botserv/set/private"; permission = "botserv/set/private"; }
|
||||
|
||||
/*
|
||||
* greet
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/greet - Used for enabling or disabling BotServ's greet messages in a channel.
|
||||
* nickserv/set/greet, nickserv/saset/greet - Used for changing a users greet message, which is displayed when they enter channels.
|
||||
*/
|
||||
module { name = "greet" }
|
||||
command { service = "BotServ"; name = "SET GREET"; command = "botserv/set/greet"; }
|
||||
command { service = "NickServ"; name = "SET GREET"; command = "nickserv/set/greet"; }
|
||||
command { service = "NickServ"; name = "SASET GREET"; command = "nickserv/saset/greet"; permission = "nickserv/saset/greet"; }
|
||||
|
||||
/*
|
||||
* GREET privilege.
|
||||
*
|
||||
* Used by 'greet'.
|
||||
*
|
||||
* Users with this privilege have their greet shown when they join channels.
|
||||
*/
|
||||
privilege
|
||||
{
|
||||
name = "GREET"
|
||||
desc = _("Greet message displayed on join")
|
||||
rank = 40
|
||||
level = 5
|
||||
flag = "g"
|
||||
xop = "AOP"
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* fantasy
|
||||
*
|
||||
* Allows fantasy commands (e.g. !kick) to be used in channels.
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasy commands.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "fantasy"
|
||||
|
||||
/*
|
||||
* Defines the prefixes for fantasy commands in channels. One of these characters will have to be prepended
|
||||
* to all fantasy commands. If you choose "!", for example, fantasy commands will be "!kick",
|
||||
* "!op", etc. This directive is optional, if left out, the default fantasy character is "!".
|
||||
*/
|
||||
#fantasycharacter = "!."
|
||||
}
|
||||
command { service = "BotServ"; name = "SET FANTASY"; command = "botserv/set/fantasy"; }
|
||||
|
||||
/*
|
||||
* Fantasy commands
|
||||
*
|
||||
* Fantasy commands can be executed in channels that have a BotServ bot by prefixing the
|
||||
* command with one of the fantasy characters configured in botserv's fantasycharacter
|
||||
* directive.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
fantasy { name = "ACCESS"; command = "chanserv/access"; }
|
||||
fantasy { name = "AKICK"; command = "chanserv/akick"; }
|
||||
fantasy { name = "AOP"; command = "chanserv/xop"; }
|
||||
fantasy { name = "BAN"; command = "chanserv/ban"; }
|
||||
fantasy { name = "CLONE"; command = "chanserv/clone"; }
|
||||
fantasy { name = "DEHALFOP"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DEOP"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DEOWNER"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DEPROTECT"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DEVOICE"; command = "chanserv/modes"; }
|
||||
fantasy { name = "DOWN"; command = "chanserv/down"; }
|
||||
fantasy { name = "ENFORCE"; command = "chanserv/enforce"; }
|
||||
fantasy { name = "ENTRYMSG"; command = "chanserv/entrymsg"; }
|
||||
fantasy { name = "FLAGS"; command = "chanserv/flags"; }
|
||||
fantasy { name = "HALFOP"; command = "chanserv/modes"; }
|
||||
fantasy { name = "HELP"; command = "generic/help"; prepend_channel = false; }
|
||||
fantasy { name = "HOP"; command = "chanserv/xop"; }
|
||||
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = false; }
|
||||
fantasy { name = "INVITE"; command = "chanserv/invite"; }
|
||||
fantasy { name = "K"; command = "chanserv/kick"; }
|
||||
fantasy { name = "KB"; command = "chanserv/ban"; }
|
||||
fantasy { name = "KICK"; command = "chanserv/kick"; }
|
||||
fantasy { name = "LEVELS"; command = "chanserv/levels"; }
|
||||
fantasy { name = "LIST"; command = "chanserv/list"; prepend_channel = false; }
|
||||
fantasy { name = "LOG"; command = "chanserv/log"; }
|
||||
fantasy { name = "MODE"; command = "chanserv/mode"; }
|
||||
fantasy { name = "MUTE"; command = "chanserv/ban"; kick = no; mode = "QUIET"; }
|
||||
fantasy { name = "OP"; command = "chanserv/modes"; }
|
||||
fantasy { name = "OWNER"; command = "chanserv/modes"; }
|
||||
fantasy { name = "PROTECT"; command = "chanserv/modes"; }
|
||||
fantasy { name = "QOP"; command = "chanserv/xop"; }
|
||||
fantasy { name = "SEEN"; command = "chanserv/seen"; prepend_channel = false; }
|
||||
fantasy { name = "SOP"; command = "chanserv/xop"; }
|
||||
fantasy { name = "STATUS"; command = "chanserv/status"; }
|
||||
fantasy { name = "SUSPEND"; command = "chanserv/suspend"; permission = "chanserv/suspend"; }
|
||||
fantasy { name = "SYNC"; command = "chanserv/sync"; }
|
||||
fantasy { name = "TOPIC"; command = "chanserv/topic"; }
|
||||
fantasy { name = "UNBAN"; command = "chanserv/unban"; }
|
||||
fantasy { name = "UNMUTE"; command = "chanserv/unban"; mode = "QUIET"; }
|
||||
fantasy { name = "UNSUSPEND"; command = "chanserv/unsuspend"; permission = "chanserv/suspend"; }
|
||||
fantasy { name = "UP"; command = "chanserv/up"; }
|
||||
fantasy { name = "VOICE"; command = "chanserv/modes"; }
|
||||
fantasy { name = "VOP"; command = "chanserv/xop"; }
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Example configuration file for Chanstats.
|
||||
* Make sure BotServ, ChanServ and NickServ are running.
|
||||
*/
|
||||
|
||||
module
|
||||
{
|
||||
name = "chanstats"
|
||||
|
||||
/*
|
||||
* The name of this engine.
|
||||
* This must match with the name of an SQL engine 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_"
|
||||
|
||||
smileyshappy = ":) :-) ;) ;-) :D :-D :P :-P"
|
||||
smileyssad = ":( :-( ;( ;-("
|
||||
smileysother = ":/ :-/"
|
||||
|
||||
/*
|
||||
* Enable Chanstats for newly registered nicks / channels.
|
||||
*/
|
||||
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"; }
|
||||
command { service = "NickServ"; name = "SASET CHANSTATS"; command = "nickserv/saset/chanstats"; permission = "nickserv/saset/chanstats"; }
|
||||
|
||||
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"; }
|
||||
@@ -9,16 +9,16 @@
|
||||
###############################################################
|
||||
|
||||
# Anope binary directory
|
||||
ANOPATH=/home/ircd/services/bin
|
||||
ANOPATH=/home/ircd/anope/bin
|
||||
|
||||
# Anope data directory
|
||||
ANODATA=/home/ircd/services/data
|
||||
ANODATA=/home/ircd/anope/data
|
||||
|
||||
# Name of the pid file
|
||||
ANOPIDF=services.pid
|
||||
ANOPIDF=anope.pid
|
||||
|
||||
# Name of the executable
|
||||
ANOPROG=services
|
||||
ANOPROG=anope
|
||||
|
||||
# Parameters to pass to the executable
|
||||
ANOARGS=""
|
||||
@@ -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
|
||||
-1551
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* Example configuration file for Global.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
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"
|
||||
|
||||
/*
|
||||
* The username of the Global client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the Global client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the Global client.
|
||||
*/
|
||||
gecos = "Global Noticer"
|
||||
|
||||
/*
|
||||
* 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"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "GL"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core Global module.
|
||||
*
|
||||
* Provides essential functionality for Global.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "global"
|
||||
|
||||
/*
|
||||
* The name of the client that should be Global.
|
||||
*/
|
||||
client = "Global"
|
||||
|
||||
/*
|
||||
* This is the global message that will be sent when Anope is being
|
||||
* shutdown/restarted.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#globaloncycledown = "Services are restarting, they will be back shortly - please be good while they're gone"
|
||||
|
||||
/*
|
||||
* This is the global message that will be sent when Anope (re)joins the
|
||||
* network.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#globaloncycleup = "Services are now back online - have a nice day"
|
||||
|
||||
/*
|
||||
* If set, Anope will hide the IRC Operator's nick in a global
|
||||
* message/notice.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#anonymousglobal = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* Core Global commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "Global"; name = "HELP"; command = "generic/help"; }
|
||||
|
||||
/*
|
||||
* gl_global
|
||||
*
|
||||
* Provides the command global/global.
|
||||
*
|
||||
* Used for sending a message to every online user.
|
||||
*/
|
||||
module { name = "gl_global" }
|
||||
command { service = "Global"; name = "GLOBAL"; command = "global/global"; permission = "global/global"; }
|
||||
|
||||
/*
|
||||
* gl_queue
|
||||
*
|
||||
* Provides the command global/queue.
|
||||
*
|
||||
* Used for queuing messages to send to every online user.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "gl_queue"
|
||||
|
||||
/* The maximum number of messages in a message queue. Defaults to 10. */
|
||||
maxqueue = 10
|
||||
}
|
||||
command { service = "Global"; name = "QUEUE"; command = "global/queue"; permission = "global/queue"; }
|
||||
|
||||
/*
|
||||
* gl_server
|
||||
*
|
||||
* Provides the command global/server.
|
||||
*
|
||||
* Used for sending a message to every online user on a server.
|
||||
*/
|
||||
module { name = "gl_server" }
|
||||
command { service = "Global"; name = "SERVER"; command = "global/server"; permission = "global/server"; }
|
||||
@@ -0,0 +1,204 @@
|
||||
/*
|
||||
* Example configuration file for HostServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
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"
|
||||
|
||||
/*
|
||||
* The username of the HostServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the HostServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the HostServ client.
|
||||
*/
|
||||
gecos = "vHost 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"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "HS"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core HostServ module.
|
||||
*
|
||||
* Provides essential functionality for HostServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "hostserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be HostServ.
|
||||
*/
|
||||
client = "HostServ"
|
||||
|
||||
/*
|
||||
* If enabled, vhosts are activated on users immediately when they are set.
|
||||
*/
|
||||
activate_on_set = yes
|
||||
|
||||
/*
|
||||
* If enabled, vhosts are activated on users immediately when they log out of an operator account.
|
||||
*/
|
||||
activate_on_deoper = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* Core HostServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "HostServ"; name = "HELP"; command = "generic/help"; }
|
||||
|
||||
/*
|
||||
* hs_del
|
||||
*
|
||||
* Provides the commands hostserv/del and hostserv/delall.
|
||||
*
|
||||
* Used for removing users' vHosts.
|
||||
*/
|
||||
module { name = "hs_del" }
|
||||
command { service = "HostServ"; name = "DEL"; command = "hostserv/del"; permission = "hostserv/del"; }
|
||||
command { service = "HostServ"; name = "DELALL"; command = "hostserv/delall"; permission = "hostserv/del"; }
|
||||
|
||||
/*
|
||||
* hs_group
|
||||
*
|
||||
* Provides the command hostserv/group.
|
||||
*
|
||||
* Used for grouping one vHost to many nicks.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "hs_group"
|
||||
|
||||
/*
|
||||
* Upon nickserv/group, this option syncs the nick's main vHost to the grouped nick.
|
||||
*/
|
||||
syncongroup = true
|
||||
|
||||
/*
|
||||
* This makes vhosts act as if they are per account.
|
||||
*/
|
||||
synconset = true
|
||||
}
|
||||
command { service = "HostServ"; name = "GROUP"; command = "hostserv/group"; }
|
||||
|
||||
/*
|
||||
* hs_list
|
||||
*
|
||||
* Provides the command hostserv/list.
|
||||
*
|
||||
* Used for listing actively set vHosts.
|
||||
*/
|
||||
module { name = "hs_list" }
|
||||
command { service = "HostServ"; name = "LIST"; command = "hostserv/list"; permission = "hostserv/list"; }
|
||||
|
||||
/*
|
||||
* hs_off
|
||||
*
|
||||
* Provides the command hostserv/off.
|
||||
*
|
||||
* Used for turning off your vHost.
|
||||
*/
|
||||
module { name = "hs_off" }
|
||||
command { service = "HostServ"; name = "OFF"; command = "hostserv/off"; }
|
||||
|
||||
/*
|
||||
* hs_on
|
||||
*
|
||||
* Provides the command hostserv/on.
|
||||
*
|
||||
* Used for turning on your vHost.
|
||||
*/
|
||||
module { name = "hs_on" }
|
||||
command { service = "HostServ"; name = "ON"; command = "hostserv/on"; }
|
||||
|
||||
/*
|
||||
* hs_request
|
||||
*
|
||||
* Provides the commands hostserv/request, hostserv/activate, hostserv/reject, and hostserv/waiting.
|
||||
*
|
||||
* Used to manage vHosts requested by users.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "hs_request"
|
||||
|
||||
/*
|
||||
* If set, Anope will send a memo to the user requesting a vHost when it's been
|
||||
* approved or rejected.
|
||||
*/
|
||||
#memouser = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will send a memo to all services staff when a new vHost is requested.
|
||||
*/
|
||||
#memooper = yes
|
||||
}
|
||||
command { service = "HostServ"; name = "REQUEST"; command = "hostserv/request"; }
|
||||
command { service = "HostServ"; name = "ACTIVATE"; command = "hostserv/activate"; permission = "hostserv/set"; }
|
||||
command { service = "HostServ"; name = "REJECT"; command = "hostserv/reject"; permission = "hostserv/set"; }
|
||||
command { service = "HostServ"; name = "WAITING"; command = "hostserv/waiting"; permission = "hostserv/set"; }
|
||||
|
||||
/*
|
||||
* hs_set
|
||||
*
|
||||
* Provides the commands hostserv/set and hostserv/setall.
|
||||
*
|
||||
* Used for setting users' vHosts.
|
||||
*/
|
||||
module { name = "hs_set" }
|
||||
command { service = "HostServ"; name = "SET"; command = "hostserv/set"; permission = "hostserv/set"; }
|
||||
command { service = "HostServ"; name = "SETALL"; command = "hostserv/setall"; permission = "hostserv/set"; }
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* 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 = "@#stats,#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 stats 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"
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
/*
|
||||
* Example configuration file for MemoServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
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"
|
||||
|
||||
/*
|
||||
* The username of the MemoServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the MemoServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the MemoServ client.
|
||||
*/
|
||||
gecos = "Memo 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"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "MS"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core MemoServ module.
|
||||
*
|
||||
* Provides essential functionality for MemoServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "memoserv"
|
||||
/*
|
||||
* The name of the client that should be MemoServ. Clients are configured
|
||||
* with the service blocks.
|
||||
*/
|
||||
client = "MemoServ"
|
||||
|
||||
/*
|
||||
* The maximum number of memos a user is allowed to keep by default. Normal users may set the
|
||||
* limit anywhere between 0 and this value. Services Admins can change it to any value or
|
||||
* disable it.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, the limit is disabled
|
||||
* by default, and normal users can set any limit they want.
|
||||
*/
|
||||
maxmemos = 20
|
||||
|
||||
/*
|
||||
* The delay between consecutive uses of the MemoServ SEND command. This can help prevent spam
|
||||
* as well as denial-of-service attacks from sending large numbers of memos and filling up disk
|
||||
* space (and memory). The default 3-second wait means a maximum average of 150 bytes of memo
|
||||
* per second per user under the current IRC protocol.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
senddelay = 30s
|
||||
}
|
||||
|
||||
/*
|
||||
* Core MemoServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "MemoServ"; name = "HELP"; command = "generic/help"; }
|
||||
|
||||
/*
|
||||
* ms_cancel
|
||||
*
|
||||
* Provides the command memoserv/cancel.
|
||||
*
|
||||
* Used to cancel memos already sent but not yet read.
|
||||
*/
|
||||
module { name = "ms_cancel" }
|
||||
command { service = "MemoServ"; name = "CANCEL"; command = "memoserv/cancel"; }
|
||||
|
||||
/*
|
||||
* ms_check
|
||||
*
|
||||
* Provides the command memoserv/check.
|
||||
*
|
||||
* Used to check if a sent memo has been read.
|
||||
*/
|
||||
module { name = "ms_check" }
|
||||
command { service = "MemoServ"; name = "CHECK"; command = "memoserv/check"; }
|
||||
|
||||
/*
|
||||
* ms_del
|
||||
*
|
||||
* Provides the command memoserv/del.
|
||||
*
|
||||
* Used to delete your memos.
|
||||
*/
|
||||
module { name = "ms_del" }
|
||||
command { service = "MemoServ"; name = "DEL"; command = "memoserv/del"; }
|
||||
|
||||
/*
|
||||
* ms_ignore
|
||||
*
|
||||
* Provides the command memoserv/ignore.
|
||||
*
|
||||
* Used to ignore memos from specific users.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ms_ignore"
|
||||
|
||||
/*
|
||||
* The maximum number of entries that may be on a memo ignore list.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
max = 50
|
||||
}
|
||||
command { service = "MemoServ"; name = "IGNORE"; command = "memoserv/ignore"; }
|
||||
|
||||
/*
|
||||
* ms_info
|
||||
*
|
||||
* Provides the command memoserv/info.
|
||||
*
|
||||
* Used to show memo related information about an account or a channel.
|
||||
*/
|
||||
module { name = "ms_info" }
|
||||
command { service = "MemoServ"; name = "INFO"; command = "memoserv/info"; }
|
||||
|
||||
/*
|
||||
* ms_list
|
||||
*
|
||||
* Provides the command memoserv/list.
|
||||
*
|
||||
* Used to list your current memos.
|
||||
*/
|
||||
module { name = "ms_list" }
|
||||
command { service = "MemoServ"; name = "LIST"; command = "memoserv/list"; }
|
||||
|
||||
/*
|
||||
* ms_read
|
||||
*
|
||||
* Provides the command memoserv/read.
|
||||
*
|
||||
* Used to read your memos.
|
||||
*/
|
||||
module { name = "ms_read" }
|
||||
command { service = "MemoServ"; name = "READ"; command = "memoserv/read"; }
|
||||
|
||||
/*
|
||||
* ms_rsend
|
||||
*
|
||||
* Provides the command memoserv/rsend.
|
||||
*
|
||||
* Used to send a memo requiring a receipt be sent back once it is read.
|
||||
*
|
||||
* Requires configuring memoserv:memoreceipt.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ms_rsend"
|
||||
|
||||
/*
|
||||
* Only allow Services Operators to use ms_rsend.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
operonly = false
|
||||
}
|
||||
#command { service = "MemoServ"; name = "RSEND"; command = "memoserv/rsend"; }
|
||||
|
||||
/*
|
||||
* ms_send
|
||||
*
|
||||
* Provides the command memoserv/send.
|
||||
*
|
||||
* Used to send memos.
|
||||
*/
|
||||
module { name = "ms_send" }
|
||||
command { service = "MemoServ"; name = "SEND"; command = "memoserv/send"; }
|
||||
|
||||
/*
|
||||
* ms_sendall
|
||||
*
|
||||
* Provides the command memoserv/sendall.
|
||||
*
|
||||
* Used to send a mass memo to every registered user.
|
||||
*/
|
||||
module { name = "ms_sendall" }
|
||||
command { service = "MemoServ"; name = "SENDALL"; command = "memoserv/sendall"; permission = "memoserv/sendall"; }
|
||||
|
||||
/*
|
||||
* ms_set
|
||||
*
|
||||
* Provides the command memoserv/set.
|
||||
*
|
||||
* Used to set settings such as how you are notified of new memos, and your memo limit.
|
||||
*/
|
||||
module { name = "ms_set" }
|
||||
command { service = "MemoServ"; name = "SET"; command = "memoserv/set"; }
|
||||
|
||||
/*
|
||||
* ms_staff
|
||||
*
|
||||
* Provides the command memoserv/staff.
|
||||
*
|
||||
* Used to send a memo to all registered staff members.
|
||||
*/
|
||||
module { name = "ms_staff" }
|
||||
command { service = "MemoServ"; name = "STAFF"; command = "memoserv/staff"; permission = "memoserv/staff"; }
|
||||
@@ -0,0 +1,892 @@
|
||||
/*
|
||||
* [OPTIONAL] Non-Core Modules
|
||||
*
|
||||
* 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 Anope 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.
|
||||
*/
|
||||
|
||||
/*
|
||||
* help
|
||||
*
|
||||
* Provides the command generic/help.
|
||||
*
|
||||
* This is a generic help command that can be used with any client.
|
||||
*/
|
||||
module { name = "help" }
|
||||
|
||||
/*
|
||||
* dns
|
||||
*
|
||||
* Adds support for the DNS protocol. By itself this module does nothing useful,
|
||||
* but other modules such as dnsbl and os_dns require this.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "dns"
|
||||
|
||||
/*
|
||||
* The nameserver to use for resolving hostnames, must be an IP or a resolver configuration file.
|
||||
* The below should work fine on all UNIX-like systems. Windows users will have to find their nameservers
|
||||
* from ipconfig /all and put the IP here.
|
||||
*/
|
||||
nameserver = "/etc/resolv.conf"
|
||||
#nameserver = "127.0.0.1"
|
||||
|
||||
/*
|
||||
* How long to wait in seconds before a DNS query has timed out.
|
||||
*/
|
||||
timeout = 5
|
||||
|
||||
|
||||
/* Only edit below if you are expecting to use os_dns or otherwise answer DNS queries. */
|
||||
|
||||
/*
|
||||
* The IP and port services use to listen for DNS queries.
|
||||
* Note that ports less than 1024 are privileged on UNIX/Linux systems, and
|
||||
* require Anope to be started as root. If you do this, it is recommended you
|
||||
* set options:user and options:group so Anope can change users after binding
|
||||
* to this port.
|
||||
*/
|
||||
ip = "0.0.0.0"
|
||||
port = 53
|
||||
|
||||
|
||||
/*
|
||||
* SOA record information.
|
||||
*/
|
||||
|
||||
/* Email address of the DNS administrator. */
|
||||
admin = "admin@example.com"
|
||||
|
||||
/* This should be the names of the public facing nameservers serving the records. */
|
||||
nameservers = "ns1.example.com ns2.example.com"
|
||||
|
||||
/* The time slave servers are allowed to cache. This should be reasonably low
|
||||
* if you want your records to be updated without much delay.
|
||||
*/
|
||||
refresh = 3600
|
||||
|
||||
/* A notify block. There should probably be one per nameserver listed in 'nameservers'.
|
||||
*/
|
||||
notify
|
||||
{
|
||||
ip = "192.0.2.0"
|
||||
port = 53
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* dnsbl
|
||||
*
|
||||
* Allows configurable DNS blacklists to check connecting users against. If a user
|
||||
* is found on the blacklist they will be immediately banned. This is a crucial module
|
||||
* to prevent bot attacks.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "dnsbl"
|
||||
|
||||
/*
|
||||
* If set, Anope will check clients against the DNSBLs when services connect to its uplink.
|
||||
* This is not recommended, and on large networks will open a very large amount of DNS queries.
|
||||
* Whilst services are not drastically affected by this, your nameserver/DNSBL might care.
|
||||
*/
|
||||
check_on_connect = no
|
||||
|
||||
/*
|
||||
* If set, Anope will check clients when coming back from a netsplit. This can cause a large number
|
||||
* of DNS queries open at once. Whilst services are not drastically affected by this, your nameserver/DNSBL
|
||||
* might care.
|
||||
*/
|
||||
check_on_netburst = no
|
||||
|
||||
/*
|
||||
* If set, OperServ will add clients found in the DNSBL to the akill list. Without it, OperServ simply sends
|
||||
* a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being fill up by bots.
|
||||
*/
|
||||
add_to_akill = yes
|
||||
|
||||
blacklist
|
||||
{
|
||||
/* Name of the blacklist. */
|
||||
name = "rbl.efnetrbl.org"
|
||||
|
||||
/* How long to set the ban for. */
|
||||
time = 4h
|
||||
|
||||
/* Reason for akill.
|
||||
* {nick} is the nick of the user
|
||||
* {user} is the ident/username of the user
|
||||
* {real} is the realname of the user
|
||||
* {host} is the hostname of the user
|
||||
* {ip} is the IP of the user
|
||||
* {reply} is the reply reason (configured below). Will be nothing if not configured.
|
||||
* {network} is the network name set in networkinfo:networkname
|
||||
*/
|
||||
reason = "You are listed in the EFnet RBL, visit https://rbl.efnetrbl.org/?i={ip} for info"
|
||||
|
||||
/* Replies to ban and their reason. If no replies 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
|
||||
{
|
||||
name = "dnsbl.dronebl.org"
|
||||
time = 4h
|
||||
reason = "You have a host listed in the DroneBL. For more information, visit https://dronebl.org/lookup?ip={ip}&network={network}"
|
||||
}
|
||||
|
||||
/* Exempt localhost from DNSBL checks */
|
||||
exempt { ip = "127.0.0.0/8" }
|
||||
}
|
||||
|
||||
/*
|
||||
* helpchan
|
||||
*
|
||||
* Gives users who are op in the specified help channel usermode +h (helpop).
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "helpchan"
|
||||
|
||||
helpchannel = "#help"
|
||||
}
|
||||
|
||||
/*
|
||||
* httpd
|
||||
*
|
||||
* Allows services to serve web pages. By itself, this module does nothing useful.
|
||||
*
|
||||
* Note that using this will allow users to get the IP of your services.
|
||||
* To prevent this we recommend using a reverse proxy or a tunnel.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "httpd"
|
||||
|
||||
httpd
|
||||
{
|
||||
/* Name of this service. */
|
||||
name = "httpd/main"
|
||||
|
||||
/* IP to listen on. */
|
||||
ip = "0.0.0.0"
|
||||
|
||||
/* Port to listen on. */
|
||||
port = 8080
|
||||
|
||||
/* Time before connections to this server are timed out. */
|
||||
timeout = 30
|
||||
|
||||
/* Listen using SSL. Requires an SSL module. */
|
||||
#ssl = yes
|
||||
|
||||
/* If you are using a reverse proxy that sends one of the
|
||||
* extforward_headers set below, set this to its IP.
|
||||
* This allows services to obtain the real IP of users by
|
||||
* reading the forwarded-for HTTP header.
|
||||
* Multiple IP addresses can be specified separated by a space character.
|
||||
*/
|
||||
#extforward_ip = "192.168.0.255 192.168.1.255"
|
||||
|
||||
/* The header to look for. These probably work as is. */
|
||||
extforward_header = "X-Forwarded-For Forwarded-For"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ldap [EXTRA]
|
||||
*
|
||||
* This module allows other modules to use LDAP. By itself, this module does nothing useful.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ldap"
|
||||
|
||||
ldap
|
||||
{
|
||||
server = "ldap://127.0.0.1"
|
||||
|
||||
/*
|
||||
* Admin credentials used for performing searches and adding users.
|
||||
*/
|
||||
admin_binddn = "cn=Manager,dc=anope,dc=org"
|
||||
admin_password = "secret"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* ldap_authentication
|
||||
*
|
||||
* This module allows many commands such as IDENTIFY, RELEASE, RECOVER, GHOST, etc. use
|
||||
* LDAP to authenticate users. Requires ldap.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ldap_authentication"
|
||||
|
||||
/*
|
||||
* The distinguished name used for searching for users's accounts.
|
||||
*/
|
||||
basedn = "ou=users,dc=anope,dc=org"
|
||||
|
||||
/*
|
||||
* The search filter used to look up users's accounts.
|
||||
* {account} is replaced with the user's account.
|
||||
* {object_class} is replaced with the object_class configured below.
|
||||
*/
|
||||
search_filter = "(&(uid={account})(objectClass={object_class}))"
|
||||
|
||||
/*
|
||||
* The object class used by LDAP to store user account information.
|
||||
* This is used for adding new users to LDAP if registration is allowed.
|
||||
*/
|
||||
object_class = "anopeUser"
|
||||
|
||||
/*
|
||||
* The attribute value used for account names.
|
||||
*/
|
||||
username_attribute = "uid"
|
||||
|
||||
/*
|
||||
* The attribute value used for email addresses.
|
||||
* This directive is optional.
|
||||
*/
|
||||
email_attribute = "email"
|
||||
|
||||
/*
|
||||
* The attribute value used for passwords.
|
||||
* Used when registering new accounts in LDAP.
|
||||
*/
|
||||
password_attribute = "userPassword"
|
||||
|
||||
/*
|
||||
* 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 https://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 https://some.misconfigured.site"
|
||||
}
|
||||
|
||||
/*
|
||||
* ldap_oper
|
||||
*
|
||||
* This module dynamically ties users to Anope opertypes when they identify
|
||||
* via LDAP group membership. Requires ldap.
|
||||
*
|
||||
* Note that this doesn't give the user privileges on the IRCd, only in Anope.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ldap_oper"
|
||||
|
||||
/*
|
||||
* An optional binddn to use when searching for groups.
|
||||
* {account} is replaced with the account name of the user.
|
||||
*/
|
||||
#binddn = "cn=Manager,dc=anope,dc=org"
|
||||
|
||||
/*
|
||||
* An optional password to bind with.
|
||||
*/
|
||||
#password = "secret"
|
||||
|
||||
/*
|
||||
* The base DN where the groups are.
|
||||
*/
|
||||
basedn = "ou=groups,dc=anope,dc=org"
|
||||
|
||||
/*
|
||||
* The filter to use when searching for users.
|
||||
* {account} is replaced with the account name of the user.
|
||||
*/
|
||||
filter = "(member=uid={account},ou=users,dc=anope,dc=org)"
|
||||
|
||||
/*
|
||||
* The attribute of the group that is the name of the opertype.
|
||||
* The cn attribute should match a known opertype in the config.
|
||||
*/
|
||||
opertype_attribute = "cn"
|
||||
}
|
||||
|
||||
/*
|
||||
* mysql [EXTRA]
|
||||
*
|
||||
* This module allows other modules to use MySQL.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "mysql"
|
||||
|
||||
mysql
|
||||
{
|
||||
/* The name of this service. */
|
||||
name = "mysql/main"
|
||||
database = "anope"
|
||||
server = "127.0.0.1"
|
||||
username = "anope"
|
||||
password = "mypassword"
|
||||
port = 3306
|
||||
socket = ""
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* redis
|
||||
*
|
||||
* This module allows other modules to use Redis.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "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
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* regex_pcre2 [EXTRA]
|
||||
*
|
||||
* Provides the regex engine regex/pcre, which uses version 2 of the Perl Compatible Regular
|
||||
* Expressions library.
|
||||
*/
|
||||
#module { name = "regex_pcre2" }
|
||||
|
||||
/*
|
||||
* regex_posix [EXTRA]
|
||||
*
|
||||
* Provides the regex engine regex/posix, which uses the POSIX compliant regular expressions.
|
||||
*/
|
||||
#module { name = "regex_posix" }
|
||||
|
||||
/*
|
||||
* regex_stdlib
|
||||
*
|
||||
* Provides the regex engine regex/stdlib, which uses the regular expression library that is part of
|
||||
* the C++ standard library.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "regex_stdlib"
|
||||
|
||||
/*
|
||||
* The syntax scheme to use. Can be set to awk to use the regular expression grammar used by the
|
||||
* awk utility in POSIX, basic to use the basic POSIX regular expression grammar, ecmascript to
|
||||
* use the modified ECMAScript regular expression grammar, egrep to use the regular expression
|
||||
* grammar used by the grep utility with the -E option in POSIX, extended to use the extended
|
||||
* POSIX regular expression grammar, or grep to use the regular expression grammar used by the
|
||||
* grep utility in POSIX.
|
||||
*
|
||||
* See https://en.cppreference.com/w/cpp/regex/syntax_option_type for more information.
|
||||
*/
|
||||
syntax = "ecmascript"
|
||||
}
|
||||
|
||||
/*
|
||||
* regex_tre [EXTRA]
|
||||
*
|
||||
* Provides the regex engine regex/tre, which uses the TRE regex library.
|
||||
*/
|
||||
#module { name = "regex_tre" }
|
||||
|
||||
/*
|
||||
* rewrite
|
||||
*
|
||||
* Allows rewriting commands sent to/from clients.
|
||||
*/
|
||||
#module { name = "rewrite" }
|
||||
#command
|
||||
{
|
||||
service = "ChanServ"; name = "CLEAR"; command = "rewrite"
|
||||
|
||||
/* Enable 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, e.g. $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"
|
||||
}
|
||||
|
||||
/*
|
||||
* proxyscan
|
||||
*
|
||||
* This module allows you to scan connecting clients for open proxies.
|
||||
* Note that using this will allow users to get the IP of your services.
|
||||
*
|
||||
* Currently the two supported proxy types are HTTP and SOCKS5.
|
||||
*
|
||||
* The proxy scanner works by attempting to connect to clients when they
|
||||
* connect to the network, and if they have a proxy running instruct it to connect
|
||||
* back to services. If services are able to connect through the proxy to itself
|
||||
* then it knows it is an insecure proxy, and will ban it.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "proxyscan"
|
||||
|
||||
/*
|
||||
* The target IP services tells the proxy to connect back to. This must be a publicly
|
||||
* available IP that remote proxies can connect to.
|
||||
*/
|
||||
#target_ip = "127.0.0.1"
|
||||
|
||||
/*
|
||||
* The port services tells the proxy to connect to.
|
||||
*/
|
||||
target_port = 7226
|
||||
|
||||
/*
|
||||
* The listen IP services listen on for incoming connections from suspected proxies.
|
||||
* This probably will be the same as target_ip, but may not be if you are behind a firewall (NAT).
|
||||
*/
|
||||
#listen_ip = "127.0.0.1"
|
||||
|
||||
/*
|
||||
* The port services should listen on for incoming connections from suspected proxies.
|
||||
* This most likely will be the same as target_port.
|
||||
*/
|
||||
listen_port = 7226
|
||||
|
||||
/*
|
||||
* An optional notice sent to clients upon connect.
|
||||
*/
|
||||
#connect_notice = "We will now scan your host for insecure proxies. If you do not consent to this scan please disconnect immediately."
|
||||
|
||||
/*
|
||||
* Who the notice should be sent from.
|
||||
*/
|
||||
#connect_source = "OperServ"
|
||||
|
||||
/*
|
||||
* If set, OperServ will add infected clients to the akill list. Without it, OperServ simply sends
|
||||
* a timed G/K-line to the IRCd and forgets about it. Can be useful if your akill list is being filled up by bots.
|
||||
*/
|
||||
add_to_akill = yes
|
||||
|
||||
/*
|
||||
* How long before connections should be timed out.
|
||||
*/
|
||||
timeout = 5
|
||||
|
||||
proxyscan
|
||||
{
|
||||
/* The type of proxy to check for. A comma separated list is allowed. */
|
||||
type = "HTTP"
|
||||
|
||||
/* The ports to check. */
|
||||
port = "80,8080"
|
||||
|
||||
/* How long to set the ban for. */
|
||||
time = 4h
|
||||
|
||||
/*
|
||||
* The reason to ban the user for.
|
||||
* {type} is replaced with the type of proxy found.
|
||||
* {ip} is replaced with the IP of proxy found.
|
||||
* {port} is replaced with the port.
|
||||
*/
|
||||
reason = "You have an open proxy running on your host ({type}:{ip}:{port})"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 ssl_gnutls or ssl_openssl, but not both.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ssl_gnutls"
|
||||
|
||||
/*
|
||||
* An optional certificate and key for ssl_gnutls to give to the uplink. All
|
||||
* paths are relative to the config directory.
|
||||
*
|
||||
* You can generate your own certificate and key pair by using:
|
||||
*
|
||||
* certtool --generate-privkey --bits 2048 --outfile privkey.pem
|
||||
* certtool --generate-self-signed --load-privkey privkey.pem --outfile fullchain.pem
|
||||
*
|
||||
*/
|
||||
cert = "fullchain.pem"
|
||||
key = "privkey.pem"
|
||||
|
||||
/*
|
||||
* 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 = "dhparams.pem"
|
||||
}
|
||||
|
||||
/*
|
||||
* 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 ssl_openssl or ssl_gnutls, but not both.
|
||||
*
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ssl_openssl"
|
||||
|
||||
/*
|
||||
* An optional certificate and key for ssl_openssl to give to the uplink.
|
||||
* All paths are relative to the config directory.
|
||||
*
|
||||
* You can generate your own certificate and key pair by using:
|
||||
*
|
||||
* openssl genrsa -out privkey.pem 2048
|
||||
* openssl req -new -x509 -key privkey.pem -out fullchain.pem -days 1095
|
||||
*/
|
||||
cert = "fullchain.pem"
|
||||
key = "privkey.pem"
|
||||
|
||||
/*
|
||||
* If you wish to increase security you can disable support for older
|
||||
* versions of TLS with no known vulnerabilities but that provide less
|
||||
* security. For your security SSLv2 and SSLv3 are always disabled.
|
||||
*/
|
||||
#tlsv10 = no
|
||||
#tlsv11 = no
|
||||
#tlsv12 = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* sql_authentication
|
||||
*
|
||||
* This module allows authenticating users against an external SQL database using a custom
|
||||
* query.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "sql_authentication"
|
||||
|
||||
/* SQL engine to use. Should be configured elsewhere with mysql, sqlite, etc. */
|
||||
engine = "mysql/main"
|
||||
|
||||
/* Query to execute to authenticate. A non empty result from this query is considered a success,
|
||||
* and the user will be authenticated.
|
||||
*
|
||||
* @a@ is replaced with the user's account name
|
||||
* @p@ is replaced with the user's password
|
||||
* @n@ is replaced with the user's nickname
|
||||
* @i@ is replaced with the user's IP
|
||||
*
|
||||
* Note that @n@ and @i@ may not always exist in the case of a user identifying outside of the normal
|
||||
* nickserv/identify command, such as through the web panel.
|
||||
*
|
||||
* Furthermore, if a field named email is returned from this query the user's email is
|
||||
* set to its value.
|
||||
*
|
||||
*
|
||||
* We've included some example queries for some popular website/forum systems.
|
||||
*
|
||||
* Drupal 6: "SELECT `mail` AS `email` FROM `users` WHERE `name` = @a@ AND `pass` = MD5(@p@) AND `status` = 1"
|
||||
* e107 cms: "SELECT `user_email` AS `email` FROM `e107_user` WHERE `user_loginname` = @a@ AND `user_password` = MD5(@p@)"
|
||||
* SMF Forum: "SELECT `email_address` AS `email` FROM `smf_members` WHERE `member_name` = @a@ AND `passwd` = SHA1(CONCAT(LOWER(@a@), @p@))"
|
||||
* vBulletin: "SELECT `email` FROM `user` WHERE `username` = @a@ AND `password` = MD5(CONCAT(MD5(@p@), `salt`))"
|
||||
* IP.Board: "SELECT `email` FROM `ibf_members` WHERE `name` = @a@ AND `members_pass_hash` = MD5(CONCAT(MD5(`members_pass_salt`), MD5(@p@)))"
|
||||
*/
|
||||
query = "SELECT `email_addr` AS `email` FROM `my_users` WHERE `username` = @a@ AND `password` = MD5(CONCAT('salt', @p@))"
|
||||
|
||||
/*
|
||||
* If your database uses a password hashing algorithm that can not be compared using a simple
|
||||
* comparison function then you can specify it here to compare locally.
|
||||
*
|
||||
* You will need to have the appropriate encryption module (e.g. enc_bcrypt) loaded in order
|
||||
* for this to work.
|
||||
*/
|
||||
#password_hash = "bcrypt"
|
||||
|
||||
/*
|
||||
* If using the password_hash field (above) you will need to specify the name of the field to
|
||||
* fetch the password from.
|
||||
*
|
||||
* Defaults to "password" if not set.
|
||||
*/
|
||||
#password_field = "password"
|
||||
|
||||
/*
|
||||
* If set, the reason to give the users who try to "/msg NickServ REGISTER".
|
||||
* If not set, then registration is not blocked.
|
||||
*/
|
||||
#disable_reason = "To register on this network visit https://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 https://some.misconfigured.site"
|
||||
}
|
||||
|
||||
/*
|
||||
* sql_log
|
||||
*
|
||||
* This module adds an additional target option to log{} blocks
|
||||
* that allows logging Service's logs to SQL. To log to SQL, add
|
||||
* the SQL service name to log:targets prefixed by sql_log:. For
|
||||
* example:
|
||||
*
|
||||
* log
|
||||
* {
|
||||
* targets = "services.log sql_log:mysql/main"
|
||||
* ...
|
||||
* }
|
||||
*
|
||||
* By default this module logs to the table `logs`, and will create
|
||||
* it if it doesn't exist. This module does not create any indexes (keys)
|
||||
* on the table and it is recommended you add them yourself as necessary.
|
||||
*/
|
||||
#module { name = "sql_log" }
|
||||
|
||||
/*
|
||||
* sql_oper
|
||||
*
|
||||
* This module allows granting users services operator privileges and possibly IRC Operator
|
||||
* privileges based on an external SQL database using a custom query.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "sql_oper"
|
||||
|
||||
/* SQL engine to use. Should be configured elsewhere with mysql, sqlite, etc. */
|
||||
engine = "mysql/main"
|
||||
|
||||
/* Query to execute to determine if a user should have operator privileges.
|
||||
* A field named opertype must be returned in order to link the user to their oper type.
|
||||
* The oper types must be configured earlier in anope.conf.
|
||||
*
|
||||
* If a field named modes is returned from this query then those modes are set on the user.
|
||||
* Without this, only a simple +o is sent.
|
||||
*
|
||||
* @a@ is replaced with the user's account name
|
||||
* @i@ is replaced with the user's IP
|
||||
*/
|
||||
query = "SELECT `opertype` FROM `my_users` WHERE `user_name` = @a@"
|
||||
}
|
||||
|
||||
/*
|
||||
* sqlite [EXTRA]
|
||||
*
|
||||
* This module allows other modules to use SQLite.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "sqlite"
|
||||
|
||||
/* A SQLite database */
|
||||
sqlite
|
||||
{
|
||||
/* The name of this service. */
|
||||
name = "sqlite/main"
|
||||
|
||||
/* The database name, it will be created if it does not exist. */
|
||||
database = "anope.sqlite"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* webcpanel
|
||||
*
|
||||
* This module creates a web configuration panel that allows users and operators to perform any task
|
||||
* as they could over IRC. If you are using the default configuration you should be able to access
|
||||
* this panel by visiting http://127.0.0.1:8080 in your web browser from the machine Anope is running on.
|
||||
*
|
||||
* This module requires httpd.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "webcpanel"
|
||||
|
||||
/* Web server to use. */
|
||||
server = "httpd/main"
|
||||
|
||||
/*
|
||||
* The directory containing the webcpanel templates. This is relative to the
|
||||
* data directory.
|
||||
*/
|
||||
template_dir = "webcpanel/templates/default"
|
||||
|
||||
/* Page title. */
|
||||
title = "Anope IRC Services"
|
||||
}
|
||||
|
||||
/*
|
||||
* jsonrpc
|
||||
*
|
||||
* 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 (rpc_main) to receive and send JSON-RPC queries.
|
||||
*
|
||||
* IMPORTANT: this can not be loaded at the same time as the xmlrpc module.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "jsonrpc"
|
||||
|
||||
/* Web service to use. Requires httpd. */
|
||||
server = "httpd/main"
|
||||
}
|
||||
|
||||
/*
|
||||
* [EXTRA] 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 (rpc_main) to receive and send XMLRPC queries.
|
||||
*
|
||||
* IMPORTANT: this can not be loaded at the same time as the jsonrpc module.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "xmlrpc"
|
||||
|
||||
/* Web service to use. Requires httpd. */
|
||||
server = "httpd/main"
|
||||
|
||||
/*
|
||||
* Whether to enable the use of XML-RPC extensions.
|
||||
*
|
||||
* By default Anope will use some extended XML-RPC types. If your XML-RPC
|
||||
* client can not handle these you will need to disable them.
|
||||
*
|
||||
* If i8 is disabled a string will be used for values outside of the range
|
||||
* supported by the 32-bit int data type.
|
||||
*
|
||||
* If nil is disabled an empty struct will be used instead.
|
||||
*/
|
||||
#enable_i8 = no
|
||||
#enable_nil = no
|
||||
}
|
||||
|
||||
/*
|
||||
* rpc_data
|
||||
*
|
||||
* Adds support for the following RPC methods:
|
||||
*
|
||||
* anope.listAccounts anope.account
|
||||
* anope.listChannels anope.channel
|
||||
* anope.listOpers anope.oper
|
||||
* anope.listServers anope.server
|
||||
* anope.listUsers anope.user
|
||||
*
|
||||
* Requires either the jsonrpc or xmlrpc module.
|
||||
*
|
||||
* See docs/RPC/rpc_data.md for API documentation.
|
||||
*/
|
||||
#module { name = "rpc_data" }
|
||||
|
||||
/*
|
||||
* rpc_main
|
||||
*
|
||||
* Adds the main RPC core functions.
|
||||
* Requires xmlrpc.
|
||||
*/
|
||||
#module { name = "rpc_main" }
|
||||
|
||||
/*
|
||||
* rpc_message
|
||||
*
|
||||
* Adds support for the following RPC methods:
|
||||
*
|
||||
* anope.messageNetwork anope.messageServer
|
||||
* anope.messageUser
|
||||
*
|
||||
* Requires either the jsonrpc or xmlrpc module.
|
||||
*
|
||||
* See docs/RPC/rpc_message.md for API documentation.
|
||||
*/
|
||||
#module { name = "rpc_message" }
|
||||
|
||||
/*
|
||||
* rpc_system
|
||||
*
|
||||
* Adds support for the following RPC methods:
|
||||
*
|
||||
* system.listMethods
|
||||
*
|
||||
* Requires either the jsonrpc or xmlrpc module.
|
||||
*
|
||||
* See https://gggeek.github.io/phpxmlrpc/doc-1.1/ch08.html for API
|
||||
* documentation.
|
||||
*/
|
||||
#module { name = "rpc_system" }
|
||||
@@ -1,174 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* (C) 2010 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/** Object representing a MySQL query
|
||||
*/
|
||||
class MySQLQuery
|
||||
{
|
||||
/* Our query */
|
||||
private $Query;
|
||||
/* The result */
|
||||
private $Result;
|
||||
/* Socket used to connect to MySQL */
|
||||
private $MysqlSock;
|
||||
|
||||
/** Constructor
|
||||
* @param MysqlSock The MySQL socket
|
||||
*/
|
||||
function __construct($MysqlSock)
|
||||
{
|
||||
$this->MysqlSock = $MysqlSock;
|
||||
}
|
||||
|
||||
/** Destructor
|
||||
*/
|
||||
function __destruct()
|
||||
{
|
||||
}
|
||||
|
||||
/** Execute a query
|
||||
* @return true or false
|
||||
*/
|
||||
private function Execute()
|
||||
{
|
||||
$Res = mysql_query($this->Query, $this->MysqlSock);
|
||||
$this->Result = array();
|
||||
|
||||
if (!empty($Res))
|
||||
{
|
||||
while (($Result = @mysql_fetch_assoc($Res)))
|
||||
{
|
||||
$this->Result[] = $Result;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Get the result for the query
|
||||
* @return The result
|
||||
*/
|
||||
public function Result()
|
||||
{
|
||||
return $this->Result;
|
||||
}
|
||||
|
||||
/** Execute a query
|
||||
* @param A formatted string
|
||||
* @param ... Args
|
||||
* @return true or false
|
||||
*/
|
||||
public function Query($String, $P1 = NULL, $P2 = NULL, $P3 = NULL, $P4 = NULL, $P5 = NULL, $P6 = NULL, $P7 = NULL,
|
||||
$P8 = NULL, $P9 = NULL, $P10 = NULL, $P11 = NULL, $P12 = NULL, $P13 = NULL, $P14 = NULL)
|
||||
{
|
||||
$this->Query = sprintf($String, $P1, $P2, $P3, $P4, $P5, $P6, $P7, $P8, $P9, $P10, $P11, $P12, $P13, $P14);
|
||||
return $this->Execute();
|
||||
|
||||
}
|
||||
|
||||
/** Escape a string to by MySQL safe
|
||||
* @return A new, MySQL safe string
|
||||
*/
|
||||
public function Escape($String)
|
||||
{
|
||||
return mysql_real_escape_string($String, $this->MysqlSock);
|
||||
}
|
||||
}
|
||||
|
||||
/** Main Anope class
|
||||
*/
|
||||
class Anope
|
||||
{
|
||||
/* Socket used to connect to MySQL */
|
||||
private $MysqlSock;
|
||||
/* True if we were able to connect successfully */
|
||||
private $Connected;
|
||||
|
||||
/** Constructor
|
||||
* @param MysqlHost The host of the MySQLd server, port can be included on this too
|
||||
* @param MysqlUser The username to authenticate to MySQL with
|
||||
* @param MysqlPassword The password to authenticate with
|
||||
* @param MysqlDatabase The name of the Anope database
|
||||
*/
|
||||
function __construct($MysqlHost, $MysqlUser, $MysqlPassword, $MysqlDatabase)
|
||||
{
|
||||
$this->Connected = false;
|
||||
$this->MysqlSock = @mysql_connect($MysqlHost, $MysqlUser, $MysqlPassword);
|
||||
if ($this->MysqlSock)
|
||||
$this->Connected = @mysql_select_db($MysqlDatabase, $this->MysqlSock);
|
||||
}
|
||||
|
||||
/** Destructor
|
||||
* Closes the connection to the MySQL server
|
||||
*/
|
||||
function __destruct()
|
||||
{
|
||||
if ($this->MysqlSock)
|
||||
@mysql_close($this->MysqlSock);
|
||||
}
|
||||
|
||||
/** Check if we are connected successfully
|
||||
* @return true or false
|
||||
*/
|
||||
public function Connected()
|
||||
{
|
||||
return $this->Connected;
|
||||
}
|
||||
|
||||
/** Retrieve a new query object
|
||||
* @return A new Query object
|
||||
*/
|
||||
public function Query()
|
||||
{
|
||||
return new MySQLQuery($this->MysqlSock);
|
||||
}
|
||||
|
||||
/** Anope Functions **/
|
||||
|
||||
/** Execute a command in Anope
|
||||
* For more information read docs/MYSQL
|
||||
* @param Nick The nickname to execute the command from
|
||||
* @param Service The service to execute the command on
|
||||
* @param Command The command to execute
|
||||
*/
|
||||
public function Command($Nick, $Service, $Command)
|
||||
{
|
||||
$Query = $this->Query();
|
||||
return $Query->Query("INSERT DELAYED INTO `anope_commands` (nick, service, command) VALUES('%s', '%s', '%s')", $Query->Escape($Nick), $Query->Escape($Service), $Query->Escape($Command));
|
||||
}
|
||||
|
||||
/** Register a nick
|
||||
* @param Nick The nick to be registered
|
||||
* @param Password The password
|
||||
* @param Email The email address to use, defaults to NULL
|
||||
* @param Returns a message confirming or denying the registration process
|
||||
*/
|
||||
public function Register($Nick, $Password, $Email = NULL)
|
||||
{
|
||||
$Query = $this->Query();
|
||||
$Query->Query("SELECT nick FROM `anope_ns_alias` WHERE `nick` = '%s'", $Query->Escape($Nick));
|
||||
$Result = $Query->Result();
|
||||
if (isset($Result[0]['nick']))
|
||||
{
|
||||
return "Nickname already registered";
|
||||
}
|
||||
|
||||
if ($this->Command($Nick, "NickServ", "REGISTER ".$Password." ".$Email))
|
||||
{
|
||||
return "Nick registration successful. If your network has email registration enabled check your inbox for the next step of the registration process.";
|
||||
}
|
||||
|
||||
return "Error registering nick";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -1,59 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
* (C) 2010 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/* This is an example functional webpage showing how to use Anopes MySQL
|
||||
* Execute feature to register a nickname online
|
||||
*/
|
||||
|
||||
/* Include Anope's PHP API */
|
||||
include('Anope.php');
|
||||
|
||||
function IsValidEmail($Email)
|
||||
{
|
||||
return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $Email);
|
||||
}
|
||||
|
||||
if (!empty($_POST['nick']) && !empty($_POST['password1']) && !empty($_POST['password2']) && !empty($_POST['email']))
|
||||
{
|
||||
if ($_POST['password1'] != $_POST['password2'])
|
||||
{
|
||||
echo 'Passwords do not match';
|
||||
}
|
||||
else if (!IsValidEmail($_POST['email']))
|
||||
{
|
||||
echo 'Invalid email address';
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Create a new connection, arguments are hostname, username, password, and database name */
|
||||
$Anope = new Anope("localhost", "anope", "anoperules", "anope");
|
||||
/* Check if we connected */
|
||||
if (!$Anope->Connected())
|
||||
{
|
||||
echo "Error connecting to MySQL database";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $Anope->Register($_POST['nick'], $_POST['password1'], $_POST['email']);
|
||||
}
|
||||
die;
|
||||
}
|
||||
}
|
||||
?>
|
||||
</br>
|
||||
<form method="post" action="Register.php">
|
||||
Nick: <input type="text" name="nick"></br>
|
||||
Password: <input type="password" name="password1"></br>
|
||||
Confirm Password: <input type="password" name="password2"></br>
|
||||
Email: <input type="text" name="email"></br>
|
||||
<input type="submit" value="Submit">
|
||||
</form>
|
||||
|
||||
@@ -0,0 +1,728 @@
|
||||
/*
|
||||
* Example configuration file for NickServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
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"
|
||||
|
||||
/*
|
||||
* The username of the NickServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the NickServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the NickServ client.
|
||||
*/
|
||||
gecos = "Nickname Registration 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"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "NS"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core NickServ module.
|
||||
*
|
||||
* Provides essential functionality for NickServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "nickserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be NickServ.
|
||||
*/
|
||||
client = "NickServ"
|
||||
|
||||
/*
|
||||
* Requires users to give an email address when they register a nick.
|
||||
*
|
||||
* This directive defaults to "yes" and is recommended to be enabled.
|
||||
*/
|
||||
forceemail = yes
|
||||
|
||||
/*
|
||||
* Require users who change their email address to confirm they
|
||||
* own their new email.
|
||||
*
|
||||
* If {ns_register}:registration is set to mail then this defaults
|
||||
* to yes. Otherwise, it defaults to no.
|
||||
*/
|
||||
#confirmemailchanges = yes
|
||||
|
||||
/*
|
||||
* A message sent to users on connect if they use an unregistered nick. {nick} will be replaced with the user's nickname.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#unregistered_notice = "Your nickname is not registered. To register it, use: /msg NickServ REGISTER password email"
|
||||
|
||||
/*
|
||||
* The default options for newly registered nicks. Note that changing these options
|
||||
* will have no effect on nicks which are already registered. The list must be separated
|
||||
* by spaces.
|
||||
*
|
||||
* The options are:
|
||||
* - ns_private: Hide the nick from NickServ's LIST command
|
||||
* - hide_email: Hide the nick's email address from NickServ's INFO command
|
||||
* - hide_mask: Hide the nick's last or current user@host from NickServ's INFO command
|
||||
* - hide_status: Hide the nick's services operator access status from NickServ's INFO command
|
||||
* - hide_quit: Hide the nick's last quit message from NickServ's INFO command
|
||||
* - 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
|
||||
* - neverop: User can not be added to access lists
|
||||
* - msg: Messages will be sent as PRIVMSGs instead of NOTICEs
|
||||
* - ns_keep_modes: Enables keepmodes, which retains user modes across sessions
|
||||
* - protect: Protects the registered nickname from use by unidentified users.
|
||||
*
|
||||
* This directive is optional, if left blank, the options will default to memo_signon, and
|
||||
* memo_receive. If you really want no defaults, use "none" by itself as the option.
|
||||
*/
|
||||
defaults = "autoop hide_email hide_mask memo_receive memo_signon ns_private protect"
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of NickServ's REGISTER command. This
|
||||
* directive is optional, but recommended. If not set, this restriction will be disabled.
|
||||
*/
|
||||
regdelay = 5m
|
||||
|
||||
/*
|
||||
* The length of time before a nick's registration expires.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, the default is one year.
|
||||
*/
|
||||
expire = 1y
|
||||
|
||||
/*
|
||||
* Prevents the use of the ACCESS and CERT (excluding their LIST subcommand), DROP, FORBID, SUSPEND
|
||||
* and SET PASSWORD commands by services operators on other services operators.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
secureadmins = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will set the channel modes a user has access to upon identifying, assuming
|
||||
* they are not already set.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
modeonid = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will set these user modes on any user who identifies.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#modesonid = "+R"
|
||||
|
||||
/*
|
||||
* If set, Anope will not show netsplits in the last quit message field
|
||||
* of NickServ's INFO command.
|
||||
*/
|
||||
hidenetsplitquit = no
|
||||
|
||||
/*
|
||||
* The default period to force users to stop using a protected nickname after.
|
||||
*
|
||||
* Defaults to 1 minute.
|
||||
*/
|
||||
defaultprotect = 1m
|
||||
|
||||
/*
|
||||
* The minimum period that a user can have a user forced off their protected nickname after.
|
||||
*
|
||||
* Defaults to 10 seconds.
|
||||
*/
|
||||
minprotect = 10s
|
||||
|
||||
/*
|
||||
* The maximum period that a user can have a user forced off their protected nickname after.
|
||||
*
|
||||
* Defaults to 10 minutes.
|
||||
*/
|
||||
maxprotect = 10m
|
||||
|
||||
/*
|
||||
* If set, forbids the registration of nicks that contain an existing
|
||||
* nick with services access. For example, if Tester is a Services Oper,
|
||||
* you can't register NewTester or Tester123 unless you are an IRC
|
||||
* Operator.
|
||||
*
|
||||
* NOTE: If you enable this, you will have to be logged in as an IRC
|
||||
* operator in order to register a Services Root nick when setting up
|
||||
* Anope for the first time.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#restrictopernicks = yes
|
||||
|
||||
/*
|
||||
* The username, and possibly hostname, used for fake users created when Anope needs to
|
||||
* hold a nickname.
|
||||
*/
|
||||
enforceruser = "enforcer"
|
||||
enforcerhost = "${services.host}"
|
||||
|
||||
/*
|
||||
* The length of time Anope should hold nicknames for.
|
||||
*
|
||||
* 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 nickname protection their new
|
||||
* nick will be based on this value. Any # in the value will be replaced with a random
|
||||
* number. If your IRCd has support for unique identifiers you can also set this to an
|
||||
* empty string to change a user's nick to their unique identifier.
|
||||
*
|
||||
* Make sure this is a valid nick and that it is is not longer than the maximum nick
|
||||
* length on your IRCd.
|
||||
*
|
||||
* This directive is optional. If not set it defaults to "Guest####"
|
||||
*/
|
||||
guestnick = "Guest####"
|
||||
|
||||
/*
|
||||
* If set, Anope does not allow ownership of nick names, only ownership of accounts.
|
||||
*/
|
||||
nonicknameownership = no
|
||||
|
||||
/*
|
||||
* The minimum length of passwords
|
||||
*
|
||||
* This directive is optional. If not set it defaults to 10.
|
||||
*/
|
||||
minpasslen = 10
|
||||
|
||||
/*
|
||||
* The maximum length of passwords
|
||||
*
|
||||
* This directive is optional. If not set it defaults to 50.
|
||||
*/
|
||||
maxpasslen = 50
|
||||
|
||||
/*
|
||||
* Whether all of the secondary nicks of a nick group have to expire or be
|
||||
dropped before the display nick can expire or be dropped.
|
||||
*/
|
||||
preservedisplay = no
|
||||
}
|
||||
|
||||
/*
|
||||
* Core NickServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Command group configuration for NickServ.
|
||||
*
|
||||
* Commands may optionally be placed into groups to make NickServ's HELP output easier to understand.
|
||||
* Remove the following groups to use the old behavior of simply listing all NickServ commands from HELP.
|
||||
*/
|
||||
command_group
|
||||
{
|
||||
name = "nickserv/admin"
|
||||
description = _("Services Operator commands")
|
||||
}
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "NickServ"; name = "HELP"; command = "generic/help"; }
|
||||
|
||||
/*
|
||||
* ns_ajoin
|
||||
*
|
||||
* Provides the command nickserv/ajoin.
|
||||
*
|
||||
* Used for configuring channels to join once you identify.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_ajoin"
|
||||
|
||||
/*
|
||||
* The maximum number of channels a user can have on NickServ's AJOIN command.
|
||||
*/
|
||||
ajoinmax = 10
|
||||
}
|
||||
command { service = "NickServ"; name = "AJOIN"; command = "nickserv/ajoin"; }
|
||||
|
||||
/*
|
||||
* ns_alist
|
||||
*
|
||||
* Provides the command nickserv/alist.
|
||||
*
|
||||
* Used for viewing what channels you have access to.
|
||||
*/
|
||||
module { name = "ns_alist" }
|
||||
command { service = "NickServ"; name = "ALIST"; command = "nickserv/alist"; }
|
||||
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/alist"; hide = true; }
|
||||
|
||||
/*
|
||||
* ns_cert
|
||||
*
|
||||
* Provides the command nickserv/cert.
|
||||
*
|
||||
* Used for configuring your SSL certificate list, which can be used to automatically identify you.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_cert"
|
||||
|
||||
/*
|
||||
* Should users who are connected with a SSL client certificate have its fingerprint be added to
|
||||
* their account when they register. Defaults to yes.
|
||||
*/
|
||||
automatic = yes
|
||||
|
||||
/*
|
||||
* 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"; }
|
||||
|
||||
/*
|
||||
* ns_drop
|
||||
*
|
||||
* Provides the command nickserv/drop.
|
||||
*
|
||||
* Used for unregistering names.
|
||||
*/
|
||||
module { name = "ns_drop" }
|
||||
command { service = "NickServ"; name = "DROP"; command = "nickserv/drop"; }
|
||||
|
||||
/*
|
||||
* ns_getemail
|
||||
*
|
||||
* Provides the command nickserv/getemail.
|
||||
*
|
||||
* Used for getting registered accounts by searching for emails.
|
||||
*/
|
||||
module { name = "ns_getemail" }
|
||||
command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"; permission = "nickserv/getemail"; group = "nickserv/admin"; }
|
||||
|
||||
/*
|
||||
* ns_group
|
||||
*
|
||||
* Provides the commands nickserv/group, nickserv/glist, and nickserv/ungroup.
|
||||
*
|
||||
* Used for controlling nick groups.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_group"
|
||||
|
||||
/*
|
||||
* The maximum number of nicks allowed in a group.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set or set to 0, no limits will be applied.
|
||||
*/
|
||||
maxaliases = 10
|
||||
|
||||
/*
|
||||
* If set, the NickServ GROUP command won't allow any group changes. This is recommended to
|
||||
* prevent users from accidentally dropping their nicks, as it forces users to explicitly
|
||||
* drop their nicks before adding it to another group.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
nogroupchange = yes
|
||||
}
|
||||
command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist"; }
|
||||
command { service = "NickServ"; name = "GROUP"; command = "nickserv/group"; }
|
||||
command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup"; }
|
||||
|
||||
/*
|
||||
* ns_identify
|
||||
*
|
||||
* Provides the command nickserv/identify.
|
||||
*
|
||||
* Used for identifying to accounts.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_identify"
|
||||
|
||||
/*
|
||||
* If set, limits the number of concurrent users that can be logged in as a given account at once.
|
||||
*/
|
||||
maxlogins = 10
|
||||
}
|
||||
command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; hide = true; }
|
||||
command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify"; }
|
||||
|
||||
/*
|
||||
* ns_info
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/info. - Used for gathering information about an account.
|
||||
* nickserv/set/hide, nickserv/saset/hide - Used for configuring which options are publicly shown in nickserv/info.
|
||||
*
|
||||
*/
|
||||
module { name = "ns_info" }
|
||||
command { service = "NickServ"; name = "INFO"; command = "nickserv/info"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET HIDE"; command = "nickserv/set/hide"; }
|
||||
command { service = "NickServ"; name = "SASET HIDE"; command = "nickserv/saset/hide"; permission = "nickserv/saset/hide"; }
|
||||
|
||||
|
||||
/*
|
||||
* ns_list
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/list - Used for retrieving and searching the registered account list.
|
||||
* nickserv/set/private, nickserv/saset/private - Used for configuring whether or a users account shows up in nickserv/list.
|
||||
*
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_list"
|
||||
|
||||
/*
|
||||
* The maximum number of nicks to be returned for a NickServ LIST command.
|
||||
*/
|
||||
listmax = 50
|
||||
}
|
||||
command { service = "NickServ"; name = "LIST"; command = "nickserv/list"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET PRIVATE"; command = "nickserv/set/private"; }
|
||||
command { service = "NickServ"; name = "SASET PRIVATE"; command = "nickserv/saset/private"; permission = "nickserv/saset/private"; }
|
||||
|
||||
|
||||
/*
|
||||
* ns_logout
|
||||
*
|
||||
* Provides the command nickserv/logout.
|
||||
*
|
||||
* Used for logging out of your account.
|
||||
*/
|
||||
module { name = "ns_logout" }
|
||||
command { service = "NickServ"; name = "LOGOUT"; command = "nickserv/logout"; }
|
||||
|
||||
/*
|
||||
* ns_recover
|
||||
*
|
||||
* Provides the command nickserv/recover.
|
||||
*
|
||||
* Used for recovering your nick from services or another user.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_recover"
|
||||
|
||||
/*
|
||||
* If set, Anope will svsnick and svsjoin users who use the recover
|
||||
* command on an identified user to the nick and channels of the recovered user.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
restoreonrecover = yes
|
||||
}
|
||||
command { service = "NickServ"; name = "RECOVER"; command = "nickserv/recover"; }
|
||||
|
||||
# For compatibility with Anope 1.8 and Atheme.
|
||||
command { service = "NickServ"; name = "GHOST"; command = "nickserv/recover"; hide = true; }
|
||||
command { service = "NickServ"; name = "RELEASE"; command = "nickserv/recover"; hide = true; }
|
||||
|
||||
/*
|
||||
* ns_register
|
||||
*
|
||||
* Provides the commands nickserv/confirm, nickserv/register, and nickserv/resend.
|
||||
*
|
||||
* Used for registering accounts.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_register"
|
||||
|
||||
/*
|
||||
* Registration confirmation setting. Set to "none" for no registration confirmation,
|
||||
* "mail" for email confirmation, and "admin" to have services operators manually confirm
|
||||
* every registration. Set to "disable" to completely disable all registrations.
|
||||
*/
|
||||
registration = "none"
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of NickServ's RESEND command.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, this restriction will be disabled.
|
||||
*/
|
||||
resenddelay = 90s
|
||||
|
||||
/*
|
||||
* Prevents users from registering their nick if they are not connected
|
||||
* for at least the given number of seconds.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
nickregdelay = 15s
|
||||
|
||||
/*
|
||||
* The length of time a user using an unconfirmed account has
|
||||
* before the account will be released for general use again.
|
||||
*/
|
||||
#unconfirmedexpire = 1d
|
||||
}
|
||||
command { service = "NickServ"; name = "CONFIRM"; command = "nickserv/confirm"; }
|
||||
command { service = "NickServ"; name = "REGISTER"; command = "nickserv/register"; }
|
||||
command { service = "NickServ"; name = "RESEND"; command = "nickserv/resend"; }
|
||||
|
||||
/*
|
||||
* ns_resetpass
|
||||
*
|
||||
* Provides the command nickserv/resetpass.
|
||||
*
|
||||
* Used for resetting passwords by emailing users a temporary one.
|
||||
*/
|
||||
module { name = "ns_resetpass" }
|
||||
command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpass"; }
|
||||
|
||||
/*
|
||||
* ns_sasl
|
||||
*
|
||||
* Provides support for authentication to services via IRCv3 SASL. This is a standardised
|
||||
* alternative to ns_identify that is supported by several IRCds.
|
||||
*
|
||||
* You will need to configure your IRCd to use SASL. See the following links for details:
|
||||
*
|
||||
* InspIRCd: https://docs.inspircd.org/4/modules/sasl/
|
||||
* UnrealIRCd: https://www.unrealircd.org/docs/SASL#Enabling_SASL_on_the_server
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_sasl"
|
||||
|
||||
/*
|
||||
* The nick of the client which operates as the SASL agent.
|
||||
*/
|
||||
#agent = "NickServ"
|
||||
}
|
||||
|
||||
/*
|
||||
* ns_set
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/set, nickserv/saset - Dummy help wrappers for the SET and SASET commands.
|
||||
* nickserv/set/autoop, nickserv/saset/autoop - Determines whether or not modes are automatically set users when joining a channel.
|
||||
* nickserv/set/display, nickserv/saset/display - Used for setting a users display name.
|
||||
* nickserv/set/email, nickserv/saset/email - Used for setting a users email address.
|
||||
* nickserv/set/keepmodes, nickserv/saset/keepmodes - Configure whether or not services should retain a user's modes across sessions.
|
||||
* nickserv/set/neverop, nickserv/saset/neverop - Used to configure whether a user can be added to access lists
|
||||
* nickserv/saset/noexpire - Used for configuring noexpire, which prevents nicks from expiring.
|
||||
* nickserv/set/password, nickserv/saset/password - Used for changing a users password.
|
||||
*/
|
||||
module { name = "ns_set" }
|
||||
|
||||
command { service = "NickServ"; name = "SET"; command = "nickserv/set"; }
|
||||
command { service = "NickServ"; name = "SASET"; command = "nickserv/saset"; permission = "nickserv/saset/"; group = "nickserv/admin"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET AUTOOP"; command = "nickserv/set/autoop"; }
|
||||
command { service = "NickServ"; name = "SASET AUTOOP"; command = "nickserv/saset/autoop"; permission = "nickserv/saset/autoop"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET DISPLAY"; command = "nickserv/set/display"; }
|
||||
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET EMAIL"; command = "nickserv/set/email"; }
|
||||
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET PASSWORD"; command = "nickserv/set/password"; }
|
||||
command { service = "NickServ"; name = "SASET PASSWORD"; command = "nickserv/saset/password"; permission = "nickserv/saset/password"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET NEVEROP"; command = "nickserv/set/neverop"; }
|
||||
command { service = "NickServ"; name = "SASET NEVEROP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop"; }
|
||||
|
||||
command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/saset/noexpire"; permission = "nickserv/saset/noexpire"; }
|
||||
|
||||
/*
|
||||
* ns_set_keepmodes
|
||||
*
|
||||
* Provides the command nickserv/set/keepmodes and nickserv/saset/keepmodes.
|
||||
*
|
||||
* Allows configuring services to keep user modes across logins.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_set_keepmodes"
|
||||
|
||||
/*
|
||||
* Anope will try to not restore user modes that aren't settable by users. However, if
|
||||
* you have modes that you don't want to be automatically restored you can list them
|
||||
* here.
|
||||
*/
|
||||
#norestore = "ABCabc"
|
||||
}
|
||||
command { service = "NickServ"; name = "SET KEEPMODES"; command = "nickserv/set/keepmodes"; }
|
||||
command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/saset/keepmodes"; permission = "nickserv/saset/keepmodes"; }
|
||||
|
||||
/*
|
||||
* ns_set_language
|
||||
*
|
||||
* Provides the command nickserv/set/language and nickserv/saset/language.
|
||||
*
|
||||
* Allows configuring the language that services uses.
|
||||
*/
|
||||
module { name = "ns_set_language" }
|
||||
command { service = "NickServ"; name = "SET LANGUAGE"; command = "nickserv/set/language"; }
|
||||
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; }
|
||||
|
||||
/*
|
||||
* ns_set_message
|
||||
*
|
||||
* Provides the commands nickserv/set/message and nickserv/saset/message.
|
||||
*
|
||||
* Allows users to let services send them PRIVMSGs instead of NOTICEs.
|
||||
*
|
||||
* This might cause problems with badly written clients as the IRC RFC
|
||||
* requires that automatic responses to a PRIVMSG use a NOTICE to avoid
|
||||
* message loops. Only enable this if you are sure this can not happen.
|
||||
*/
|
||||
#module { name = "ns_set_message" }
|
||||
#command { service = "NickServ"; name = "SET MESSAGE"; command = "nickserv/set/message"; }
|
||||
#command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; }
|
||||
|
||||
/*
|
||||
* ns_set_misc
|
||||
*
|
||||
* Provides the command nickserv/set/misc.
|
||||
*
|
||||
* Allows you to create arbitrary commands to set data, and have that data show up in nickserv/info.
|
||||
* A field named misc_description may be given for use with help output.
|
||||
*/
|
||||
module { name = "ns_set_misc" }
|
||||
command { service = "NickServ"; name = "SET URL"; command = "nickserv/set/misc"; misc_description = _("Associate a URL with your account"); }
|
||||
command { service = "NickServ"; name = "SASET URL"; command = "nickserv/saset/misc"; misc_description = _("Associate a URL with this account"); permission = "nickserv/saset/url"; group = "nickserv/admin"; }
|
||||
#command { service = "NickServ"; name = "SET DISCORD"; command = "nickserv/set/misc"; misc_description = _("Associate a Discord account with your account"); }
|
||||
#command { service = "NickServ"; name = "SASET DISCORD"; command = "nickserv/saset/misc"; misc_description = _("Associate a Discord account with this account"); permission = "nickserv/saset/discord"; group = "nickserv/admin"; }
|
||||
#command { service = "NickServ"; name = "SET MASTODON"; command = "nickserv/set/misc"; misc_description = _("Associate a Mastodon account with your account"); }
|
||||
#command { service = "NickServ"; name = "SASET MASTODON"; command = "nickserv/saset/misc"; misc_description = _("Associate a Mastodon account with this account"); permission = "nickserv/saset/mastodon"; group = "nickserv/admin"; }
|
||||
#command { service = "NickServ"; name = "SET TIMEZONE"; command = "nickserv/set/misc"; misc_description = _("Associate a time zone with your account"); }
|
||||
#command { service = "NickServ"; name = "SASET TIMEZONE"; command = "nickserv/saset/misc"; misc_description = _("Associate a time zone with this account"); permission = "nickserv/saset/timezone"; group = "nickserv/admin"; }
|
||||
|
||||
/*
|
||||
* ns_set_protect
|
||||
*
|
||||
* Provides the commands nickserv/set/protect and kickserv/saset/protect.
|
||||
*
|
||||
* Used for configuring nickname protection.
|
||||
*/
|
||||
module { name = "ns_set_protect" }
|
||||
|
||||
command { service = "NickServ"; name = "SET PROTECT"; command = "nickserv/set/protect"; }
|
||||
command { service = "NickServ"; name = "SASET PROTECT"; command = "nickserv/saset/protect"; permission = "nickserv/saset/kill"; }
|
||||
|
||||
# For compatibility with Anope 2.0.
|
||||
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/protect"; hide = true; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect"; hide = true; }
|
||||
|
||||
/*
|
||||
* ns_suspend
|
||||
*
|
||||
* Provides the commands nickserv/suspend and nickserv/unsuspend.
|
||||
*
|
||||
* Used to suspend and unsuspend nicknames. Suspended nicknames can not be used but their settings are preserved.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "ns_suspend"
|
||||
|
||||
/*
|
||||
* The length of time before a suspended nick becomes unsuspended.
|
||||
*
|
||||
* This directive is optional. If not set, the default is never.
|
||||
*/
|
||||
#suspendexpire = 90d
|
||||
|
||||
/*
|
||||
* Settings to show to non-opers in NickServ's INFO output.
|
||||
* Comment to completely disable showing any information about
|
||||
* suspended nicknames to non-opers.
|
||||
*/
|
||||
show = "suspended, by, reason, on, expires"
|
||||
}
|
||||
command { service = "NickServ"; name = "SUSPEND"; command = "nickserv/suspend"; permission = "nickserv/suspend"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspend"; permission = "nickserv/suspend"; group = "nickserv/admin"; }
|
||||
|
||||
/*
|
||||
* ns_update
|
||||
*
|
||||
* Provides the command nickserv/update.
|
||||
*
|
||||
* Used to update your status on all channels, turn on your vHost, etc.
|
||||
*/
|
||||
module { name = "ns_update" }
|
||||
command { service = "NickServ"; name = "UPDATE"; command = "nickserv/update"; }
|
||||
|
||||
|
||||
/*
|
||||
* Extra NickServ related modules.
|
||||
*/
|
||||
|
||||
/*
|
||||
* ns_maxemail
|
||||
*
|
||||
* Limits how many times the same email address may be used in Anope
|
||||
* to register accounts.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "ns_maxemail"
|
||||
|
||||
/*
|
||||
* The limit to how many registered nicks can use the same email address. If set to 0 or left
|
||||
* commented, there will be no limit enforced when registering new accounts or using
|
||||
* /msg NickServ SET EMAIL.
|
||||
*/
|
||||
maxemails = 1
|
||||
}
|
||||
@@ -0,0 +1,715 @@
|
||||
/*
|
||||
* Example configuration file for OperServ.
|
||||
*/
|
||||
|
||||
/*
|
||||
* First, create the service.
|
||||
*/
|
||||
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"
|
||||
|
||||
/*
|
||||
* The username of the OperServ client.
|
||||
*/
|
||||
user = "services"
|
||||
|
||||
/*
|
||||
* The hostname of the OperServ client.
|
||||
*/
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the OperServ client.
|
||||
*/
|
||||
gecos = "Operator 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"
|
||||
|
||||
/*
|
||||
* The server alias that can be used to securely message this service. If
|
||||
* your IRC server does not have an alias for this service you can set this
|
||||
* to an empty string to tell users to use /msg instead.
|
||||
*
|
||||
* This setting is ignored when options:servicealias is disabled.
|
||||
*
|
||||
* Defaults to the nick of the service if not set.
|
||||
*/
|
||||
#alias = "OS"
|
||||
}
|
||||
|
||||
/*
|
||||
* Core OperServ module.
|
||||
*
|
||||
* Provides essential functionality for OperServ.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "operserv"
|
||||
|
||||
/*
|
||||
* The name of the client that should be OperServ.
|
||||
*/
|
||||
client = "OperServ"
|
||||
|
||||
/*
|
||||
* These define the default expiration times for, respectively, AKILLs, CHANKILLs, SNLINEs,
|
||||
* and SQLINEs.
|
||||
*/
|
||||
autokillexpiry = 30d
|
||||
chankillexpiry = 30d
|
||||
snlineexpiry = 30d
|
||||
sqlineexpiry = 30d
|
||||
|
||||
/*
|
||||
* If set, this option will make Anope send an AKILL command immediately after it has been
|
||||
* added with AKILL ADD. This eliminates the need for killing the user after the AKILL has
|
||||
* been added.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
akillonadd = yes
|
||||
|
||||
/*
|
||||
* If set, this option will make Anope send an (SVS)KILL command immediately after SNLINE ADD.
|
||||
* This eliminates the need for killing the user after the SNLINE has been added.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
killonsnline = yes
|
||||
|
||||
/*
|
||||
* If set, this option will make Anope send an (SVS)KILL command immediately after SQLINE ADD.
|
||||
* This eliminates the need for killing the user after the SQLINE has been added.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
killonsqline = yes
|
||||
|
||||
/*
|
||||
* Adds the nickname of the IRC Operator issuing an AKILL to the kill reason.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
addakiller = yes
|
||||
|
||||
/*
|
||||
* Adds akill IDs to akills. Akill IDs are given to users in their ban reason and can be used to easily view,
|
||||
* modify, or remove an akill from the ID.
|
||||
*/
|
||||
akillids = yes
|
||||
|
||||
/*
|
||||
* If set, only IRC Operators will be permitted to use OperServ, regardless of command access restrictions.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
opersonly = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* Core OperServ commands.
|
||||
*
|
||||
* In Anope modules can provide (multiple) commands, each of which has a unique command name. Once these modules
|
||||
* are loaded you can then configure the commands to be added to any client you like with any name you like.
|
||||
*
|
||||
* Additionally, you may provide a permission name that must be in the opertype of users executing the command.
|
||||
*
|
||||
* Sane defaults are provided below that do not need to be edited unless you wish to change the default behavior.
|
||||
*/
|
||||
|
||||
/* Give it a help command. */
|
||||
command { service = "OperServ"; name = "HELP"; command = "generic/help"; }
|
||||
|
||||
/*
|
||||
* os_akill
|
||||
*
|
||||
* Provides the command operserv/akill.
|
||||
*
|
||||
* Used to ban users from the network.
|
||||
*/
|
||||
module { name = "os_akill" }
|
||||
command { service = "OperServ"; name = "AKILL"; command = "operserv/akill"; permission = "operserv/akill"; }
|
||||
|
||||
/*
|
||||
* os_chankill
|
||||
*
|
||||
* Provides the command operserv/chankill.
|
||||
*
|
||||
* Used to akill users from an entire channel.
|
||||
*/
|
||||
module { name = "os_chankill" }
|
||||
command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"; permission = "operserv/chankill"; }
|
||||
|
||||
/*
|
||||
* os_defcon
|
||||
*
|
||||
* Provides the command operserv/defcon.
|
||||
*
|
||||
* Allows you to set services in DefCon mode, which can be used to restrict services access
|
||||
* during bot attacks.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "os_defcon"
|
||||
|
||||
/*
|
||||
* Default DefCon level (1-5) to use when starting Anope up. Level 5 constitutes normal operation
|
||||
* while level 1 constitutes the most restrictive operation. If this setting is left out or set to
|
||||
* 0, DefCon will be disabled and the rest of this block will be ignored.
|
||||
*/
|
||||
#defaultlevel = 5
|
||||
|
||||
/*
|
||||
* The following 4 directives define what operations will take place when DefCon is set to levels
|
||||
* 1 through 4. Each level is a list that must be separated by spaces.
|
||||
*
|
||||
* The following operations can be defined at each level:
|
||||
* - nonewchannels: Disables registering new channels
|
||||
* - nonewnicks: Disables registering new nicks
|
||||
* - nomlockchanges: Disables changing MLOCK on registered channels
|
||||
* - forcechanmodes: Forces all channels to have the modes given in the later chanmodes directive
|
||||
* - reducedsessions: Reduces the session limit to the value given in the later sessionlimit directive
|
||||
* - nonewclients: KILL any new clients trying to connect
|
||||
* - operonly: Ignore all non-IRCops
|
||||
* - silentoperonly: Silently ignore all non-IRCops
|
||||
* - akillnewclients: AKILL any new clients trying to connect
|
||||
* - nonewmemos: No new memos will be sent to block MemoServ attacks
|
||||
*/
|
||||
level4 = "nonewchannels nonewnicks nomlockchanges reducedsessions"
|
||||
level3 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions"
|
||||
level2 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions silentoperonly"
|
||||
level1 = "nonewchannels nonewnicks nomlockchanges forcechanmodes reducedsessions silentoperonly akillnewclients"
|
||||
|
||||
/*
|
||||
* New session limit to use when a DefCon level is using "reduced" session limiting.
|
||||
*/
|
||||
#sessionlimit = 2
|
||||
|
||||
/*
|
||||
* Length of time to add an AKILL for when DefCon is preventing new clients from connecting to the
|
||||
* network.
|
||||
*/
|
||||
#akillexpire = 5m
|
||||
|
||||
/*
|
||||
* The channel modes to set on all channels when the DefCon channel mode system is in use.
|
||||
*
|
||||
* Note 1: Choose these modes carefully, because when DefCon switches to a level which does NOT have
|
||||
* the mode setting selected, Anope will set the reverse on all channels, e.g. if this setting
|
||||
* is +RN when DefCon is used, all channels will be set to +RN, when DefCon is removed, all
|
||||
* channels will be set to -RN. You don't want to set this to +k for example, because when DefCon
|
||||
* is removed, all channels are set -k, removing the key from previously keyed channels.
|
||||
*
|
||||
* Note 2: MLOCKed modes will not be lost.
|
||||
*/
|
||||
#chanmodes = "+R"
|
||||
|
||||
/*
|
||||
* This value can be used to automatically return the network to DefCon level 5 after the specified
|
||||
* time period, just in case any IRC Operator forgets to remove a DefCon setting.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#timeout = 15m
|
||||
|
||||
/*
|
||||
* If set, Anope will send a global message on DefCon level changes.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#globalondefcon = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will send the global message defined in the message directive on DefCon level
|
||||
* changes.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#globalondefconmore = yes
|
||||
|
||||
/*
|
||||
* Defines the message that will be sent on DefCon level changes when globalondefconmore is set.
|
||||
*
|
||||
* This directive is required only when globalondefconmore is set.
|
||||
*/
|
||||
#message = "Put your message to send your users here. Don't forget to uncomment globalondefconmore"
|
||||
|
||||
/*
|
||||
* Defines the message that will be sent when DefCon is returned to level 5. This directive is optional,
|
||||
* and will also override globalondefcon and globalondefconmore when set.
|
||||
*/
|
||||
#offmessage = "Services are now back to normal, sorry for any inconvenience"
|
||||
|
||||
/*
|
||||
* Defines the reason to use when clients are KILLed or AKILLed from the network while the proper
|
||||
* DefCon operation is in effect.
|
||||
*/
|
||||
#akillreason = "This network is currently not accepting connections, please try again later."
|
||||
}
|
||||
#command { service = "OperServ"; name = "DEFCON"; command = "operserv/defcon"; permission = "operserv/defcon"; }
|
||||
|
||||
/*
|
||||
* os_dns
|
||||
*
|
||||
* Provides the command operserv/dns.
|
||||
*
|
||||
* This module requires that dns is loaded.
|
||||
*
|
||||
* This module allows controlling a DNS zone. This is useful for
|
||||
* controlling what servers users are placed on for load balancing,
|
||||
* and to automatically remove split servers.
|
||||
*
|
||||
* To use this module you must set a nameserver record for services
|
||||
* so that DNS queries go to services.
|
||||
*
|
||||
* Alternatively, you may use a slave DNS server to hide service's IP,
|
||||
* provide query caching, and provide better fault tolerance.
|
||||
*
|
||||
* To do this using BIND, configure similar to:
|
||||
*
|
||||
* options { max-refresh-time 60; };
|
||||
* zone "irc.example.com" IN {
|
||||
* type slave;
|
||||
* masters { 127.0.0.1 port 5353; };
|
||||
* };
|
||||
*
|
||||
* Where 127.0.0.1:5353 is the IP and port services are listening on.
|
||||
* We recommend you externally firewall both UDP and TCP to the port
|
||||
* Anope is listening on.
|
||||
*
|
||||
* Finally set a NS record for irc.example.com. to BIND or services.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "os_dns"
|
||||
|
||||
/* TTL for records. This should be very low if your records change often. */
|
||||
ttl = 1m
|
||||
|
||||
/* If a server drops this many users the server is automatically removed from the DNS zone.
|
||||
* This directive is optional.
|
||||
*/
|
||||
user_drop_mark = 50
|
||||
|
||||
/* The time used for user_drop_mark. */
|
||||
user_drop_time = 1m
|
||||
|
||||
/* When a server is removed from the zone for dropping users, it is readded after this time.
|
||||
* This directive is optional.
|
||||
*/
|
||||
user_drop_readd_time = 5m
|
||||
|
||||
/* If set, when a server splits, it is automatically removed from the zone. */
|
||||
remove_split_servers = yes
|
||||
|
||||
/* If set, when a server connects to the network, it will be automatically added to
|
||||
* the zone if it is a known server.
|
||||
*/
|
||||
readd_connected_servers = no
|
||||
}
|
||||
#command { service = "OperServ"; name = "DNS"; command = "operserv/dns"; permission = "operserv/dns"; }
|
||||
|
||||
/*
|
||||
* os_config
|
||||
*
|
||||
* Provides the command operserv/config.
|
||||
*
|
||||
* Used to view and set configuration options while services are running.
|
||||
*/
|
||||
module { name = "os_config" }
|
||||
command { service = "OperServ"; name = "CONFIG"; command = "operserv/config"; permission = "operserv/config"; }
|
||||
|
||||
/*
|
||||
* os_forbid
|
||||
*
|
||||
* Provides the command operserv/forbid.
|
||||
*
|
||||
* Used to forbid specific nicks, channels, emails, etc. from being used.
|
||||
*/
|
||||
module { name = "os_forbid" }
|
||||
command { service = "OperServ"; name = "FORBID"; command = "operserv/forbid"; permission = "operserv/forbid"; }
|
||||
|
||||
/*
|
||||
* os_ignore
|
||||
*
|
||||
* Provides the command operserv/ignore.
|
||||
*
|
||||
* Used to make Anope ignore users.
|
||||
*/
|
||||
module { name = "os_ignore" }
|
||||
command { service = "OperServ"; name = "IGNORE"; command = "operserv/ignore"; permission = "operserv/ignore"; }
|
||||
|
||||
/*
|
||||
* os_info
|
||||
*
|
||||
* Provides the command operserv/info.
|
||||
*
|
||||
* Used to add oper only notes to users and channels.
|
||||
*/
|
||||
module { name = "os_info" }
|
||||
command { service = "OperServ"; name = "INFO"; command = "operserv/info"; permission = "operserv/info"; }
|
||||
|
||||
/*
|
||||
* os_jupe
|
||||
*
|
||||
* Provides the command operserv/jupe.
|
||||
*
|
||||
* Used to disconnect servers from the network and prevent them from relinking.
|
||||
*/
|
||||
module { name = "os_jupe" }
|
||||
command { service = "OperServ"; name = "JUPE"; command = "operserv/jupe"; permission = "operserv/jupe"; }
|
||||
|
||||
/*
|
||||
* os_kick
|
||||
*
|
||||
* Provides the command operserv/kick.
|
||||
*
|
||||
* Used to kick users from channels.
|
||||
*/
|
||||
module { name = "os_kick" }
|
||||
command { service = "OperServ"; name = "KICK"; command = "operserv/kick"; permission = "operserv/kick"; }
|
||||
|
||||
/*
|
||||
* os_kill
|
||||
*
|
||||
* Provides the command operserv/kill.
|
||||
*
|
||||
* Used to forcibly disconnect users from the network.
|
||||
*/
|
||||
module { name = "os_kill" }
|
||||
command { service = "OperServ"; name = "KILL"; command = "operserv/kill"; permission = "operserv/kill"; }
|
||||
|
||||
/*
|
||||
* os_list
|
||||
*
|
||||
* Provides the commands operserv/chanlist and operserv/userlist.
|
||||
*
|
||||
* Used to list and search the channels and users currently on the network.
|
||||
*/
|
||||
module { name = "os_list" }
|
||||
command { service = "OperServ"; name = "CHANLIST"; command = "operserv/chanlist"; permission = "operserv/chanlist"; }
|
||||
command { service = "OperServ"; name = "USERLIST"; command = "operserv/userlist"; permission = "operserv/userlist"; }
|
||||
|
||||
/*
|
||||
* os_login
|
||||
*
|
||||
* Provides the commands operserv/login and operserv/logout.
|
||||
*
|
||||
* Used to login to OperServ, only required if your oper block requires this.
|
||||
*/
|
||||
module { name = "os_login" }
|
||||
command { service = "OperServ"; name = "LOGIN"; command = "operserv/login"; }
|
||||
command { service = "OperServ"; name = "LOGOUT"; command = "operserv/logout"; }
|
||||
|
||||
/*
|
||||
* os_logsearch
|
||||
*
|
||||
* Provides the command operserv/logsearch.
|
||||
*
|
||||
* Used to search services log files.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_logsearch"
|
||||
|
||||
/* The log file name to search. There should be a log{} block configured to log
|
||||
* to a file of this name.
|
||||
*/
|
||||
logname = "services.log"
|
||||
}
|
||||
command { service = "OperServ"; name = "LOGSEARCH"; command = "operserv/logsearch"; permission = "operserv/logsearch"; }
|
||||
|
||||
/*
|
||||
* os_mode
|
||||
*
|
||||
* Provides the commands operserv/mode and operserv/umode.
|
||||
*
|
||||
* Used to change user and channel modes.
|
||||
*/
|
||||
module { name = "os_mode" }
|
||||
command { service = "OperServ"; name = "UMODE"; command = "operserv/umode"; permission = "operserv/umode"; }
|
||||
command { service = "OperServ"; name = "MODE"; command = "operserv/mode"; permission = "operserv/mode"; }
|
||||
|
||||
/*
|
||||
* os_modinfo
|
||||
*
|
||||
* Provides the commands operserv/modinfo and operserv/modlist.
|
||||
*
|
||||
* Used to show information about loaded modules.
|
||||
*/
|
||||
module { name = "os_modinfo" }
|
||||
command { service = "OperServ"; name = "MODINFO"; command = "operserv/modinfo"; permission = "operserv/modinfo"; }
|
||||
command { service = "OperServ"; name = "MODLIST"; command = "operserv/modlist"; permission = "operserv/modinfo"; }
|
||||
|
||||
/*
|
||||
* os_module
|
||||
*
|
||||
* Provides the commands operserv/modload, operserv/modreload, and operserv/modunload.
|
||||
*
|
||||
* Used to load, reload, and unload modules.
|
||||
*/
|
||||
module { name = "os_module" }
|
||||
command { service = "OperServ"; name = "MODLOAD"; command = "operserv/modload"; permission = "operserv/modload"; }
|
||||
command { service = "OperServ"; name = "MODRELOAD"; command = "operserv/modreload"; permission = "operserv/modload"; }
|
||||
command { service = "OperServ"; name = "MODUNLOAD"; command = "operserv/modunload"; permission = "operserv/modload"; }
|
||||
|
||||
/*
|
||||
* os_news
|
||||
*
|
||||
* Provides the commands operserv/logonnews, operserv/opernews, and operserv/randomnews.
|
||||
*
|
||||
* Used to configure news notices shown to users when they connect, and opers when they oper.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_news"
|
||||
|
||||
/*
|
||||
* The service bot names to use to send news to users on connection
|
||||
* and to opers when they oper.
|
||||
*/
|
||||
announcer = "Global"
|
||||
oper_announcer = "OperServ"
|
||||
|
||||
/*
|
||||
* The number of LOGON/OPER news items to display when a user logs on.
|
||||
*
|
||||
* This directive is optional, if not set it will default to 3.
|
||||
*/
|
||||
#newscount = 3
|
||||
|
||||
/*
|
||||
* Whether to show the datetime at which the news entry was added.
|
||||
*
|
||||
* This directive is optional, if not set it will default to yes.
|
||||
*/
|
||||
#showdate = yes
|
||||
}
|
||||
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"; }
|
||||
|
||||
/*
|
||||
* os_noop
|
||||
*
|
||||
* Provides the command operserv/noop.
|
||||
*
|
||||
* Used to NOOP a server, which prevents users from opering on that server.
|
||||
*/
|
||||
#module { name = "os_noop" }
|
||||
command { service = "OperServ"; name = "NOOP"; command = "operserv/noop"; permission = "operserv/noop"; }
|
||||
|
||||
/*
|
||||
* os_oper
|
||||
*
|
||||
* Provides the command operserv/oper.
|
||||
*
|
||||
* Used to configure opers and show information about opertypes.
|
||||
*/
|
||||
module { name = "os_oper" }
|
||||
command { service = "OperServ"; name = "OPER"; command = "operserv/oper"; permission = "operserv/oper"; }
|
||||
|
||||
/*
|
||||
* os_reload
|
||||
*
|
||||
* Provides the command operserv/reload.
|
||||
*
|
||||
* Used to reload the anope.conf configuration file.
|
||||
*/
|
||||
module { name = "os_reload" }
|
||||
command { service = "OperServ"; name = "RELOAD"; command = "operserv/reload"; permission = "operserv/reload"; }
|
||||
|
||||
/*
|
||||
* os_session
|
||||
*
|
||||
* Provides the commands operserv/exception and operserv/session.
|
||||
*
|
||||
* This module enables session limiting. Session limiting prevents users from connecting more than a certain
|
||||
* number of times from the same IP at the same time - thus preventing most types of cloning.
|
||||
* Once a host reaches its session limit, all clients attempting to connect from that host will
|
||||
* be killed. Exceptions to the default session limit can be defined via the exception list.
|
||||
*
|
||||
* Used to manage the session limit exception list, and view currently active sessions.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_session"
|
||||
|
||||
/*
|
||||
* Default session limit per host. Once a host reaches its session limit, all clients attempting
|
||||
* to connect from that host will be killed.
|
||||
*
|
||||
* This directive is required if os_session is loaded.
|
||||
*/
|
||||
defaultsessionlimit = 5
|
||||
|
||||
/*
|
||||
* The maximum session limit that may be set for a host in an exception.
|
||||
*
|
||||
* This directive is required if os_session is loaded.
|
||||
*/
|
||||
maxsessionlimit = 100
|
||||
|
||||
/*
|
||||
* Sets the default expiry time for session exceptions.
|
||||
*/
|
||||
#exceptionexpiry = 1d
|
||||
|
||||
/*
|
||||
* The message that will be NOTICE'd to a user just before they are removed from the network because
|
||||
* their host's session limit has been exceeded. It may be used to give a slightly more descriptive
|
||||
* reason for the impending kill as opposed to simply "Session limit exceeded".
|
||||
*
|
||||
* This directive is optional, if not set, nothing will be sent.
|
||||
*/
|
||||
sessionlimitexceeded = "The session limit for your IP {ip} has been exceeded."
|
||||
|
||||
/*
|
||||
* Same as above, but should be used to provide a website address where users can find out more
|
||||
* about session limits and how to go about applying for an exception.
|
||||
*
|
||||
* Note: This directive has been intentionally commented out in an effort to remind you to change
|
||||
* the URL it contains. It is recommended that you supply an address/URL where people can get help
|
||||
* regarding session limits.
|
||||
*
|
||||
* This directive is optional, if not set, nothing will be sent.
|
||||
*/
|
||||
#sessionlimitdetailsloc = "Please visit https://your.website.url/ for more information about session limits."
|
||||
|
||||
/*
|
||||
* If set and is not 0, this directive tells Anope to add an AKILL if the number of subsequent kills
|
||||
* for the same host exceeds this value, preventing the network from experiencing KILL floods.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
maxsessionkill = 15
|
||||
|
||||
/*
|
||||
* Sets the expiry time for AKILLs set for hosts exceeding the maxsessionkill directive limit.
|
||||
*
|
||||
* This directive is optional, if not set, defaults to 30 minutes.
|
||||
*/
|
||||
sessionautokillexpiry = 30m
|
||||
|
||||
/*
|
||||
* Sets the CIDR value used to determine which IP addresses represent the same person.
|
||||
* By default this would limit 3 connections per IPv4 IP and 3 connections per IPv6 IP.
|
||||
* If you are receiving IPv6 clone attacks it may be useful to set session_ipv6_cidr to
|
||||
* 64 or 48.
|
||||
*/
|
||||
session_ipv4_cidr = 32
|
||||
session_ipv6_cidr = 128
|
||||
}
|
||||
command { service = "OperServ"; name = "EXCEPTION"; command = "operserv/exception"; permission = "operserv/exception"; }
|
||||
command { service = "OperServ"; name = "SESSION"; command = "operserv/session"; permission = "operserv/session"; }
|
||||
|
||||
/*
|
||||
* os_set
|
||||
*
|
||||
* Provides the command operserv/set.
|
||||
*
|
||||
* Used to set various settings such as superadmin, debug mode, etc.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_set"
|
||||
|
||||
/*
|
||||
* If set, Services Admins will be able to use SUPERADMIN [ON|OFF] which will temporarily grant
|
||||
* them extra privileges such as being a founder on ALL channels.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#superadmin = yes
|
||||
}
|
||||
command { service = "OperServ"; name = "SET"; command = "operserv/set"; permission = "operserv/set"; }
|
||||
|
||||
/*
|
||||
* os_shutdown
|
||||
*
|
||||
* Provides the commands operserv/quit, operserv/restart, and operserv/shutdown.
|
||||
*
|
||||
* Used to quit, restart, or shutdown services.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "os_shutdown"
|
||||
|
||||
/*
|
||||
* If enabled then server operators will be required to provide the network
|
||||
* name to confirm that they are quitting, restarting, or shutting down the
|
||||
* right server.
|
||||
*/
|
||||
requirename = yes
|
||||
}
|
||||
#command { service = "OperServ"; name = "QUIT"; command = "operserv/quit"; permission = "operserv/quit"; }
|
||||
command { service = "OperServ"; name = "RESTART"; command = "operserv/restart"; permission = "operserv/restart"; }
|
||||
command { service = "OperServ"; name = "SHUTDOWN"; command = "operserv/shutdown"; permission = "operserv/shutdown"; }
|
||||
|
||||
/*
|
||||
* os_stats
|
||||
*
|
||||
* Provides the operserv/stats command.
|
||||
*
|
||||
* Used to show statistics about services.
|
||||
*/
|
||||
module { name = "os_stats" }
|
||||
command { service = "OperServ"; name = "STATS"; command = "operserv/stats"; permission = "operserv/stats"; }
|
||||
|
||||
/*
|
||||
* os_svs
|
||||
*
|
||||
* Provides the commands operserv/svsnick, operserv/svsjoin, and operserv/svspart.
|
||||
*
|
||||
* Used to force users to change nicks, join and part channels.
|
||||
*/
|
||||
module { name = "os_svs" }
|
||||
command { service = "OperServ"; name = "SVSNICK"; command = "operserv/svsnick"; permission = "operserv/svs"; }
|
||||
command { service = "OperServ"; name = "SVSJOIN"; command = "operserv/svsjoin"; permission = "operserv/svs"; }
|
||||
command { service = "OperServ"; name = "SVSPART"; command = "operserv/svspart"; permission = "operserv/svs"; }
|
||||
|
||||
/*
|
||||
* os_sxline
|
||||
*
|
||||
* Provides the operserv/snline and operserv/sqline commands.
|
||||
*
|
||||
* Used to ban real names, nick names, and possibly channels.
|
||||
*/
|
||||
module { name = "os_sxline" }
|
||||
command { service = "OperServ"; name = "SNLINE"; command = "operserv/snline"; permission = "operserv/snline"; }
|
||||
command { service = "OperServ"; name = "SQLINE"; command = "operserv/sqline"; permission = "operserv/sqline"; }
|
||||
|
||||
/*
|
||||
* os_update
|
||||
*
|
||||
* Provides the operserv/update command.
|
||||
*
|
||||
* Use to immediately update the databases.
|
||||
*/
|
||||
module { name = "os_update" }
|
||||
command { service = "OperServ"; name = "UPDATE"; command = "operserv/update"; permission = "operserv/update"; }
|
||||
@@ -0,0 +1,515 @@
|
||||
/*
|
||||
* Example configuration file for Anope. After making the appropriate
|
||||
* changes to this file, place it in the Anope conf directory (as
|
||||
* specified in the "Config" script, default /home/username/anope/conf)
|
||||
* under the name "anope.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, Anope 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
|
||||
* Anope, usually because its functionality has been either
|
||||
* superseded by that of other directives or incorporated into the main
|
||||
* program.
|
||||
*/
|
||||
|
||||
/*
|
||||
* [OPTIONAL] Defines
|
||||
*
|
||||
* You can use defines for repeated information, which can be used to easily change many
|
||||
* values in the configuration at once.
|
||||
*
|
||||
* To use a define called foo.bar you use ${foo.bar} in your config file. You can also use
|
||||
* environment variables by prefixing their name with "env." like ${env.USER}.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The services.host define is used in multiple different locations throughout the
|
||||
* configuration for the server name and pseudoclient hostnames.
|
||||
*/
|
||||
define
|
||||
{
|
||||
name = "services.host"
|
||||
value = "stats.example.com"
|
||||
}
|
||||
|
||||
/*
|
||||
* [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 - https://some.misconfigured.network.com/stats.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 Anope
|
||||
* to link to it.
|
||||
*
|
||||
* An example configuration for InspIRCd that is compatible with the below uplink
|
||||
* and serverinfo configuration would look like:
|
||||
*
|
||||
* # This goes in inspircd.conf, *NOT* your Anope config!
|
||||
* <link name="stats.example.com"
|
||||
* ipaddr="127.0.0.1"
|
||||
* port="7000"
|
||||
* sendpass="mypassword"
|
||||
* recvpass="mypassword">
|
||||
* <uline server="stats.example.com" 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:
|
||||
*
|
||||
* // This goes in unrealircd.conf, *NOT* your Anope config!
|
||||
* listen {
|
||||
* ip 127.0.0.1;
|
||||
* port 7000;
|
||||
* options {
|
||||
* serversonly;
|
||||
* };
|
||||
* };
|
||||
* link stats.example.com {
|
||||
* incoming {
|
||||
* mask *@127.0.0.1;
|
||||
* };
|
||||
* password "mypassword";
|
||||
* class servers;
|
||||
* };
|
||||
* ulines { stats.example.com; };
|
||||
*/
|
||||
uplink
|
||||
{
|
||||
/*
|
||||
* The IP address, hostname, or UNIX socket path of the IRC server you wish
|
||||
* to connect Anope to.
|
||||
* Usually, you will want to connect over 127.0.0.1 (aka localhost).
|
||||
*
|
||||
* NOTE: On some shell providers, this will not be an option.
|
||||
*/
|
||||
host = "127.0.0.1"
|
||||
|
||||
/*
|
||||
* The protocol that Anope should use when connecting to the uplink. Can
|
||||
* be set to "ipv4" (the default), "ipv6", or "unix".
|
||||
*/
|
||||
protocol = "ipv4"
|
||||
|
||||
/*
|
||||
* Enable if Anope 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 Anope 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 = "${services.host}"
|
||||
|
||||
/*
|
||||
* The text which should appear as the server's information in /WHOIS and similar
|
||||
* queries.
|
||||
*/
|
||||
description = "Anope IRC Statistics"
|
||||
|
||||
/*
|
||||
* The local address that Anope will bind to before connecting to the remote
|
||||
* server. This may be useful for multihomed hosts. If omitted, Anope 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 Anope process ID. The path is relative to the
|
||||
* data directory.
|
||||
*/
|
||||
pid = "anope.pid"
|
||||
|
||||
/*
|
||||
* The filename containing the Message of the Day. The path is relative to the
|
||||
* config directory.
|
||||
*/
|
||||
motd = "motd.txt"
|
||||
}
|
||||
|
||||
/*
|
||||
* [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
|
||||
* - hybrid
|
||||
* - inspircd
|
||||
* - ngircd
|
||||
* - plexus
|
||||
* - ratbox
|
||||
* - solanum
|
||||
* - unrealircd
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "inspircd"
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] Network Information
|
||||
*
|
||||
* This section contains information about the IRC network that Anope will be
|
||||
* connecting to.
|
||||
*/
|
||||
networkinfo
|
||||
{
|
||||
/*
|
||||
* This is the name of the network that Anope 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
|
||||
* Anope being disconnected from the network. Defaults to 31.
|
||||
*/
|
||||
#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
|
||||
* Anope being disconnected from the network. Defaults to 10.
|
||||
*/
|
||||
#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
|
||||
* Anope being disconnected from the network. Defaults to 64.
|
||||
*/
|
||||
#hostlen = 64
|
||||
|
||||
/* Set this to the maximum allowed channel length on your network.
|
||||
* Defaults to 64.
|
||||
*/
|
||||
#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 Anope.
|
||||
*
|
||||
* 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] Anope Options
|
||||
*
|
||||
* This section contains various options which determine how Anope 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. Anope uses 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
|
||||
|
||||
/*
|
||||
* If set, Anope will only show /stats o to IRC Operators. This directive
|
||||
* is optional.
|
||||
*/
|
||||
#hidestatso = yes
|
||||
|
||||
/*
|
||||
* A space-separated list of U-lined servers on your network, it is assumed that
|
||||
* the servers in this list are allowed to set channel modes and Anope 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 stats.log and the channel #stats
|
||||
*
|
||||
* 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 #stats"
|
||||
|
||||
/*
|
||||
* 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 (e.g. 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 log files, only useful if you are logging to a file.
|
||||
* Set to 0 to never delete old log files.
|
||||
*
|
||||
* 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, 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.
|
||||
*/
|
||||
servers = "*"
|
||||
#channels = "~mode *"
|
||||
users = "connect disconnect nick"
|
||||
other = "*"
|
||||
rawio = no
|
||||
debug = no
|
||||
}
|
||||
|
||||
/*
|
||||
* [REQUIRED] MySQL Database configuration.
|
||||
*
|
||||
* mysql
|
||||
*
|
||||
* This module allows other modules to use MySQL.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "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"
|
||||
}
|
||||
-386
@@ -1,386 +0,0 @@
|
||||
|
||||
-- If you need to create your db, uncomment the following lines.
|
||||
--
|
||||
-- CREATE DATABASE anope;
|
||||
-- USE anope;
|
||||
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_extra'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_extra;
|
||||
CREATE TABLE anope_extra (
|
||||
data text NOT NULL default ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_commands'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_commands;
|
||||
CREATE TABLE anope_commands (
|
||||
nick varchar(255) NOT NULL default '',
|
||||
service varchar(255) NOT NULL default '',
|
||||
command text NOT NULL default ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ns_core'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_core;
|
||||
CREATE TABLE anope_ns_core (
|
||||
display varchar(255) NOT NULL default '',
|
||||
pass text NOT NULL,
|
||||
email text NOT NULL default '',
|
||||
greet text NOT NULL default '',
|
||||
icq int(10) unsigned NOT NULL default '0',
|
||||
url text NOT NULL default '',
|
||||
flags text NOT NULL default '',
|
||||
language smallint(5) unsigned NOT NULL default '0',
|
||||
channelcount smallint(5) unsigned NOT NULL default '0',
|
||||
memomax smallint(5) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (display)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ns_core_metadata'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_core_metadata;
|
||||
CREATE TABLE anope_ns_core_metadata (
|
||||
nick varchar(255) NOT NULL default '',
|
||||
name varchar(255) NOT NULL default '',
|
||||
value text NOT NULL default '',
|
||||
PRIMARY KEY (name)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- ---------------------------------------------------------
|
||||
--
|
||||
-- Table structure for table 'anope_ns_alias'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_alias;
|
||||
CREATE TABLE anope_ns_alias (
|
||||
nick varchar(255) NOT NULL default '',
|
||||
last_quit text NOT NULL,
|
||||
last_realname text NOT NULL,
|
||||
last_usermask text NOT NULL,
|
||||
time_registered int(10) unsigned NOT NULL default '0',
|
||||
last_seen int(10) unsigned NOT NULL default '0',
|
||||
flags text NOT NULL default '',
|
||||
display varchar(255) NOT NULL default '',
|
||||
PRIMARY KEY (nick)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ns_alias_metadata'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_alias_metadata;
|
||||
CREATE TABLE anope_ns_alias_metadata (
|
||||
nick varchar(255) NOT NULL default '',
|
||||
name varchar(255) NOT NULL default '',
|
||||
value text NOT NULL default '',
|
||||
PRIMARY KEY (name)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ns_access'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_access;
|
||||
CREATE TABLE anope_ns_access (
|
||||
display varchar(255) NOT NULL default '',
|
||||
access varchar(160) NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- ---------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ns_request'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ns_request;
|
||||
CREATE TABLE anope_ns_request (
|
||||
nick varchar(255) NOT NULL default '',
|
||||
passcode text NOT NULL,
|
||||
password text NOT NULL,
|
||||
email text NOT NULL,
|
||||
requested int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (nick)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_access'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_access;
|
||||
CREATE TABLE anope_cs_access (
|
||||
level int(11) NOT NULL default '0',
|
||||
display varchar(255) NOT NULL default '',
|
||||
channel varchar(255) NOT NULL default '',
|
||||
last_seen int(10) unsigned NOT NULL default '0',
|
||||
creator varchar(255) NOT NULL default '',
|
||||
UNIQUE KEY (channel,display)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_akick'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_akick;
|
||||
CREATE TABLE anope_cs_akick (
|
||||
channel varchar(255) NOT NULL default '',
|
||||
flags varchar(255) NOT NULL default '',
|
||||
mask varchar(255) NOT NULL default '',
|
||||
reason text NOT NULL default '',
|
||||
creator varchar(255) NOT NULL default '',
|
||||
created int(10) unsigned NOT NULL default '0',
|
||||
last_used int(10) unsigned NOT NULL default '0',
|
||||
UNIQUE KEY channel (channel, mask)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_bs_badwords'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_bs_badwords;
|
||||
CREATE TABLE anope_bs_badwords (
|
||||
channel varchar(255) NOT NULL default '',
|
||||
word varchar(255) NOT NULL,
|
||||
type varchar(50) NOT NULL,
|
||||
UNIQUE KEY channel (channel,word)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_info'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_info;
|
||||
CREATE TABLE anope_cs_info (
|
||||
name varchar(255) NOT NULL default '',
|
||||
founder text NOT NULL,
|
||||
successor text NOT NULL,
|
||||
descr text NOT NULL,
|
||||
url text NOT NULL,
|
||||
email text NOT NULL,
|
||||
time_registered int(10) unsigned NOT NULL default '0',
|
||||
last_used int(10) unsigned NOT NULL default '0',
|
||||
last_topic text NOT NULL,
|
||||
last_topic_setter text NOT NULL,
|
||||
last_topic_time int(10) unsigned NOT NULL default '0',
|
||||
flags text NOT NULL default '',
|
||||
forbidby text NOT NULL,
|
||||
forbidreason text NOT NULL,
|
||||
bantype smallint(6) NOT NULL default '0',
|
||||
mlock_on text NOT NULL default '',
|
||||
mlock_off text NOT NULL default '',
|
||||
mlock_params text NOT NULL default '',
|
||||
entry_message text NOT NULL,
|
||||
memomax smallint(5) unsigned NOT NULL default '0',
|
||||
botnick varchar(255) NOT NULL default '',
|
||||
botflags text NOT NULL default '',
|
||||
capsmin smallint(6) NOT NULL default '0',
|
||||
capspercent smallint(6) NOT NULL default '0',
|
||||
floodlines smallint(6) NOT NULL default '0',
|
||||
floodsecs smallint(6) NOT NULL default '0',
|
||||
repeattimes smallint(6) NOT NULL default '0',
|
||||
PRIMARY KEY (name)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_info_metadata'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_info_metadata;
|
||||
CREATE TABLE anope_cs_info_metadata (
|
||||
channel varchar(255) NOT NULL default '',
|
||||
name varchar(255) NOT NULL default '',
|
||||
value text NOT NULL default ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_levels'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_levels;
|
||||
CREATE TABLE anope_cs_levels (
|
||||
channel varchar(255) NOT NULL default '',
|
||||
position int(11) NOT NULL default '0',
|
||||
level int(11) NOT NULL default '0',
|
||||
UNIQUE KEY channel (channel,position)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_cs_ttb'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_cs_ttb;
|
||||
CREATE TABLE anope_cs_ttb (
|
||||
channel varchar(255) NOT NULL default '',
|
||||
ttb_id int(11) NOT NULL default '0',
|
||||
value int(11) NOT NULL default '0',
|
||||
UNIQUE KEY channel (channel,ttb_id)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_bs_core'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_bs_core;
|
||||
CREATE TABLE anope_bs_core (
|
||||
nick varchar(255) NOT NULL default '',
|
||||
user varchar(255) NOT NULL default '',
|
||||
host text NOT NULL default '',
|
||||
rname text NOT NULL default '',
|
||||
flags text NOT NULL default '',
|
||||
created int(10) unsigned NOT NULL default '0',
|
||||
chancount int(11) NOT NULL default '0',
|
||||
PRIMARY KEY (nick)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_bs_info_metadata'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_bs_info_metadata;
|
||||
CREATE TABLE anope_bs_info_metadata (
|
||||
botname varchar(255) NOT NULL default '',
|
||||
name varchar(255) NOT NULL default '',
|
||||
value text NOT NULL default ''
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_ms_info'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_ms_info;
|
||||
CREATE TABLE anope_ms_info (
|
||||
receiver varchar(255) NOT NULL,
|
||||
number int(11) NOT NULL default '0',
|
||||
flags int(11) NOT NULL default '0',
|
||||
time int(10) unsigned NOT NULL default '0',
|
||||
sender text NOT NULL,
|
||||
text blob NOT NULL,
|
||||
serv enum('NICK','CHAN') NOT NULL default 'NICK'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_akills'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_akills;
|
||||
CREATE TABLE anope_os_akills (
|
||||
user varchar(255) NOT NULL,
|
||||
host varchar(255) NOT NULL,
|
||||
xby text NOT NULL,
|
||||
reason text NOT NULL,
|
||||
seton int(10) unsigned NOT NULL default '0',
|
||||
expire int(10) unsigned NOT NULL default '0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_core'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_core;
|
||||
CREATE TABLE anope_os_core (
|
||||
maxusercnt int(11) NOT NULL default '0',
|
||||
maxusertime int(10) unsigned NOT NULL default '0',
|
||||
akills_count int(11) NOT NULL default '0',
|
||||
sglines_count int(11) NOT NULL default '0',
|
||||
sqlines_count int(11) NOT NULL default '0',
|
||||
szlines_count int(11) NOT NULL default '0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_exceptions'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_exceptions;
|
||||
CREATE TABLE anope_os_exceptions (
|
||||
mask varchar(255) NOT NULL,
|
||||
slimit int(11) NOT NULL default '0',
|
||||
who text NOT NULL,
|
||||
reason text NOT NULL,
|
||||
time int(10) unsigned NOT NULL default '0',
|
||||
expires int(10) unsigned NOT NULL default '0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_os_sxlines'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_os_sxlines;
|
||||
CREATE TABLE anope_os_sxlines (
|
||||
type varchar(20) NOT NULL,
|
||||
mask varchar(255) NOT NULL,
|
||||
xby text NOT NULL,
|
||||
reason text NOT NULL,
|
||||
seton int(10) unsigned NOT NULL default '0',
|
||||
expire int(10) unsigned NOT NULL default '0'
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_metadata'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_metadata;
|
||||
CREATE TABLE anope_metadata (
|
||||
name varchar(255) NOT NULL default '',
|
||||
value text NOT NULL default '',
|
||||
PRIMARY KEY (name)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table 'anope_info'
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS anope_info;
|
||||
CREATE TABLE anope_info (
|
||||
version int(11) default NULL,
|
||||
date datetime default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
astyle --style=java --indent=tab --brackets=break-closing --indent-switches --indent-cases --brackets=break
|
||||
@@ -0,0 +1,92 @@
|
||||
Since the first commit in March 2004 88 people have submitted patches, commits,
|
||||
and other useful contributions to Anope. These people, ordered by the number of
|
||||
contributions they have made, are:
|
||||
|
||||
* Adam <adam@anope.org>
|
||||
* Sadie Powell <sadie@witchery.services>
|
||||
* Robin Burchell <w00t@inspircd.org>
|
||||
* Naram Qashat <cyberbotx@anope.org>
|
||||
* Pieter Bootsma <geniusdex@anope.org>
|
||||
* Jens Voss <dukepyrolator@anope.org>
|
||||
* David Robson <rob@anope.org>
|
||||
* Florian Schulze <certus@anope.org>
|
||||
* Daniel Engel <dane@zero.org>
|
||||
* Trystan S. Lee <trystan@nomadirc.net>
|
||||
* Robby <robby@chatbelgie.be>
|
||||
* Charles Kingsley <chaz@anope.org>
|
||||
* Lee Holmes <lethality@anope.org>
|
||||
* Gabriel Acevedo H. <drstein@anope.org>
|
||||
* Jan Milants <viper@anope.org>
|
||||
* Adam Kramer <ribosome@anope.org>
|
||||
* Attila Molnar <attilamolnar@hush.com>
|
||||
* Michael Wobst <wobst.michael@web.de>
|
||||
* Mark Summers <mark@goopler.net>
|
||||
* Matt Schatz <genius3000@g3k.solutions>
|
||||
* Daniel Vassdal <shutter@canternet.org>
|
||||
* MatthewM <mcm@they-got.us>
|
||||
* PeGaSuS <droider.pc@gmail.com>
|
||||
* Sebastian V. <hal9000@denorastats.org>
|
||||
* Alvaro Toledo <atoledo@keldon.org>
|
||||
* Dragone2 <dragone2@risposteinformatiche.it>
|
||||
* Björn Stiddien <keeper@anope.org>
|
||||
* n0kS Phr33d0m <god@politeia.in>
|
||||
* Hendrik Jäger <gitcommit@henk.geekmail.org>
|
||||
* k4be <k4be@pirc.pl>
|
||||
* Thomas Fargeix <t.fargeix@gmail.com>
|
||||
* Bram Matthys <syzop@vulnscan.org>
|
||||
* Federico G. Schwindt <fgsch@lodoss.net>
|
||||
* Val Lorentz <progval+git@progval.net>
|
||||
* Alexander Barton <alex@barton.de>
|
||||
* CaPa CuL <capacul@gmail.com>
|
||||
* Cronus <cronus@nite-serv.com>
|
||||
* H7-25 <simos@simosnap.org>
|
||||
* Jyzee <jyzee.git@gmail.com>
|
||||
* Sebastian Barfurth <github@afreshmelon.com>
|
||||
* Zantox <jyoerger10@msn.com>
|
||||
* Zoddo <zoddo.ino@gmail.com>
|
||||
* Dominic Hargreaves <dom@earth.li>
|
||||
* Michael Hazell <michaelhazell@hotmail.com>
|
||||
* Robert Scheck <robert@fedoraproject.org>
|
||||
* Dennis Friis <peavey@inspircd.org>
|
||||
* Filippo Cortigiani <simos@simosnap.org>
|
||||
* Michał Zegan <webczat_200@poczta.onet.pl>
|
||||
* AlphaTech <alphat3ch@icloud.com>
|
||||
* Austin Ellis <siniStar@IRC4Fun.net>
|
||||
* bonnedav <theD_2011@hotmail.com>
|
||||
* Denis M. (Phr33d0m) <god@politeia.in>
|
||||
* Harakiri <harakiri@overstack.fr>
|
||||
* Marcin Łabanowski <marcin@6irc.net>
|
||||
* Matt Ullman <matt@airraidsirens.com>
|
||||
* Michael Stapelberg <michael@robustirc.net>
|
||||
* Alexander Maassen <outsider@twingoversum.scarynet.org>
|
||||
* artemiiav <artemiiav@gmail.com>
|
||||
* blackbeard420 <blackbeard@blackbeard420.me>
|
||||
* BoGu5 <bogus@onzin.org>
|
||||
* Chris Langsenkamp <chris@langsenkamp.com>
|
||||
* Clem Morton
|
||||
* Daniel Oaks <danneh@danneh.net>
|
||||
* Fabio Scotoni <cculex@gmail.com>
|
||||
* ItsOnlyBinary
|
||||
* Jason Foster <retsofaj@gmail.com>
|
||||
* Jeremy <jeremy@ssnet.ca>
|
||||
* Josh Soref
|
||||
* KindOne <ineedalifetoday@live.com>
|
||||
* linuxdaemon
|
||||
* Mantas Mikulėnas <grawity@gmail.com>
|
||||
* Matthew Beeching <jobe@mdbnet.co.uk>
|
||||
* Michael <michaelhazell@hotmail.com>
|
||||
* Mingjie Shen <shen497@purdue.edu>
|
||||
* nekoswag
|
||||
* Peter Tseng <pht24@cornell.edu>
|
||||
* Romain Rivière <lecoyote@lecoyote.org>
|
||||
* Sam James (sam_c) <sam@cmpct.info>
|
||||
* ShutterQuick <shutter@canternet.org>
|
||||
* Sketch <denverfreeburn@outlook.com>
|
||||
* Tim Gunter <tim@vanillaforums.com>
|
||||
* Toni Kaija <diftraku@gmail.com>
|
||||
* Victor Coss <gtaxl@gtaxl.net>
|
||||
* VisioN <vision@myirc.us>
|
||||
* westor <westor7@gmail.com>
|
||||
* Wilson Birney <wpb@360scada.com>
|
||||
* Yann Sionneau <yann@sionneau.net>
|
||||
* Zach Bloomquist <zrbq@live.com>
|
||||
@@ -1,4 +0,0 @@
|
||||
Reported Bugs from Bugzilla: http://bugs.anope.org/
|
||||
---------------------------------------------------
|
||||
|
||||
|
||||
-106
@@ -1,106 +0,0 @@
|
||||
C++-style Casting
|
||||
=================
|
||||
|
||||
In C, you can cast in one of two ways:
|
||||
|
||||
(type)var
|
||||
type(var)
|
||||
|
||||
The problem with C-style casting is that it allows a programmer to get away
|
||||
with too much, and is also not designed to handle C++ classes.
|
||||
|
||||
C++ has 4 types of casting in addition to allowing C-style casting. They are:
|
||||
|
||||
static_cast
|
||||
const_cast
|
||||
dynamic_cast
|
||||
reinterpret_cast
|
||||
|
||||
The syntax is usually *_cast<type>(var).
|
||||
|
||||
static_cast
|
||||
-----------
|
||||
|
||||
From my expierence, this cast is closest to C-style casting for non-pointer
|
||||
types as well as between some (but not all) pointer types. This type of cast,
|
||||
like C-style casting, is performed at compile-time. static_cast can also do
|
||||
a downcast of a derived class to a base class, but only if the base class is
|
||||
not a virtual base class. Sometimes the result of this cast can become
|
||||
undefined. static_cast is a bit more strict that C-style casting, though. It
|
||||
disallows certain class conversions that would've been allowed with a C-style
|
||||
cast. static_cast also doesn't allow you to cast to an incomplete type. In
|
||||
these cases, I would try either dynamic_cast or reinterpret_cast.
|
||||
|
||||
const_cast
|
||||
----------
|
||||
|
||||
This cast is mainly to add or remove const-ness or volatile-ness from a
|
||||
variable. This is safer than using a C-style cast to change the const-ness
|
||||
of a variable. In most cases if you try to use one of the other casts and it
|
||||
complains about const-ness, you will want to either use this cast instead or
|
||||
wrap the other cast around this cast. An example:
|
||||
|
||||
const int *a;
|
||||
static_cast<void *>(a); <-- This will fail.
|
||||
|
||||
To remedy the above, you would might try this:
|
||||
|
||||
const int *a;
|
||||
const_cast<void *>(a); <-- But this will still fail.
|
||||
|
||||
The real solution is this:
|
||||
|
||||
const int *a;
|
||||
static_cast<void *>(const_cast<int *>(a));
|
||||
|
||||
It is not recommended to use const_cast on the this variable within a member
|
||||
function of a class that is declared const. Instead you should use the mutable
|
||||
keyword on the variable in the class's definition.
|
||||
|
||||
dynamic_cast
|
||||
------------
|
||||
|
||||
This cast can only be used on pointers or references to classes. It can cast a
|
||||
derived class to a base class, a derived class to another derived class
|
||||
(provided that both are children of the same base class), or a base class to a
|
||||
derived class. You can also use this to cast a class to void *. This cast is
|
||||
done at run-time as opposed to the other casts, and relies on C++'s RTTI to be
|
||||
enabled. It is meant to be used on polymorphic classes, so use static_cast on
|
||||
non-polymorphic classes.
|
||||
|
||||
derived-to-base conversions are actually done statically, so you use either
|
||||
dynamic_cast or static_cast on them, regardless of if the classes are
|
||||
polymorphic or not.
|
||||
|
||||
derived-to-derived or base-to-derived conversions, however, rely on run-time
|
||||
type information, and this cast is used on those classes that are polymorphic.
|
||||
This is safer than C-style casting in that an invalid pointer conversion will
|
||||
return a NULL pointer, and an invalid reference conversion will throw a
|
||||
Bad_cast exception.
|
||||
|
||||
reinterpret_cast
|
||||
----------------
|
||||
|
||||
This cast I would use only as a last resort if static_cast isn't allowed on a
|
||||
conversion. It allows for conversions between two unrelated types, such as
|
||||
going from char * to int *. It can also be used to convert a pointer to an
|
||||
integral type and vica versa. The sites I've read mention how the result is
|
||||
non-portable, which I assume means the resulting object code is non-portable,
|
||||
so since the code is compiled on many systems anyways, I don't see this as
|
||||
being a huge issue. It is recommended to only use this if necessary, though.
|
||||
|
||||
Links
|
||||
=====
|
||||
|
||||
The following links are web sites I've used to get this information, and might
|
||||
describe some of the above a bit better than I have. :P
|
||||
|
||||
http://www.acm.org/crossroads/xrds3-1/ovp3-1.html
|
||||
http://www.cplusplus.com/doc/tutorial/typecasting.html
|
||||
http://www.codeguru.com/forum/showthread.php?t=312456
|
||||
http://www.cs.umd.edu/class/sum2003/cmsc311/Notes/BitOp/cast.html
|
||||
http://msdn.microsoft.com/en-us/library/5f6c9f8h(VS.80).aspx
|
||||
http://en.wikibooks.org/wiki/C%2B%2B_Programming/Type_Casting
|
||||
http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=134
|
||||
|
||||
-- CyberBotX, Nov 23, 2008
|
||||
+4
-4
@@ -6,10 +6,10 @@ if(WIN32)
|
||||
if(IN_SOURCE)
|
||||
# Add README.txt to list of files for CPack to ignore
|
||||
add_to_cpack_ignored_files("README.txt$" TRUE)
|
||||
endif(IN_SOURCE)
|
||||
set(DOCS DEFCON FAQ INSTALL MODULES NEWS PROXY ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
|
||||
endif()
|
||||
set(DOCS Changes Changes.conf DEFCON FAQ INSTALL LANGUAGE MODULES ${CMAKE_CURRENT_BINARY_DIR}/README.txt WIN32.txt)
|
||||
install(FILES ${DOCS}
|
||||
DESTINATION docs
|
||||
DESTINATION ${DOC_DIR}
|
||||
)
|
||||
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${CMAKE_CURRENT_BINARY_DIR}/README.txt")
|
||||
endif(WIN32)
|
||||
endif()
|
||||
|
||||
-170
@@ -1,170 +0,0 @@
|
||||
Orginally pulled from: http://www.inspircd.org/wiki/Coding_Guidelines
|
||||
Yes, I'm aware the formatting of this document is ugly. It'll be fixed when someone cares. Read the wiki page if you want pretty for now.
|
||||
|
||||
---
|
||||
|
||||
|
||||
InspIRCd Coding Guidelines
|
||||
|
||||
The following are a set of guidelines for writing patches to InspIRCd, or for creating modules for distribution with the official package. These
|
||||
guidelines were written a time after InspIRCd development started, and so not all code yet follows these. This will be rectified with time.
|
||||
|
||||
|
||||
1. Comments
|
||||
Multi Line
|
||||
Multiple line comments should follow the C-style comment, for example:
|
||||
/*
|
||||
* This is a multiple line comment, huzzah..
|
||||
*/
|
||||
|
||||
Single Line
|
||||
Single line comments should also be in the C style, for example:
|
||||
/* This is a boring one-line comment */
|
||||
|
||||
Doxygen commenting
|
||||
If you wish your comment to show in doxygen, the comment should be directly above the item you are documenting (a class, function, enum, etc)
|
||||
and the first line should be "/**". For example:
|
||||
/** This is a doxygen multiline comment.
|
||||
* Description of thingymebob here.
|
||||
*/
|
||||
The first line after the "**" is used as the short description of the item (up to the full stop) and everything afterwards as the detailed
|
||||
description.
|
||||
|
||||
Indentation
|
||||
Tabs. Tabs. ONLY TABS. Use a single tab for each level of indentation, for example:
|
||||
int main()
|
||||
{
|
||||
<tab>if (condition)
|
||||
<tab>{
|
||||
<tab><tab>code
|
||||
<tab>}
|
||||
}
|
||||
|
||||
|
||||
Separation
|
||||
Always put a space in between a keyword like if/while and the condition, for example:
|
||||
if (foo == bar)
|
||||
NOT
|
||||
if(foo == bar)
|
||||
|
||||
Braces
|
||||
Always put braces opening and closing blocks on separate lines, see the identation example. For example, place braces like this:
|
||||
if (apples == "green")
|
||||
{
|
||||
cout << "Apples are green" << endl;
|
||||
}
|
||||
|
||||
and not:
|
||||
if (apples == "green") {
|
||||
cout << "Apples are green" << endl;
|
||||
}
|
||||
The one exception to this is if you are declaring a class method which is only one line long, in that case the following is acceptable in most cases:
|
||||
class foo : public bar
|
||||
{
|
||||
foo() { }
|
||||
getrandomfoo() { return rand(); }
|
||||
};
|
||||
|
||||
Templates
|
||||
Where possible, use templates rather than #defines. Avoid use of RTTI.
|
||||
Structs
|
||||
Structs should be declared in the following fashion:
|
||||
struct BodyPartBasket
|
||||
{
|
||||
int arms;
|
||||
int legs;
|
||||
int scrotalsacs;
|
||||
};
|
||||
and not like this:
|
||||
typedef struct
|
||||
{
|
||||
int arms;
|
||||
int legs;
|
||||
int scrotalsacs;
|
||||
} BodyPartBasket;
|
||||
The second way is not required in C++ to be able to do this:
|
||||
BodyPartBasket mybasket;
|
||||
Plus, placing the name at the bottom of the declaration makes readability more difficult (as you have to scroll down to the bottom of the
|
||||
struct to find its name).
|
||||
(where possible, call them classes rather than structs.)
|
||||
|
||||
Variable naming
|
||||
Class and struct names should be in camel case with a leading capital letter, for example "MyBagOfBones" and not "my_bag_of_bones" or
|
||||
"mybagofbones". Variable names can be in either camel case with a leading capital letter or alternatively all lower case, so long as the same
|
||||
naming convention is adhered to throughout the class. No classes or variables should be named in capitals unless this makes sense for the
|
||||
name (for example "class DNS"). Constants and enum values should always be completely in CAPITALS and underscores may be used, for example:
|
||||
enum DecayState
|
||||
{
|
||||
DECAYED_MOULDY = 0,
|
||||
DECAYED_SMELLY = 1,
|
||||
DECAYED_MAGGOTS = 2
|
||||
};
|
||||
All value names in an enum should be started with the same text which should be related in some way to the enum's use. For example "DNS_CNAME,
|
||||
DNS_A, DNS_AAAA".
|
||||
|
||||
Use of references
|
||||
Wherever possible, when dealing with any complex class, pass a const reference rather than a copy of the class. For example:
|
||||
MyThingy::MyThingy(const std::string &thingyvalue)
|
||||
{
|
||||
}
|
||||
Of course, if you intended to change the string you can just omit the 'const'.
|
||||
|
||||
Use of char pointers
|
||||
Whenever you use char pointers (char*, char**) try to use const equivalents. This is much safer and avoids ugly and dangerous casts. For example:
|
||||
MyThingy::Thingify(const char* const* wotsits)
|
||||
{
|
||||
}
|
||||
If it is possible without performance loss, consider avoiding char pointers altogether and using std::string instead.
|
||||
|
||||
Use of STL
|
||||
For more information on use of STL in InspIRCd, please see the separate STL FAQ.
|
||||
|
||||
Making copies of data
|
||||
Never ever make a copy of a piece of data unless it is absolutely necessary. For example, don't use strlcpy() to make a copy of the const char* string
|
||||
returned by std::string::c_str(), if the change can be done to the std::string itself. The same goes for unnecessary variable assignments, especially
|
||||
those which assign large classes.
|
||||
|
||||
namespace std
|
||||
Avoid the following:
|
||||
using namespace std;
|
||||
It might take a bit more typing, but things work better if you don't set (then later assume) the namespace -- specify it explicitly when you want to
|
||||
use it.
|
||||
|
||||
Linefeeds
|
||||
Unix linefeeds only please. We do not like to see our screens covered in ^M. :-)
|
||||
|
||||
Portability
|
||||
Always make sure your code is portable to all supported operating systems, remember of course that as of 1.1.8 this includes windows. Don't write code
|
||||
that only works on windows, or only works on Linux. Test your code on all platforms or ask for help from other developers who have the platforms you
|
||||
want to test on.
|
||||
|
||||
new() and delete(), malloc() and free()
|
||||
Apart from the fact that using malloc() and free() is bad practice in C++ code, you must never use malloc() or free() in InspIRCd, within its modules
|
||||
or within the core. This is because if you use malloc() or free() in windows, the memory is claimed from the program's local heap. In windows, each
|
||||
shared object (module, dll) has its own heap, which is protected from other dlls and executables. To get around this issue and allow more posix-like
|
||||
memory access from other dlls in the program (other modules), InspIRCd overrides the operators new and delete to ensure that memory allocated by them
|
||||
comes from the windows global heap. If you use malloc() and free() for this, the ircd will segfault when another module tries to access the memory you
|
||||
have allocated!
|
||||
|
||||
strdup()
|
||||
As with malloc(), above, strdup() should be avoided. Where strdup() is absolutely necessary, use strnewdup() which is our strdup() implementation that
|
||||
calls operator new instead of using malloc(). char arrays allocated by strnewdup() should be deleted with operator delete[].
|
||||
|
||||
CoreExport and DllImport
|
||||
Prefix all types you want to import or export to other modules with CoreExport and DllImport macros. These do nothing in POSIX operating systems,
|
||||
however in windows these are expanded to the instructions __declspec(dllimport) and __declspec(dllexport) respectively depending on where they are
|
||||
used and how.
|
||||
|
||||
External Dependencies
|
||||
If a module is compiled as standard, or the code is part of the core, you must not use any dependencies that are not available as standard on all
|
||||
supported operating systems beyond libstdc++, libc, and whatever else is currently required to build the core. Modules which use nonstandard
|
||||
dependencies belong in the modules/extra directory.
|
||||
|
||||
Profiling and Performance
|
||||
It is one thing to assume that code performs bad, it is another thing to prove that it actually is. A lot of experienced programmers talk about
|
||||
'premature optimisation', and here is what it means: if you have a piece of code called once on startup that takes 10 seconds instead of one second to
|
||||
run, and a piece of code that takes 0.05 seconds to run when it should take 0.01, and it is called once per second, the second piece of code is the
|
||||
priority.
|
||||
In other words, make sure that what you think is slow, and a performance problem in Insp actually is.
|
||||
To do this, use the callgrind tool from Valgrind (valgrind --tool=cachegrind bin/inspircd -nofork -debug), and kcachegrind (or similar) to view the
|
||||
output files.
|
||||
+260
-252
@@ -1,339 +1,347 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
675 Mass Ave, Cambridge, MA 02139, USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
|
||||
Preamble
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the entire
|
||||
whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
b) Accompany it with a written offer, valid for at least three years,
|
||||
to give any third party, for a charge no more than your cost of
|
||||
physically performing source distribution, a complete machine-readable
|
||||
copy of the corresponding source code, to be distributed under the terms
|
||||
of Sections 1 and 2 above on a medium customarily used for software
|
||||
interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is allowed
|
||||
only for noncommercial distribution and only if you received the program
|
||||
in object code or executable form with such an offer, in accord with
|
||||
Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent license
|
||||
would not permit royalty-free redistribution of the Program by all those
|
||||
who receive copies directly or indirectly through you, then the only way
|
||||
you could satisfy both it and this License would be to refrain entirely
|
||||
from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is implemented
|
||||
by public license practices. Many people have made generous contributions
|
||||
to the wide range of software distributed through that system in reliance
|
||||
on consistent application of that system; it is up to the author/donor to
|
||||
decide if he or she is willing to distribute software through any other
|
||||
system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
This section is intended to make thoroughly clear what is believed to be
|
||||
a consequence of the rest of this License.
|
||||
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Appendix: How to Apply These Terms to Your New Programs
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make
|
||||
it free software which everyone can redistribute and change under
|
||||
these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) 19yy <name of author>
|
||||
<one line to give the program's name and an idea of what it does.>
|
||||
Copyright (C) yyyy name of author
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301, USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
|
||||
type `show w'. This is free software, and you are welcome
|
||||
to redistribute it under certain conditions; type `show c'
|
||||
for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
|
||||
|
||||
|
||||
+249
-94
@@ -1,100 +1,255 @@
|
||||
Anope Version 1.9.2
|
||||
Anope Version 2.1.14-git
|
||||
------------------------
|
||||
Added a detail specifier to the anope.list{Channels,Opers,Servers,Users} RPC methods.
|
||||
Added a matcher for the InspIRCd oper extban.
|
||||
Added support for hashed operator passwords.
|
||||
Added support for hiding the date news was added in os_news.
|
||||
Added support for local password comparison to the sql_authentication module.
|
||||
Added support for monthly backups to db_json.
|
||||
Added support for unbanning virtual modes using cs_unban.
|
||||
Added the !unmute fantasy command.
|
||||
Added the anope.account and anope.listAccounts RPC methods to the rpc_data module.
|
||||
Added the protection time to the INFO output.
|
||||
Allowed unprivileged channel successors to remove themselves from succession.
|
||||
Bumped the minimum required CMake version to 3.20.
|
||||
Changed deletion callbacks to specify the mask that was deleted if only one was.
|
||||
Changed nickserv/alist to show all permissions not just the highest ranked one.
|
||||
Fixed NEVEROP not being respected in chanserv/set/founder and chanserv/set/successor.
|
||||
Fixed stripping IRC formatting codes from messages.
|
||||
Messages are now automatically line wrapped to options:linelength.
|
||||
Redocumented the ns_sasl module.
|
||||
Removed hardcoded command names from several messages.
|
||||
Updated the Windows CI to Windows Server 2025 and Visual Studio 2022.
|
||||
|
||||
Anope Version 2.1.13
|
||||
--------------------
|
||||
A K alias to chanserv kick command
|
||||
A KB alias to chanserv ban command
|
||||
A The ability to register empty nonregistered channels
|
||||
A Flatfile plaintext databases and removed old binary ones
|
||||
A Added in live updating SQL and the ability to execute commands through SQL (see docs/MYSQL)
|
||||
A Added support for many more modes into Anope and the ability to have generic support for modes unknown to Anope
|
||||
A Added a mode stacker to combine many mode changes into fewer
|
||||
A Added in the CS SET PERSIST command which can be used to keep service bots in channels even when the channel is empty
|
||||
A Added AUTOOWNER OWNER and OWNERME into CS LEVELS
|
||||
A Added ns_resetpass module to the core
|
||||
A CS ACCESS VIEW which shows who added the access and last time used
|
||||
A Last used time to CS AKICK VIEW
|
||||
A Added a sha_256 encryption module
|
||||
A Added the ability to load multiple encryption modules, and the ability to seamlessly convert your database between diferent encryptions
|
||||
A Added configuration options to allow Anope to reconnect if it disconnects from the uplink instead of dieing
|
||||
A Added support for linking with IPv6
|
||||
F Unban command to accept an optional nick arg
|
||||
F Some typos in services.conf
|
||||
F Crash when users change their host that are identified to a group, but not a nick
|
||||
F Host length checking in HS SET(ALL) and HS REQUEST
|
||||
F Only show if a user is online in NS INFO if they are really identiifed for the group of the nick they are on
|
||||
F Crash when using BSSmartJoin
|
||||
F Converting access entries to access from xop when a users access is below voice
|
||||
F A bad pointer passed to the OnDelEvent which could cause some 3rd party modules to crash
|
||||
F CS FORBID allows to you forbid unregistered channels
|
||||
F The -nothird command line option to work
|
||||
F ms_rsend to really work
|
||||
F SQUITing juped servers on InspIRCd1.2+
|
||||
Added a Config check to ensure users actually want to use the development branch.
|
||||
Added a flag to the version string when Anope is compiled in reproducible mode.
|
||||
Added a warning on rehash when the max password is longer than the maximum bcrypt password length.
|
||||
Added an ALLTIME handler on InspIRCd.
|
||||
Added an opt-out for extended XML-RPC types.
|
||||
Added RPC messages for sending global messages.
|
||||
Added support for importing cs_set_misc and ns_set_misc data from Atheme.
|
||||
Added support for importing news from Atheme.
|
||||
Added support for oper-only quit messages.
|
||||
Added support for the experimental "services cloak" system from the InspIRCd development branch.
|
||||
Added support for using defines from the environment.
|
||||
Added support for using defines within the value of a variable.
|
||||
Blacklisted an old version of an UnrealIRCd module that is known to send malformed S2S messages.
|
||||
Changed RPC events to be registered as core services.
|
||||
Changed the database to refer to accounts by their account identifier instead of their display nick.
|
||||
Changed the syntax of defines from "foo" to "${foo}".
|
||||
Deduplicated JSON generation code in the jsonrpc module.
|
||||
Fixed a warning when importing an Atheme account that uses external authentication.
|
||||
Fixed counting email addresses in ns_maxemail.
|
||||
Fixed db_atheme creating duplicate accounts, bots, and nicks when importing over an existing database.
|
||||
Fixed deleting old database backups after Anope has been restarted.
|
||||
Fixed importing user metadata from Anope 1.8.
|
||||
Fixed including a port in uplink messages when connecting to a UNIX socket endpoint.
|
||||
Fixed memo ignores being erroneously case sensitive.
|
||||
Fixed modules with third-party dependencies writing generic log messages instead of module log messages.
|
||||
Fixed not performing SQL database updates in some rare circumstances.
|
||||
Fixed sending global messages with the default sender.
|
||||
Imported mkauthors from InspIRCd and used it to generate docs/AUTHORS.txt
|
||||
Moved around a bunch of module headers.
|
||||
Moved database serialization from the serializable to the serializable type.
|
||||
Moved the SASL protocol interface to its own service.
|
||||
Refactored handling S2S metadata on InspIRCd.
|
||||
Updated more messages to use gettext plural forms.
|
||||
|
||||
Anope Version 1.9.1
|
||||
Anope Version 2.1.12
|
||||
--------------------
|
||||
F Don't enforce akick/forbidden/etc.-restrictions on clients on ulined servers.
|
||||
F Remove modules_unload_all fini + hack that goes with it.
|
||||
F Signal handling cleanup.
|
||||
A Seamless fantasy support on all ChanServ commands, instead of requiring bs_fantasy_*.
|
||||
F Allow fantasy to be disabled on some commands (e.g. FORBID).
|
||||
F Some commands (e.g. !help) need to strip the pre-provided channelname from them.
|
||||
D HelpServ removed
|
||||
F Command parser cleanup: mod_current_buffer removed and replaced with proper parser. Commands now indicate how they want the buffer split.
|
||||
F Make NS ENFORCE/RELEASE stuff more sane, redo timers.
|
||||
A Opertypes (similar to InspIRCd's opertypes)
|
||||
Added an example JavaScript library for accessing the RPC interface.
|
||||
Added an option to require specifying the server name when running destructive network commands like restart or shutdown.
|
||||
Added support for importing X-line identifiers from Atheme.
|
||||
Added support for JSON-RPC to the RPC interface.
|
||||
Added support for killing SASL users that fail to log in repeatedly.
|
||||
Added support for more RPC response types to the RPC interface.
|
||||
Added support for multiple targets in chanserv/modes.
|
||||
Added support for SSL client certificate fallback fingerprints on InspIRCd.
|
||||
Added the anope. prefix to the channel and user RPC events and moved them to the rpc_data module.
|
||||
Added the anope.listChannels, anope.listServers, anope.listUsers, and anope.server RPC events to the new rpc_data module.
|
||||
Added the OPERONLY, UNUSED and VANITY filters to botserv/botlist.
|
||||
Added the system.listMethods RPC event to the new rpc_system module.
|
||||
Deprecated support for InspIRCd v3 (scheduled to be removed in around a year).
|
||||
Fixed enc_bcrypt silently truncating passwords longer than 71 characters.
|
||||
Fixed ns_set_language being able to be loaded when Anope was built without language support.
|
||||
Fixed sql_authentication not being able to use the IP address of a RPC, SASL, or web user in SQL queries.
|
||||
Made modules that use third-party libraries log the version in use on load.
|
||||
Redesigned the RPC interface to add support for emitting multiple data types.
|
||||
Replaced the opers RPC event with rpc.listOpers and rpc.oper events in the new rpc_data module.
|
||||
Updated the Dutch translation.
|
||||
|
||||
Provided by Ankit <ankit@nevitus.com> - 2009
|
||||
F Segfault on shutdown
|
||||
|
||||
Provided by Adam <adam@anope.org> - 2009
|
||||
F NickServ registration is sometimes denied.
|
||||
F Applied patch from Adam to fix some potential screwups
|
||||
F More fixes to bs_bot from Adam, plus an extra fix within DoAdd not covered in Adam's patch.
|
||||
F Fix bs_bot to use the correct parameters, patch from Adam.
|
||||
F Fix for bug #1004, based from second half of patch from Adam.
|
||||
F Partial patch by Adam, commenting fix for #1006 for future reference.
|
||||
F Forward-port r1946: Patch by Adam fixing #1006 (originally caused by #922): modes set by ChanServ are reversed. Thanks!
|
||||
|
||||
Provided by DukePyrolator <dukepyrolator@gmx.de> - 2009
|
||||
F Patch converting all match calls to new method, thanks!
|
||||
F Add 'w' and 'y' support to dotime(), also prevent an overflow.
|
||||
F Allow NS STATUS from unregistered users, thanks DP!
|
||||
F Wild pointers do not a happy Anope make. Thanks DP :)
|
||||
F Allow NS REGISTER to unregistered nicks, silly oversight. Thanks DP! :)
|
||||
F Fix call order, thanks to DP
|
||||
F Pass the right array to do_umode(), fixes mode tracking on Unreal. Thanks to DukePyrolator (yet again :P)
|
||||
F Fix bs_set help, thanks to DukePyrolator! :)
|
||||
F Fix two segfaults, noted by DukePyrolator. Thanks!
|
||||
F Fix part one of #1010, reported by DukePyrolator. (Language settings are not respected in message sending.) Thanks!
|
||||
F Memory leak on +beI modes.
|
||||
|
||||
Provided by Liber <Liber@jasonirc.net> - 2009
|
||||
F Support operoverride and such things (stop reversing changes from nonopped people where unnecessary)
|
||||
|
||||
Anope Version 1.9.0
|
||||
Anope Version 2.1.11
|
||||
--------------------
|
||||
F Modified compile to use g++
|
||||
F Improve protocol modules support (classes, virtual methods, etc)
|
||||
F Move core services to use BotInfo
|
||||
F Move BotInfo and related methods into a class
|
||||
F Move modules into a class
|
||||
F Fixed ns resending of passcode issue
|
||||
F Modules now delete themselves
|
||||
F additional field where users' masked host can be stored so both masked IP and vhost are available instead of just one.
|
||||
F No struct Uid, ugly, and, unnecessary that we store UID in BotInfo.
|
||||
F Prevent deletion of core services via /bs bot
|
||||
F Module subsystem cleanup ('modules' branch)
|
||||
F Move modules to use classes somewhat (AnopeInit, AnopeFini)
|
||||
F Change MODULE_INIT to return a pointer
|
||||
F Remove duplicate module creation.. have loadModule return a pointer rather than creating one
|
||||
F Remove buffered loading/unloading, this makes os_modunload perm, but who cares
|
||||
F Remove 'delayed' loading, this is necessary because of before/after connected to ircd (ircd is before, rest after), I'm sure this can be done better.
|
||||
A Remove old config, replace with insp-inspired (albeit bind format) config (CBX)
|
||||
F Clean up protocol modules a bit
|
||||
A InspIRCd 1.2 support
|
||||
F Remove old (prior to 1.8.0) db compat
|
||||
F Establish a proper base for services pseudoclients
|
||||
F Add ss_main StatServ Hal9000 to play with :)
|
||||
F Burn automake with fire (CBX)
|
||||
Added support for database migrations to the mysql module.
|
||||
Added support for renicking users to their UID when enforcing nickname protection.
|
||||
Added support for sending channel URLs to joining users.
|
||||
Allowed selecting languages using a shorter version of their name.
|
||||
Changed various messages to use human-readable durations instead of seconds.
|
||||
Improved the creation of expiry and duration messages.
|
||||
Improved the translation system with support for plural forms.
|
||||
Reworked how guest nicknames are generated.
|
||||
Simplified how account identifiers are allocated.
|
||||
|
||||
Provided by mooncup <mooncup@anonnet.org> - 2009
|
||||
F Automatically reapply vhost on hs off for unreal.
|
||||
Anope Version 2.1.10
|
||||
--------------------
|
||||
Added support for NEXTBANS on UnrealIRCd.
|
||||
Changed hostmask access entries added by nick to use that nick as the default description.
|
||||
Changed modes to be handled internally in their split form.
|
||||
Changed ns_cert to notify a user that their certificate is being automatically added to their account.
|
||||
Fixed matching users against extended bans.
|
||||
Fixed parsing name-only extended bans on InspIRCd.
|
||||
Fixed respecting the preferred extended ban format on InspIRCd.
|
||||
Fixed the name of the cron script in the docs.
|
||||
Updated the list of supported IRCds.
|
||||
Updated the location of the Anope IRC channels
|
||||
|
||||
Anope Version 2.1.9
|
||||
-------------------
|
||||
Bumped the minimum supported version of UnrealIRCd to 6.
|
||||
Fixed granting IRC operator status to services operators.
|
||||
Fixed making users an IRC operator on InspIRCd.
|
||||
Fixed nonicknameownership on InspIRCd v4.
|
||||
Fixed some messages not being translatable.
|
||||
Fixed the Argon2 module not having test vectors.
|
||||
Increased the default nickname expiry period to one year.
|
||||
|
||||
Anope Version 2.1.8
|
||||
-------------------
|
||||
Added account identifiers to the nickserv/info output.
|
||||
Added support for bool, float, and uint SQL columns.
|
||||
Added the ability to automatically determine SQL column types based on the native type.
|
||||
Added UNIX socket support to mysql module.
|
||||
Changed smartjoin to use SendClearBans where available.
|
||||
Dropped support for MinGW in favour of native builds.
|
||||
Fixed parsing named extbans on InspIRCd.
|
||||
Fixed parsing SVSMODE and SVS2MODE from UnrealIRCd.
|
||||
Fixed sending global messages to remotely linked servers.
|
||||
Removed the services server name from the CTCP version response.
|
||||
|
||||
Anope Version 2.1.7
|
||||
-------------------
|
||||
Added importing of akick reasons, forbid reasons, opers and session exceptions to db_atheme.
|
||||
Added support for sending tag messages.
|
||||
Added the ability to look up account information of an authenticated user.
|
||||
Fixed a crash in ns_cert when an IRC user is not present during a nick registration.
|
||||
Fixed a null pointer dereference in the global module.
|
||||
Fixed a rare memory leak in os_akill and os_sxline.
|
||||
Improved the performance of some code that looks up the primary nick from an account.
|
||||
Removed the broken Catalan, Hungarian, and Russian translations.
|
||||
Reworked the protocol interface for sending messages.
|
||||
Updated the Turkish translation.
|
||||
|
||||
Anope Version 2.1.6
|
||||
-------------------
|
||||
Added opportunistic upgrading of TLS fingerprints to more secure algorithms on InspIRCd.
|
||||
Added support for logging out partially connected users on Plexus.
|
||||
Added the account registration time to nickserv/info.
|
||||
Changed ns_cert to automatically add a TLS fingerprint to new accounts if available.
|
||||
Clarified that a non-deprecated encryption module must be loaded.
|
||||
Fixed creating the runtime directory on Windows.
|
||||
Fixed mistakenly allowing badpasslimit to be set to a negative value.
|
||||
Fixed parsing backup TLS fingerprints on InspIRCd.
|
||||
Fixed parsing the flood mode on UnrealIRCd.
|
||||
Fixed parsing the history mode on UnrealIRCd.
|
||||
Fixed various iterator invalidation issues.
|
||||
Partially rewrote the Portuguese translation.
|
||||
Removed some incorrect strings from the Turkish translation.
|
||||
Renamed the --modulesdir option to --moduledir to match the name of other path options.
|
||||
|
||||
Anope Version 2.1.5
|
||||
-------------------
|
||||
Added an example systemd unit file.
|
||||
Added support for BIGLINES on UnrealIRCd.
|
||||
Bumped the minimum supported version of Bahamut to 2.0.
|
||||
Fixed truncating messages in global/global and global/server.
|
||||
Improved building Anope for use as a system package.
|
||||
Updated the Turkish translation.
|
||||
|
||||
Anope Version 2.1.4
|
||||
-------------------
|
||||
Added a check for a non-deprecated encryption module on start.
|
||||
Added a way for protocol modules to report an error to the uplink.
|
||||
Added more account settings to the webcpanel.
|
||||
Added self-test functionality for all encryption modules.
|
||||
Added support for challenge authentication on InspIRCd.
|
||||
Added support for importing databases from Atheme.
|
||||
Added support for sending client tags on UnrealIRCd.
|
||||
Added support for the InspIRCd 1206 (v4) protocol.
|
||||
Added the --nopid option to disable writing a pid file.
|
||||
Added the enc_argon2 module to encrypt passwords with Argon2.
|
||||
Added the enc_sha2 module to encrypt passwords with HMAC-SHA-2.
|
||||
Added the global/queue command for queueing multi-line messages.
|
||||
Added the global/server command for sending messages to an individual server.
|
||||
Added the PASSWORD category to operserv/stats to view password encryption methods.
|
||||
Added the verify-only enc_posix module to validate passwords from Atheme that were encrypted with Argon2.
|
||||
Changed nickserv/drop to use confirmation codes to confirm a nickname drop.
|
||||
Changed various paths to be relative to the data and config directories.
|
||||
Converted some IRCDProto member functions to variables.
|
||||
Converted the enc_md5, enc_none, enc_old, enc_sha1, and enc_sha256 modules to be verify-only.
|
||||
Deduplicated page headers and footers in the webcpanel templates.
|
||||
Deprecated the enc_sha256 module.
|
||||
Fixed inconsistent spelling/casing of email, vhost, and vident.
|
||||
Fixed various bugs in the inspircd module.
|
||||
Improved portability of email sending.
|
||||
Improved protocol debug messages.
|
||||
Improved the performance and reliability of internal conversion logic.
|
||||
Improved the randomness of randomly generated numbers.
|
||||
Refactored the enc_bcrypt module and exposed it as an encryption context.
|
||||
Removed several duplicate translation strings.
|
||||
Replaced the custom MD5 implementation in enc_md5 with a vendored one.
|
||||
Replaced the custom SHA256 implementation in enc_sha256 with a vendored one.
|
||||
The ldap_authentication, ldap_oper, sql_authentication, sql_log, and sql_oper modules are now always enabled.
|
||||
|
||||
Anope Version 2.1.3
|
||||
-------------------
|
||||
Added alternate command suggestions when a user runs an invalid command.
|
||||
Added support for the IRCv3 +draft/channel-context tag.
|
||||
Added support for the IRCv3 +draft/reply tag.
|
||||
Allow using more than one fingerprint in an oper block.
|
||||
Changed chanserv/drop to use confirmation codes to confirm a channel drop.
|
||||
Cleaned up more of the codebase to use Modern C++17.
|
||||
Enabled using more field limits sent by the IRC server instead of requiring the user to configure them.
|
||||
Fixed NickServ lying about the minimum password length.
|
||||
Fixed a crash when sending emails.
|
||||
Fixed bs_kick not using the correct kick message for automatic kicks.
|
||||
Increased the security of randomly generated confirmation codes.
|
||||
Removed the ns_access module and associated cs_secure and ns_secure options.
|
||||
Removed the ns_status module.
|
||||
Reworked how messages are sent in protocol modules to allow sending message tags.
|
||||
|
||||
Anope Version 2.1.2
|
||||
-------------------
|
||||
Bumped the minimum OpenSSL version to 1.1.0.
|
||||
Bumped the minimum GnuTLS version to 3.0.0.
|
||||
Disabled SSLv3 support in the m_ssl_openssl module.
|
||||
Modernized mutex and thread code to use Modern C++.
|
||||
Normalised the program exit codes.
|
||||
Updated the Dutch translation.
|
||||
Updated the French translation.
|
||||
|
||||
Anope Version 2.1.1
|
||||
-------------------
|
||||
Added the UNBANME privilege to allow users to unban themselves.
|
||||
Fixed building on Windows systems without chgrp/chmod.
|
||||
Fixed creating sockets in the m_dns, m_httpd, m_proxyscan, and m_redis modules.
|
||||
Fixed reading the values of command line arguments.
|
||||
Moved core privilege descriptions to the example configs.
|
||||
Updated the Italian translation.
|
||||
Updated the Polish translation.
|
||||
|
||||
Anope Version 2.1.0
|
||||
-------------------
|
||||
Added support for access list entry descriptions.
|
||||
Added support for linking over a UNIX socket.
|
||||
Added support for server-initiated logins and logouts on UnrealIRCd.
|
||||
Added support for server-initiated logouts on InspIRCd.
|
||||
Added support for the ANONYMOUS SASL mechanism.
|
||||
Allowed users to opt-out of being added to channel access lists.
|
||||
Cleaned up the codebase to use Modern C++17.
|
||||
Modernized the build system to use a modern version of CMake.
|
||||
Removed support for using insecure encryption methods as the primary method.
|
||||
Removed the Windows-only anopesmtp tool.
|
||||
Removed the two day X-line cap.
|
||||
Updated all references to IRCServices to refer to Anope instead.
|
||||
|
||||
+140
-45
@@ -1,52 +1,147 @@
|
||||
Anope Version 1.9.2
|
||||
Anope Version 2.1.14-git
|
||||
------------------------
|
||||
Added oper:password_hash.
|
||||
Added options:codelength (defaults to 15).
|
||||
Added {os_news}:showdate (defaults to yes).
|
||||
Added {sql_authentication}:password_field (defaults to "password").
|
||||
Added {sql_authentication}:password_hash.
|
||||
Changed the default value for options:linelength to "100".
|
||||
Changed the default value for {enc_sha2}:algorithm to "sha512".
|
||||
Changed the default value for {ns_seen}:purgetime to "90d".
|
||||
Changed the syntax for template variables in mail:emailchange_message, mail:emailchange_subject, mail:memo_message, mail:memo_subject, mail:registration_message, mail:registration_subject,, mail:reset_message, mail:reset_subject, {chanserv}:signkickformat, {dnsbl}:blacklist:reason, {ldap_authentication}:search_filter, {ldap_oper}:binddn, {ldap_oper}:search_filter, {nickserv}:unregistered_notice, {os_session}:sessionlimitexceeded, {proxyscan}:proxyscan:reason.
|
||||
|
||||
Anope Version 2.1.13
|
||||
--------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
options:enablelogchannel added to auto turn on the logchannel on startup
|
||||
options:mlock added to configure the default mlock modes on new channels
|
||||
options:database added for the database modules
|
||||
options:botmodes added to configure modes BotServ bots should use
|
||||
options:userlen added to configure maxiumum ident length
|
||||
options:hostlen added to configure maximum hostname length
|
||||
options:database added to configure what database modules to use
|
||||
options:passlen added to specify the maximum length of passwords
|
||||
uplink:ipv6 added to enable IPv6 connectivity
|
||||
options:maxretries added to specify the number of reconnect attempts allowed
|
||||
options:retrywait added to specify how long to wait between reconnect attempts
|
||||
opertype command chanserv/aop/list removed as it was unnecessary, use chanserv/access/list instead
|
||||
Added options:linelength (defaults to 120).
|
||||
Added the db_json module.
|
||||
Added the rpc_message module.
|
||||
Added {nickserv}:defaultprotect (defaults to 1m).
|
||||
Added {nickserv}:maxprotect (defaults to 10m).
|
||||
Added {nickserv}:minprotect (defaults to 10s)
|
||||
Added {xmlrpc}:enable_i8 (defaults to yes).
|
||||
Added {xmlrpc}:enable_nil (defaults to yes).
|
||||
Changed the syntax for using defines (all existing defines will need to be updated).
|
||||
Removed {nickserv}:kill (replaced by custom protection timer durations).
|
||||
Removed {nickserv}:killquick (replaced by custom protection timer durations).
|
||||
Removed {ns_set_kill}:allowkillimmed (replaced by custom protection timer durations).
|
||||
Renamed the nickserv/saset/kill command to nickserv/saset/protect.
|
||||
Renamed the nickserv/saset/kill oper privilege to nickserv/saset/protect.
|
||||
Renamed the nickserv/set/kill command to nickserv/set/protect.
|
||||
Renamed the ns_set_kill module to ns_set_protect.
|
||||
Renamed the sasl module to ns_sasl and moved it to nickserv.example.conf.
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
options:encryption added enc_sha256
|
||||
chanserv:modules added cs_unban
|
||||
nickserv:modules added ns_resetpass
|
||||
Anope Version 2.1.12
|
||||
--------------------
|
||||
Added the jsonrpc module.
|
||||
Added the rpc_data module.
|
||||
Added the rpc_system module.
|
||||
Added {hostserv}:activate_on_deoper (defaults to yes).
|
||||
Added {os_shutdown}:requirename (defaults to yes).
|
||||
Moved nickserv/set/keepmodes and nickserv/saset/keepmodes to the ns_set_keepmodes module.
|
||||
Moved the xmlrpc module to extra.
|
||||
Renamed the xmlrpc_main module to rpc_main.
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
nickserv:database deleted because of new database system
|
||||
nickserv:prenickdatabase deleted because of new database system
|
||||
chanserv:database deleted because of the new database system
|
||||
botserv:database deleted because of the new database system
|
||||
hostserv:database deleted because of the new database system
|
||||
operserv:database deleted because of the new database system
|
||||
operserv:newsdatabase deleted because of the new database system
|
||||
operserv:exceptiondatabase deleted because of the new database system
|
||||
hs_request:database deleted because of the new database system
|
||||
os_ignore:database deleted because of the new database system
|
||||
serverinfo:localport deleted
|
||||
Anope Version 2.1.11
|
||||
--------------------
|
||||
Moved nickserv/set/kill and nickserv/saset/kill to the ns_set_kill module.
|
||||
Moved {ns_set}:allowkillimmed to {ns_set_kill}:allowkillimmed.
|
||||
Replaced {nickserv}:guestnickprefix with {nickserv}:guestnick (defaults to Guest####).
|
||||
|
||||
Anope Version 1.9.1
|
||||
Anope Version 2.1.10
|
||||
--------------------
|
||||
Added options:servicealias (defaults to no)
|
||||
Moved nickserv/set/message and nickserv/saset/message to the ns_set_message module.
|
||||
Removed options:useprivmsg (replaced by loading the ns_set_message module to enable).
|
||||
Removed options:usestrictprivmsg (feature unusable on modern servers, consider migrating to options:servicealias instead).
|
||||
|
||||
Anope Version 2.1.9
|
||||
-------------------
|
||||
** ADDED CONFIGURATION DIRECTIVES **
|
||||
Opertypes have been added, through the opertype blocks.
|
||||
Services Operators are now specified in the oper blocks.
|
||||
No significant changes.
|
||||
|
||||
** MODIFIED CONFIGURATION DIRECTIVES **
|
||||
botserv:modules no longer contains bs_fantasy* modules, fantasy is now seamless.
|
||||
operserv:modules has replaced os_logonnews, os_opernews, and os_randomnews with os_news.
|
||||
operserv:modules no longer contains os_admin and os_oper modules, removed in favor of oper blocks.
|
||||
operserv:notifications no longer contains osraw due to removal of OS RAW.
|
||||
Anope Version 2.1.8
|
||||
-------------------
|
||||
Added the nickserv/drop/display oper privilege.
|
||||
Added {nickserv}:preservedisplay (defaults to no).
|
||||
|
||||
** DELETED CONFIGURATION DIRECTIVES **
|
||||
Nick tracking has been removed as an option.
|
||||
Restricting of NS GETPASS and CS GETPASS removed in favor of opertypes.
|
||||
Host Setters were removed in favor of opertypes.
|
||||
HelpServ has been removed entirely.
|
||||
operserv:disableraw removed due to removal of OS RAW.
|
||||
Anope Version 2.1.7
|
||||
-------------------
|
||||
Moved nickserv/set/language and nickserv/saset/language to the ns_set_language module.
|
||||
Renamed the FANTASIA channel privilege to FANTASY.
|
||||
Renamed {cs_suspend}:expire to {cs_suspend}:suspendexpire.
|
||||
|
||||
Anope Version 2.1.6
|
||||
-------------------
|
||||
Added {ns_cert}:automatic (defaults to yes).
|
||||
Removed {hybrid,inspircd,solanum,unrealircd}:use_server_side_mlock (now always enabled).
|
||||
Removed {inspircd}:use_server_side_topiclock (now always enabled).
|
||||
|
||||
Anope Version 2.1.5
|
||||
-------------------
|
||||
Added the nickserv/drop/override and chanserv/drop/override oper privileges.
|
||||
|
||||
Anope Version 2.1.4
|
||||
-------------------
|
||||
Added the db_atheme module.
|
||||
Added the enc_argon2 module.
|
||||
Added the enc_posix module.
|
||||
Added the enc_sha2 module.
|
||||
Added the gl_queue module.
|
||||
Added the gl_server module.
|
||||
Added the global/queue oper privilege.
|
||||
Added the global/server oper privilege.
|
||||
Changed serverinfo:motd to be relative to the config directory.
|
||||
Changed serverinfo:pid to be relative to the data directory.
|
||||
Changed the default value of mail:sendmailpath to "/usr/sbin/sendmail -it".
|
||||
Changed the default value of {chanserv}:accessmax to 1000.
|
||||
Changed the default value of {chanserv}:inhabit to 1 minute.
|
||||
Changed the default value of {cs_mode}:max to 50.
|
||||
Changed the default value of {ms_ignore}:max to 50.
|
||||
Removed options:seed (not needed with modern random number generation).
|
||||
Replaced {webcpanel}:template with {webcpanel}:template_dir (defaults to webcpanel/templates/default).
|
||||
|
||||
Anope Version 2.1.3
|
||||
-------------------
|
||||
Added options:didyoumeandifference (defaults to 4).
|
||||
Added support for multiple SSL fingerprints in oper:certfp.
|
||||
Added the chanserv/cert oper privilege for modifying other user's certificate lists.
|
||||
Changed networkinfo:chanlen to default to 32 if not set.
|
||||
Changed networkinfo:hostlen to default to 64 if not set.
|
||||
Changed networkinfo:modelistsize to default to 100 if not set.
|
||||
Changed networkinfo:nicklen to default to 31 if not set.
|
||||
Changed networkinfo:userlen to default to 10 if not set.
|
||||
Increased the default maximum password length to 50 characters.
|
||||
Increased the default minimum password length to 10 characters.
|
||||
Removed the cs_secure option in {chanserv}:defaults (now always enabled as support for nick access lists has been removed).
|
||||
Removed the nickserv/saset/secure command (support for nick access lists has been removed).
|
||||
Removed the nickserv/saset/secure oper privilege (support for nick access lists has been removed).
|
||||
Removed the nickserv/set/secure command (support for nick access lists has been removed).
|
||||
Removed the nickserv/status command (obsolete with modern IRCv3 extensions and the removal of nick access lists).
|
||||
Removed the ns_access module (support for nick access lists has been removed).
|
||||
Removed the ns_secure option in {nickserv}:defaults (now always enabled as support for nick access lists has been removed).
|
||||
|
||||
Anope Version 2.1.2
|
||||
-------------------
|
||||
Added {ssl_openssl}:tlsv10 for configuring whether TLSv1.0 is usable (defaults to no).
|
||||
Added {ssl_openssl}:tlsv11 for configuring whether TLSv1.1 is usable (defaults to yes).
|
||||
Added {ssl_openssl}:tlsv12 for configuring whether TLSv1.2 is usable (defaults to yes).
|
||||
Removed the m_ prefix from the names of the chanstats, dns, dnsbl, helpchan, httpd, ldap, ldap_oper, mysql, proxyscan, redis, regex_pcre2, regex_posix, regex_stdlib, regex_tre, rewrite, sasl, sql_log, sql_oper, sqlite, ssl_gnutls, ssl_openssl, xmlrpc, and xmlrpc_main modules.
|
||||
Removed {ssl_openssl}:sslv3 (now always disabled).
|
||||
|
||||
Anope Version 2.1.1
|
||||
-------------------
|
||||
Added the m_regex_stdlib module.
|
||||
Removed the m_regex_pcre module (use m_regex_pcre2 instead).
|
||||
|
||||
Anope Version 2.1.0
|
||||
-------------------
|
||||
Added nickserv:minpasslen for configuring the minimum password length (defaults to 8).
|
||||
Removed nickserv:strictpasswords (obsolete now nickserv:minpasslen exists).
|
||||
Removed the inspircd12 and inspircd20 modules (use inspircd instead).
|
||||
Removed the ns_getpass module (no supported encryption modules).
|
||||
Removed the os_oline module (no supported IRCds).
|
||||
Removed the unreal module (use unrealircd instead).
|
||||
Renamed nickserv:passlen to nickserv:maxpasslen.
|
||||
Renamed the charybdis module to solanum.
|
||||
Renamed the inspircd3 module to inspircd.
|
||||
Renamed the unreal4 module to unrealircd.
|
||||
Replaced uplink:ipv6 with uplink:protocol (defaults to ipv4).
|
||||
|
||||
@@ -1,255 +0,0 @@
|
||||
Anope Version 1.9.2
|
||||
--------------------
|
||||
*** New Strings:
|
||||
CHAN_INVITE_OTHER_SUCCESS
|
||||
NICK_HELP_CONFIRM_OPER
|
||||
CHAN_QOP_DISABLED
|
||||
CHAN_QOP_NICKS_ONLY
|
||||
CHAN_QOP_ADDED
|
||||
CHAN_QOP_MOVED
|
||||
CHAN_QOP_NO_SUCH_ENTRY
|
||||
CHAN_QOP_NOT_FOUND
|
||||
CHAN_QOP_DELETED
|
||||
CHAN_QOP_DELETED_ONE
|
||||
CHAN_QOP_DELETED_SEVERAL
|
||||
CHAN_QOP_LIST_EMPTY
|
||||
CHAN_QOP_LIST_HEADER
|
||||
CHAN_QOP_CLEAR
|
||||
CHAN_HELP_QOP
|
||||
CHAN_QOP_SYNTAX
|
||||
CHAN_HELP_CMD_QOP
|
||||
CHAN_HELP_SET_PASSWORD
|
||||
CHAN_LEVEL_AUTOOWNER
|
||||
CHAN_LEVEL_OWNER
|
||||
CHAN_LEVEL_OWNERME
|
||||
CHAN_ACCESS_VIEW_XOP_FORMAT
|
||||
CHAN_ACCESS_VIEW_AXS_FORMAT
|
||||
CHAN_SET_PERSIST_SYNTAX
|
||||
CHAN_SET_PERSIST_ON
|
||||
CHAN_SET_PERSIST_OFF
|
||||
CHAN_INFO_OPT_PERSIST
|
||||
BOT_UNASSIGN_PERSISTANT_CHAN
|
||||
CHAN_HELP_SET_PERSIST
|
||||
NICK_RESETPASS_SYNTAX
|
||||
NICK_RESETPASS_SUBJECT
|
||||
NICK_RESETPASS_MESSAGE
|
||||
NICK_RESETPASS_COMPLETE
|
||||
NICK_CONFIRM_EXPIRED
|
||||
NICK_CONFIRM_SUCCESS
|
||||
NICK_HELP_CMD_RESETPASS
|
||||
NICK_HELP_RESETPASS
|
||||
CHAN_UNBANNED_OTHER
|
||||
OPER_HELP_SYNC
|
||||
OPER_HELP_CMD_SQLSYNC
|
||||
OPER_SYNC_UPDATING
|
||||
OPER_SYNC_UPDATED
|
||||
CHAN_LEVELS_CHANGED_FOUNDER
|
||||
|
||||
*** Mod Strings:
|
||||
CHAN_HELP_SET
|
||||
CHAN_REGISTER_SYNTAX
|
||||
CHAN_ACCESS_SYNTAX
|
||||
CHAN_HELP_ACCESS
|
||||
CHAN_HELP_SET
|
||||
NICK_HELP_CONFIRM
|
||||
CHAN_UNBAN_SYNTAX
|
||||
CHAN_HELP_CMD_UNBAN
|
||||
CHAN_HELP_UNBAN
|
||||
CHAN_HELP_REGISTER
|
||||
CHAN_HELP_DROP
|
||||
CHAN_HELP_LEVELS
|
||||
|
||||
*** Del Strings:
|
||||
CHAN_PASSWORD_IS
|
||||
CHAN_SET_PASSWORD_FAILED
|
||||
CHAN_PASSWORD_CHANGED
|
||||
CHAN_IDENTIFY_SUCCEEDED
|
||||
CHAN_IDENTIFY_FAILED
|
||||
CHAN_HELP_IDENTIFY
|
||||
CHAN_IDENTIFY_SYNTAX
|
||||
CHAN_HELP_CMD_IDENTIFY
|
||||
CHAN_LOGOUT_FOUNDER_FAILED
|
||||
CHAN_LOGOUT_SUCCEDED
|
||||
CHAN_LOGOUT_NOT_LOGGEDIN
|
||||
CHAN_LOGOUT_ALL_SUCCEEDED
|
||||
CHAN_SERVADMIN_HELP_LOGOUT
|
||||
CHAN_HELP_LOGOUT
|
||||
CHAN_LOGOUT_SERVADMIN_SYNTAX
|
||||
CHAN_LOGOUT_SYNTAX
|
||||
CHAN_HELP_CMD_LOGOUT
|
||||
CHAN_GETPASS_UNAVAILABLE
|
||||
CHAN_GETPASSWORD_IS
|
||||
CHAN_SERVADMIN_HELP_GETPASS
|
||||
CHAN_GETPASS_SYNTAX
|
||||
CHAN_HELP_CMD_GETPASS
|
||||
CHAN_SENDPASS_SUBJECT
|
||||
CHAN_SENDPASS_HEAD
|
||||
CHAN_SENDPASS_LINE_1
|
||||
CHAN_SENDPASS_LINE_2
|
||||
CHAN_SENDPASS_LINE_3
|
||||
CHAN_SENDPASS_LINE_4
|
||||
CHAN_SENDPASS_LINE_5
|
||||
CHAN_SENDPASS_OK
|
||||
CHAN_SENDPASS_UNAVAILABLE
|
||||
CHAN_HELP_SENDPASS
|
||||
CHAN_SENDPASS_SYNTAX
|
||||
CHAN_HELP_CMD_SENDPASS
|
||||
OPER_DEFCON_NO_CONF
|
||||
|
||||
Anope Version 1.9.1
|
||||
--------------------
|
||||
*** New Strings:
|
||||
COMMAND_REQUIRES_PERM
|
||||
COMMAND_IDENTIFY_REQUIRED
|
||||
COMMAND_CANNOT_USE
|
||||
COMMAND_CAN_USE
|
||||
NICK_STATUS_REPLY
|
||||
NICK_INFO_SERVICES_OPERTYPE
|
||||
CHAN_LOGOUT_NOT_LOGGEDIN
|
||||
CHAN_INVITE_ALREADY_IN
|
||||
CHAN_INVITE_SUCCESS
|
||||
CHAN_OP_SYNTAX
|
||||
CHAN_HALFOP_SYNTAX
|
||||
CHAN_VOICE_SYNTAX
|
||||
CHAN_PROTECT_SYNTAX
|
||||
CHAN_OWNER_SYNTAX
|
||||
CHAN_DEOP_SYNTAX
|
||||
CHAN_DEHALFOP_SYNTAX
|
||||
CHAN_DEVOICE_SYNTAX
|
||||
CHAN_DEPROTECT_SYNTAX
|
||||
CHAN_DEOWNER_SYNTAX
|
||||
CHAN_KICK_SYNTAX
|
||||
CHAN_BAN_SYNTAX
|
||||
MEMO_STAFF_SYNTAX
|
||||
OPER_JUPE_INVALID_SERVER
|
||||
|
||||
*** Mod Strings:
|
||||
NICK_LOGOUT_SERVICESADMIN
|
||||
CHAN_STATUS_SYNTAX
|
||||
CHAN_GETKEY_KEY
|
||||
MEMO_SET_NOTIFY_SYNTAX
|
||||
BOT_REASON_BADWORD
|
||||
BOT_BOTLIST_EMPTY
|
||||
OPER_IGNORE_SYNTAX
|
||||
OPER_DEFCON_SYNTAX
|
||||
OPER_HELP_EXCEPTION
|
||||
OPER_HELP_SESSION
|
||||
NEWS_LOGON_SYNTAX
|
||||
NEWS_OPER_SYNTAX
|
||||
NEWS_RANDOM_SYNTAX
|
||||
NEWS_HELP_LOGON
|
||||
NEWS_HELP_OPER
|
||||
NEWS_HELP_RANDOM
|
||||
NICK_HELP_STATUS
|
||||
NICK_HELP_SENDPASS
|
||||
NICK_SERVADMIN_HELP
|
||||
NICK_SERVADMIN_HELP_LOGOUT
|
||||
NICK_SERVADMIN_HELP_DROP
|
||||
NICK_SERVADMIN_HELP_INFO
|
||||
NICK_SERVADMIN_HELP_LIST
|
||||
NICK_SERVADMIN_HELP_ALIST
|
||||
NICK_SERVADMIN_HELP_GLIST
|
||||
CHAN_HELP_SET_RESTRICTED
|
||||
CHAN_HELP_OP
|
||||
CHAN_HELP_DEOP
|
||||
CHAN_HELP_VOICE
|
||||
CHAN_HELP_DEVOICE
|
||||
CHAN_HELP_HALFOP
|
||||
CHAN_HELP_DEHALFOP
|
||||
CHAN_HELP_PROTECT
|
||||
CHAN_HELP_DEPROTECT
|
||||
CHAN_HELP_OWNER
|
||||
CHAN_HELP_DEOWNER
|
||||
CHAN_HELP_KICK
|
||||
CHAN_HELP_CLEAR
|
||||
CHAN_HELP_GETKEY
|
||||
CHAN_HELP_SENDPASS
|
||||
CHAN_SERVADMIN_HELP
|
||||
CHAN_SERVADMIN_HELP_LOGOUT
|
||||
CHAN_SERVADMIN_HELP_DROP
|
||||
CHAN_SERVADMIN_HELP_SET
|
||||
CHAN_SERVADMIN_HELP_INFO
|
||||
CHAN_SERVADMIN_HELP_LIST
|
||||
MEMO_HELP_SET_NOTIFY
|
||||
MEMO_HELP_STAFF
|
||||
OPER_HELP_CMD_CHANKILL
|
||||
OPER_HELP_STATS
|
||||
OPER_HELP_IGNORE
|
||||
OPER_HELP_UMODE
|
||||
OPER_HELP_ULINE
|
||||
OPER_HELP_SVSNICK
|
||||
OPER_HELP_SET
|
||||
BOT_HELP
|
||||
BOT_SERVADMIN_HELP_BOT
|
||||
BOT_SERVADMIN_HELP_SET
|
||||
HOST_DELALL_SYNTAX
|
||||
HOST_SET_SYNTAX
|
||||
HOST_SETALL_SYNTAX
|
||||
HOST_DEL_SYNTAX
|
||||
|
||||
*** Del Strings:
|
||||
PERMISSION_DENIED
|
||||
RAW_DISABLED
|
||||
HELP_LIMIT_SERV_OPER
|
||||
HELP_LIMIT_SERV_ADMIN
|
||||
HELP_LIMIT_SERV_ROOT
|
||||
HELP_LIMIT_IRC_OPER
|
||||
HELP_LIMIT_HOST_SETTER
|
||||
HELP_LIMIT_HOST_REMOVER
|
||||
NICK_STATUS_0
|
||||
NICK_STATUS_1
|
||||
NICK_STATUS_2
|
||||
NICK_STATUS_3
|
||||
NICK_INFO_SERVICES_OPER
|
||||
NICK_INFO_SERVICES_ADMIN
|
||||
NICK_INFO_SERVICES_ROOT
|
||||
CHAN_MUST_REGISTER_NICK
|
||||
CHAN_MUST_IDENTIFY_NICK
|
||||
OPER_ADMIN_SYNTAX
|
||||
OPER_ADMIN_SKELETON
|
||||
OPER_ADMIN_EXISTS
|
||||
OPER_ADMIN_REACHED_LIMIT
|
||||
OPER_ADMIN_ADDED
|
||||
OPER_ADMIN_NOT_FOUND
|
||||
OPER_ADMIN_NO_MATCH
|
||||
OPER_ADMIN_DELETED
|
||||
OPER_ADMIN_DELETED_ONE
|
||||
OPER_ADMIN_DELETED_SEVERAL
|
||||
OPER_ADMIN_LIST_EMPTY
|
||||
OPER_ADMIN_LIST_HEADER
|
||||
OPER_ADMIN_LIST_FORMAT
|
||||
OPER_ADMIN_CLEAR
|
||||
OPER_ADMIN_MOVED
|
||||
OPER_OPER_SYNTAX
|
||||
OPER_OPER_SKELETON
|
||||
OPER_OPER_EXISTS
|
||||
OPER_OPER_REACHED_LIMIT
|
||||
OPER_OPER_ADDED
|
||||
OPER_OPER_NOT_FOUND
|
||||
OPER_OPER_NO_MATCH
|
||||
OPER_OPER_DELETED
|
||||
OPER_OPER_DELETED_ONE
|
||||
OPER_OPER_DELETED_SEVERAL
|
||||
OPER_OPER_LIST_EMPTY
|
||||
OPER_OPER_LIST_HEADER
|
||||
OPER_OPER_LIST_FORMAT
|
||||
OPER_OPER_CLEAR
|
||||
OPER_OPER_MOVED
|
||||
OPER_SET_SQL_ON
|
||||
OPER_SET_SQL_OFF
|
||||
OPER_SET_SQL_ERROR
|
||||
OPER_SET_SQL_ERROR_INIT
|
||||
OPER_SET_SQL_ERROR_DISABLED
|
||||
OPER_RAW_SYNTAX
|
||||
HELP_HELP
|
||||
HELP_HELP_BOT
|
||||
HELP_HELP_HOST
|
||||
OPER_HELP_CMD_OPER
|
||||
OPER_HELP_CMD_ADMIN
|
||||
OPER_HELP_OPER
|
||||
OPER_HELP_ADMIN
|
||||
OPER_HELP_SET_SQL
|
||||
OPER_HELP_RAW
|
||||
HOST_ID
|
||||
HOST_NOT_REGGED
|
||||
HOST_OFF_UNREAL
|
||||
+29
-33
@@ -1,4 +1,4 @@
|
||||
Anope DefCon
|
||||
Anope DefCon
|
||||
------------
|
||||
|
||||
1) Introduction
|
||||
@@ -10,8 +10,8 @@ Anope DefCon
|
||||
|
||||
1) Introduction
|
||||
|
||||
Anope 1.6 onwards supports a unique protection mechanism based on the
|
||||
military "Defense Readiness Condition" (DefCon) system. It is based on
|
||||
Anope supports a unique protection mechanism based on the
|
||||
military "Defense Readiness Condition" (DefCon) system. It is based on
|
||||
5 levels of defense readiness defined as:
|
||||
|
||||
DEFCON5 Normal peacetime readiness
|
||||
@@ -23,18 +23,19 @@ Anope DefCon
|
||||
These are configurable levels that mandates what actions Anope should
|
||||
take in case of emergency and change in readiness status.
|
||||
|
||||
It is used to prevent abuse to both Services, and the ircd on which they
|
||||
It is used to prevent abuse to both Anope, and the IRCd on which they
|
||||
are running. Also to protect the users, primarily in the event of Clones
|
||||
and/or FloodBOT attacks.
|
||||
and/or FloodBOT attacks.
|
||||
|
||||
2) Installation
|
||||
|
||||
The DefCon system is part of Anope's core,
|
||||
|
||||
The DefCon system has to be configured on your services.conf file to
|
||||
be enabled. The defcon module will not unload unless all non-optional
|
||||
directives are set. Look for the defcon block
|
||||
section on your services.conf file for more information.
|
||||
The DefCon system has to be configured on your operserv.conf file to
|
||||
be enabled. Defcon will be disabled if "defaultlevel" in the defcon
|
||||
block is left commented, or set to 0. Look for the defcon block
|
||||
on your operserv.conf file for more information on enabling and
|
||||
configuring it.
|
||||
|
||||
Make sure you restart Anope after changing the DefCon configuration
|
||||
directives.
|
||||
@@ -43,26 +44,26 @@ Anope DefCon
|
||||
|
||||
Pre-defined DefCon actions:
|
||||
|
||||
No new channel registrations
|
||||
No New Nick Registrations
|
||||
No MLOCK changes
|
||||
Force Chan Mode
|
||||
Use Reduced Session Limit
|
||||
KILL any new clients trying to connect
|
||||
Services will ignore everyone but opers
|
||||
Services will silently ignore everyone but opers
|
||||
AKILL all new clients trying to connect
|
||||
No new channel registrations
|
||||
No New Nick Registrations
|
||||
No Mode Lock changes
|
||||
Force Chan Mode
|
||||
Use Reduced Session Limit
|
||||
KILL any new clients trying to connect
|
||||
Ignore everyone but opers
|
||||
Silently ignore everyone but opers
|
||||
AKILL all new clients trying to connect
|
||||
No new memos sent to block MemoServ attacks
|
||||
|
||||
|
||||
Information regarding how to enable this for specific defcon levels can
|
||||
be found in services.conf
|
||||
be found in operserv.conf
|
||||
|
||||
4) Usage
|
||||
|
||||
Anope starts up in DEFCON5 (normal readiness). To change the Defcon level
|
||||
in action use:
|
||||
|
||||
/msg OperServ DEFCON 1|2|3|4|5
|
||||
Anope starts up in DEFCON5 (normal readiness). To change the Defcon level
|
||||
in action use:
|
||||
|
||||
/msg OperServ DEFCON 1|2|3|4|5
|
||||
|
||||
5) Usage Example
|
||||
|
||||
@@ -70,28 +71,23 @@ Anope DefCon
|
||||
|
||||
/msg OperServ DEFCON 4
|
||||
|
||||
*** Global -- from OperServ: dengel Changed the DEFCON level to 4
|
||||
|
||||
-OperServ- Services are now at DEFCON 4
|
||||
-OperServ- * No new channel registrations
|
||||
-OperServ- * No new nick registrations
|
||||
-OperServ- * No MLOCK changes
|
||||
-OperServ- * No mode lock changes
|
||||
-OperServ- * Use the reduced session limit of 5
|
||||
|
||||
-Global- The Defcon Level is now at Level: 4
|
||||
-Global- The Defcon Level is now at: 4
|
||||
|
||||
Restore normal readiness:
|
||||
|
||||
/msg OperServ DEFCON 5
|
||||
|
||||
*** Global -- from OperServ: dengel Changed the DEFCON level to 5
|
||||
|
||||
-OperServ- Services are now at DEFCON 5
|
||||
|
||||
-Global- Services are now back to normal, sorry for any inconvenience
|
||||
|
||||
6) Support
|
||||
|
||||
You might get DefCon support by posting on our online forum, or maybe on
|
||||
our #anope channel at /server irc.anope.org.
|
||||
|
||||
You might get DefCon support by posting on our online forum, or maybe on
|
||||
our #anope channel at /server irc.teranova.net.
|
||||
|
||||
-42
@@ -1,42 +0,0 @@
|
||||
Anope Internal Events
|
||||
---------------------
|
||||
|
||||
1) Intro
|
||||
2) Using Events
|
||||
|
||||
1) Introduction to Internal Events
|
||||
|
||||
Internal Events are setup to give module developers more information
|
||||
about what the core is doing at different times. This information can
|
||||
be as complex as data we are feeding to the uplink, to simple triggered
|
||||
events such as the databases being saved.
|
||||
|
||||
Additionally there is a module included with the core
|
||||
which can provide some clue as to how to use the code in your modules.
|
||||
The rest of this document assumes that you are used to writing modules.
|
||||
|
||||
2) Using Events
|
||||
|
||||
Anope is told about modules wanting to hook to events by the function
|
||||
ModuleManager::Attach(EventName, Module*);, eg:
|
||||
|
||||
ModuleManager::Attach(I_OnJoinChannel, this);
|
||||
|
||||
You can also specifcy an array of events:
|
||||
|
||||
Implementation i[] = { I_OnJoinChannel, I_OnPartChannel };
|
||||
ModuleManager::Attach(i, this, 2);
|
||||
Where 2 is the number of events in the list
|
||||
|
||||
You must then overload these functions in your main modules class.
|
||||
The full list of functions and parameters are in modules.h. In this
|
||||
case, you would be overloading OnJoinChannel() and OnPartChannel() like so:
|
||||
|
||||
void OnJoinChannel(User *u, Channel *c) { }
|
||||
void OnPartChannel(User *u, Channel *c) { }
|
||||
|
||||
Some of these events can be used to prevent or allow things to happen that
|
||||
would normally not be allowed or denied. You can also use ModuleManager
|
||||
(not explained here) to set control which order the modules are queried
|
||||
(when multiple modules hook to the same event).
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
Frequently Asked Questions (FAQ) concerning Anope
|
||||
------------------------------------------------
|
||||
|
||||
The information in the 1.9 FAQ is subject to change at any
|
||||
-------------------------------------------------
|
||||
|
||||
The information in the 2.0 FAQ is subject to change at any
|
||||
moment due to new developments. Please visit our website
|
||||
for the most up to date information.
|
||||
|
||||
|
||||
An updated version of the FAQ can be found here:
|
||||
|
||||
http://wiki.anope.org/index.php/FAQ
|
||||
https://wiki.anope.org/index.php/2.0/FAQ
|
||||
|
||||
+34
-107
@@ -19,159 +19,88 @@ Note: You should also read the README and FAQ files!
|
||||
The very first thing you need to do is to get the Anope package (if not
|
||||
already done). You can find it at:
|
||||
|
||||
http://www.anope.org/
|
||||
https://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 3.28.3". If the version is less than 3.20.0 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.
|
||||
https://cmake.org/download/
|
||||
|
||||
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 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
|
||||
configuration file (example.conf) to services.conf, and open the latter
|
||||
Now go into the conf directory (by default, ~/anope/conf). Copy the example
|
||||
configuration file (anope.example.conf) to anope.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 https://forum.anope.org/ or #anope on
|
||||
irc.teranova.net. Provide *complete* error output, along with other relevant
|
||||
information eg. OS, compiler and C++ library versions.
|
||||
See the README file for more information.
|
||||
|
||||
2) Upgrading Anope
|
||||
|
||||
If you got a .diff file and want to patch the old Anope sources with it,
|
||||
do the following:
|
||||
|
||||
* Copy the .diff file into the root Anope sources directory.
|
||||
* Type patch -p1 <file.diff
|
||||
|
||||
Note that upgrading anope with a patchfile isn't recommended. You should
|
||||
download a new, clean source package, as this will give the best results.
|
||||
|
||||
To upgrade Anope, just follow the installation instructions described in
|
||||
section 1. There are however a few specific guidelines:
|
||||
|
||||
* IMPORTANT: Back up your old databases!
|
||||
* If you are upgrading to a new major release, ALWAYS restart a
|
||||
fresh configuration file from example.conf.
|
||||
fresh configuration file from anope.example.conf.
|
||||
|
||||
3) Setting up the IRCd
|
||||
|
||||
Services acts as an IRC server with pseudo-clients on it. To link them to
|
||||
your network, you'll need to add some lines in the ircd.conf of their hub
|
||||
server (as stated in the RemoteServer configuration directive).
|
||||
Anope acts as an IRC server with pseudo-clients on it. To link them to
|
||||
your network, you'll need to configure your IRCd to allow services to link.
|
||||
|
||||
For samples below we'll take services.localhost.net as the name of the
|
||||
Services (as stated in the ServerName configuration directive). Note that
|
||||
this samples are made to be as generic as possible, but there might be
|
||||
small variations, depending on your IRCd. For IRCd-specific help with
|
||||
configuration, read near the end of this section.
|
||||
The configuration varies depending on the IRCd, but you will probably need
|
||||
a link block (also called connect block, or C line), a U line (also called
|
||||
a shared block), and be sure that the IRCd is listening on the given port
|
||||
in the link block.
|
||||
|
||||
First, the C/N lines, that allow Services to link. They also need a
|
||||
Y:line to work correctly.
|
||||
|
||||
Y:27:180:0:0:4000000
|
||||
C:127.0.0.1:mypass:services.localhost.net::30
|
||||
N:127.0.0.1:mypass:services.localhost.net::30
|
||||
|
||||
"mypass" is the same password you mentioned in the RemoteServer
|
||||
configuration directive. 127.0.0.1 is the IP from which Services connect
|
||||
from (linking in localhost is the most efficient way to run Services).
|
||||
|
||||
Then, you have to set-up an U:line, that will allow Services to change
|
||||
channel modes, topics, and much more without being opped in the channel.
|
||||
|
||||
U:services.localhost.net:*:*
|
||||
|
||||
NOTE: if you have more than one server in your network, this line MUST
|
||||
be added on ALL servers, or things won't work correctly.
|
||||
|
||||
Finally, you'll need to add an H:line, to make the OperServ JUPE command
|
||||
work correctly.
|
||||
|
||||
H:*::Services.LocalHost.Net
|
||||
Example link configurations can be found in anope.example.conf for some of the
|
||||
popular IRCds.
|
||||
|
||||
Don't forget to /rehash your IRCd to apply changes.
|
||||
|
||||
A new trend in ircd configuration is popping all over the place, good
|
||||
examples are the latest Hybrid, Unreal and Bahamut, which use a more
|
||||
"readable" form of configuration. For those, use something like:
|
||||
|
||||
link services.localhost.net
|
||||
{
|
||||
username *;
|
||||
hostname localhost;
|
||||
bind-ip *;
|
||||
port 6667;
|
||||
hub *;
|
||||
password-connect "mypass";
|
||||
password-receive "mypass";
|
||||
class servers;
|
||||
};
|
||||
|
||||
Note that this block-style configuration files differ heavily, depending
|
||||
on the IRCd. Consult the interactive link maker (link is below) for more
|
||||
details on the exact configuration used by your IRCd.
|
||||
|
||||
If you're unable to get a link with your IRCd after reading this section,
|
||||
you might try the interactive link maker, which is located at:
|
||||
|
||||
http://anope.org/ilm.php
|
||||
|
||||
4) Starting Anope
|
||||
|
||||
Go into the directory where binaries were installed (by default, this is
|
||||
~/services). Type ./services to launch Anope.
|
||||
~/anope/bin). Type ./anope to launch Anope.
|
||||
|
||||
If there are syntax errors in the configuration file they will be
|
||||
displayed on the screen. Correct them until there are no errors anymore.
|
||||
A successful startup won't generate any message.
|
||||
|
||||
Give Services at least one minute to link to your network, as certain
|
||||
Give Anope at least one minute to link to your network, as certain
|
||||
IRCds on some OSes may be really slow for the link process. If nothing
|
||||
happens after about a minute, it is probably a configuration problem. Try
|
||||
to launch Anope with ./services -debug -nofork to see any errors that it
|
||||
to launch Anope with ./anope -debug -nofork to see any errors that it
|
||||
encounters, and try to correct them.
|
||||
|
||||
If you need help to solve errors, feel free to subscribe to the Anope
|
||||
@@ -180,21 +109,19 @@ Note: You should also read the README and FAQ files!
|
||||
5) Setting up a crontab
|
||||
|
||||
A crontab entry will allow you to check periodically whether Anope is
|
||||
still running, and restart it if not. You'll need to have Anope binaries
|
||||
and data installed in the same directory for this to work without
|
||||
modification.
|
||||
still running, and restart it if not.
|
||||
|
||||
First rename the example.chk script that is in Anope path (by default,
|
||||
this is ~/services) 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
|
||||
First rename the cron.example.sh script that is in Anope path (by default,
|
||||
this is ~/anope/conf) to cron.sh 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 cron.sh, and try to launch the
|
||||
script to see if it works (Anope must not be running when you do this ;))
|
||||
|
||||
When this is done, you'll have to add the crontab entry. Type crontab -e.
|
||||
This will open the default text editor with the crontab file. Enter the
|
||||
following (with correct path):
|
||||
|
||||
*/5 * * * * /home/ircd/services/services.chk >/dev/null 2>&1
|
||||
*/5 * * * * /home/ircd/anope/conf/cron.sh >/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
|
||||
|
||||
+144
@@ -0,0 +1,144 @@
|
||||
Instructions d'installation d'Anope
|
||||
-----------------------------------
|
||||
|
||||
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 !
|
||||
|
||||
1) Installation d'Anope
|
||||
|
||||
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 :
|
||||
|
||||
https://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 3.28.3". Si la version est inférieure à 3.20.0 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 :
|
||||
|
||||
https://cmake.org/download/
|
||||
|
||||
Ensuite, décompressez le package dans votre répertoire home, et allez
|
||||
dans le répértoire qui vient d'être créé.
|
||||
|
||||
Si il y a des modules facultatifs que vous voulez activer comme 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.
|
||||
|
||||
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.
|
||||
|
||||
Allez maintenant dans le répertoire conf (par défaut, ~/anope/conf).
|
||||
Copiez l'exemple de fichier de configuration (anope.example.conf) en
|
||||
anope.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 vous avez besoin d'aide, vous pouvez aller sur le site
|
||||
https://forum.anope.org/ ou le canal #anope sur irc.teranova.net.
|
||||
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.
|
||||
|
||||
2) Mettre à jour Anope
|
||||
|
||||
Pour mettre à jour Anope, suivez simplement les instructions
|
||||
d'installation décrites dans la section 1. Prenez garde cependant :
|
||||
|
||||
* 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 anope.example.conf.
|
||||
|
||||
3) Configuration de l'IRCd
|
||||
|
||||
Anope agit 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.
|
||||
|
||||
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.
|
||||
|
||||
Des exemples de configurations de bloc link peuvent être trouvés dans
|
||||
le fichier anope.example.conf pour certains des IRCd les plus populaires.
|
||||
|
||||
Souvenez-vous de /rehash votre IRCd pour appliquer les changements.
|
||||
|
||||
4) Mettre en route Anope
|
||||
|
||||
Allez dans le répertoire où les fichiers binaires ont été installés
|
||||
(par défaut, ~/anope/bin). Tapez ./anope pour lancer Anope.
|
||||
|
||||
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.
|
||||
|
||||
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 ./anope -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 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 si Anope
|
||||
est toujours en cours d'exécution et de le redémarrer s'il n'est pas.
|
||||
|
||||
D'abord renommez le script cron.example.sh qui est dans les dossiers
|
||||
d'Anope (par défaut, ~/anope/conf) en cron.sh 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 cron.sh et essayez de lancer le script pour voir
|
||||
si cela fonctionne (Anope ne doit pas être en marche lorsque vous
|
||||
testez cela ;))
|
||||
|
||||
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/anope/conf/cron.sh > /dev/null 2>&1
|
||||
|
||||
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).
|
||||
|
||||
Sauvegardez, quittez, et c'est installé !
|
||||
@@ -1,378 +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, which is
|
||||
explained in depth in the next section.
|
||||
|
||||
Scroll down to the bottom and find the class for this module and rename it
|
||||
to something reflecting your IRCd name. Find the function:
|
||||
|
||||
pmodule_ircd_version("Unreal 3.2+");
|
||||
|
||||
This is the protocol name which will appear in various places; especially
|
||||
when you do -version at the command prompt, this is where you state the
|
||||
server name. The version is not always needed unless you are showing that
|
||||
the support is for one branch of a ircd family, such as Unreal 3.1 and
|
||||
Unreal 3.2.
|
||||
|
||||
The next task that you will face is setting whether the IRCD sends time
|
||||
stamps on modes but does not tell us that it will do so. If it does, set
|
||||
UseTSMODE to 1; if it does not set it to be 0. If you're not sure refer
|
||||
to your IRCd's documentation on how MODE is sent.
|
||||
|
||||
pmodule_ircd_useTSMode(0);
|
||||
|
||||
3) The IRCDVar struct
|
||||
|
||||
Now you've come to the part where you setup your ircd. There are two
|
||||
structs which hold this 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) Channelmode for bots: When a BotServ bot joins a channel, this is the
|
||||
mode set on them. Normally you will want them
|
||||
opped (+o), and protected (+a) on IRCd's that
|
||||
support it.
|
||||
|
||||
5) SVSNICK: Can the ircd use SVSNICK to change some ones nick? Otherwise,
|
||||
KILL is used. Use 1 for yes, 0 for no.
|
||||
|
||||
6) VHOST: Can a user's host be changed on the fly? Enabling this allow
|
||||
HostServ online. Use 1 for yes, 0 for no.
|
||||
|
||||
7) SGLINE: Does the IRCd support realname (geocs) bans? Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
8) SQLINE: Does the IRCd support nick bans? Use 1 for yes, 0 for no.
|
||||
|
||||
9) SZLINE: Does the IRCd support SZLINES? Use 1 for yes, 0 for no.
|
||||
|
||||
10) Number of Server Args: When an IRCd connects, this is the number of
|
||||
parameters that are passed.
|
||||
|
||||
11) Join to Set: Services must join a channel to set any modes on that
|
||||
channel. Use 1 for yes, 0 for no.
|
||||
|
||||
12) 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.
|
||||
|
||||
13) TS Topic Forward: Some IRCd's (like UnrealIRCd) like their topic TS
|
||||
set forward by +1. Use 1 for yes, 0 for no.
|
||||
|
||||
14) TS Topic Backward: Some IRCd's (mainly older DreamForge-like ones)
|
||||
like their topic TS set back by -1. Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
15) SQline Channels: The IRCd's supports banning channel names via
|
||||
SQLINES. Use 1 for yes, 0 for no.
|
||||
|
||||
16) 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.
|
||||
|
||||
17) SVSMODE -b: We can use SVSMODE to unban hosts from a channel. Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
18) Reverse: We can do a reverse check when unbanning. For use with
|
||||
DreamForge based IRCd's. Use 1 for yes, 0 for no.
|
||||
|
||||
19) vIdent: Support for including a user's ident in their vHost. Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
20) SVSHOLD: Support for temporarily 'holding' a nick, instead of using
|
||||
a nick enforcer client. Use 1 for yes, 0 for no.
|
||||
|
||||
21) TS on MODE: We need to send a timestamp when modes are being changed.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
22) NICKIP: The IP address of new users is being sent along with their
|
||||
hostname when new users are being introduced on the network.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
23) OMODE: We can use OperServ to give some user a temporary O:LINE.
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
24) Umode: We can use OperServ to change a user's mode. Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
25) Vhost On Nick: On NICK the IRCd sends the VHOST. Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
26) Change Realname: Change real name. Use 1 for yes, 0 for no.
|
||||
|
||||
27) Check Nick ID: Should we check if a user should remain identified when
|
||||
changing their nick? This is for IRCd's that remove
|
||||
their registered-user mode when someone changes their
|
||||
nick (like Bahamut does).
|
||||
Use 1 for yes, 0 for no.
|
||||
|
||||
28) No Knock Requires +i: Does the No Knock channel mode require invite
|
||||
only channels? Use 1 for yes, 0 for no.
|
||||
|
||||
29) Chan Modes: If sent in CAPAB/PROTOCOL, we store it in here. This is
|
||||
NULL by default.
|
||||
|
||||
30) Tokens: Can we use tokens to talk to the IRCd? Use 1 for yes,
|
||||
0 for no.
|
||||
|
||||
31) base64 SJOIN TS: Are the timestamps sent with a SJOIN in base64? Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
32) SJOIN Ban Char: Character used to identify bans. Use ''.
|
||||
|
||||
33) SJOIN Except Char: Character used to identify exceptions. Use ''.
|
||||
|
||||
34) SJOIN Invite char: Character used to idenfity invexs. Use ''.
|
||||
|
||||
35) SVSMODE UCMODE: Can we clear user channel modes with SVSMODE? Use
|
||||
1 for yes, 0 for no.
|
||||
|
||||
36) SGline Enforce: Does the IRCd enforce SGLINES for us or do we need to
|
||||
do so? Use 1 for yes, 0 for no.
|
||||
|
||||
37) Vhost Character: The character used to represent the vHost mode, if
|
||||
this is supported by the IRCd.
|
||||
|
||||
38) TS6: Does the IRCd support TS6? Use 1 for yes, 0 for no.
|
||||
|
||||
39) P10: Is this IRCd a P10-style IRCd? Use 1 for yes, 0 for no.
|
||||
|
||||
40) Character Set: Unreal passes the character set during PROTOCTL,
|
||||
the value is stored here. Set this NULL to start.
|
||||
|
||||
41) Channel CIDR: Set to 1 if channel bans, excepts and invites
|
||||
support CIDR masks. Expected syntax: *!*@ip/mask.
|
||||
When set to 1, anope will only parse strict CIDR masks.
|
||||
IRCd's that try to correct invalid CIDR's (like nefarious)
|
||||
will need a custom implementation in the core.
|
||||
Contact the anope Dev Team if this is the case.
|
||||
Set to 0 if CIDR's are not supported by your IRCd.
|
||||
|
||||
42) Global TLD Prefix: Prefix used to send global messages, should probably
|
||||
be "$"
|
||||
|
||||
43) Max Modes: The max number of mode changes we can send in one line
|
||||
|
||||
4) Modes
|
||||
|
||||
Anope is told about modes in the moduleAddModes() function.
|
||||
For the most part, the syntax for adding channel and user modes are:
|
||||
|
||||
ModeManager::AddUserMode(new UserMode(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, '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, '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'));
|
||||
|
||||
The CMODE_FLOOD param also has its own class, but due to the wide range of
|
||||
valid parameters accepted across IRCds, your protocol module MUST have the
|
||||
IsValid function for this.
|
||||
|
||||
bool ChannelModeFlood::IsValid(const std::string &value) { }
|
||||
|
||||
5) Functions and Events
|
||||
|
||||
A brief word about functions and events. All events are captured using:
|
||||
|
||||
void moduleAddIRCDMsgs(void)
|
||||
{
|
||||
m = createMessage("NICK", anope_event_nick);
|
||||
addCoreMessage(IRCD,m);
|
||||
}
|
||||
|
||||
Each event should have a event handler if its important enough to be
|
||||
processed by services. All event functions should be formed like this:
|
||||
|
||||
int anope_event_capab(char *source, int ac, char **av)
|
||||
{
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
They will receive the source; this can be NULL at times depending on the
|
||||
event. Next, ac is the number of arguments that are in the event, and av
|
||||
holds the values for each; so av[0] is the first variable, av[1] will be
|
||||
the second one, and so on. Events are likely to pass to various upper
|
||||
level event handlers; see the previous ircd source for how they handle
|
||||
these events.
|
||||
|
||||
All commands are formed like this:
|
||||
|
||||
void anope_cmd_svsnoop(char *server, int set)
|
||||
{
|
||||
send_cmd(NULL, "SVSNOOP %s %s", server, (set ? "+" : "-"));
|
||||
}
|
||||
|
||||
They may take any number of arguments, depending on the command. They
|
||||
should eventually come to a send_cmd(); this root function is how
|
||||
commands are sent to the IRCd.
|
||||
|
||||
6) CAPAB/PROTOCTL
|
||||
|
||||
Most IRCD send a CAPAB or PROTOCTL line so that they can work out what
|
||||
the other end of the connection is capable of doing. Anope has a function
|
||||
to read these lines and set itself up to to handle these events better.
|
||||
When adding support for your ircd, take the following steps.
|
||||
|
||||
1) In the module constructor you must tell Anope what the uplink is capable of that
|
||||
isn't already passed in the CAPAB/PROTOCTL, you do this by something similar to:
|
||||
|
||||
CapabType c[] = { CAPAB_NOQUIT, CAPAB_NICKIP, CAPAB_ZIP, CAPAB_TOKEN, CAPAB_SSJ3, CAPAB_NICK2, CAPAB_VL, CAPAB_TLKEXT, CAPAB_CHANMODE, CAPAB_SJB64, CAPAB_NICKCHARS };
|
||||
for (unsigned i = 0; i < 11; ++i)
|
||||
Capab.SetFlag(c[i]);
|
||||
|
||||
Anything else given to Anope in the CAPAB/PROTOCTL message will be handled later by CapabParse.
|
||||
|
||||
The available CAPAB options are:
|
||||
|
||||
--------------------------------------------------------------------------
|
||||
Define | Description
|
||||
----------------|------------|-----------|--------------------------------
|
||||
CAPAB_NOQUIT | NOQUIT protocol support
|
||||
CAPAB_TSMODE | Chanmodes are timestamped
|
||||
CAPAB_UNCONNECT | UNCONNECT protocol support
|
||||
CAPAB_NICKIP | IP sent in the NICK line
|
||||
CAPAB_NSJOIN | Smart SJOIN support
|
||||
CAPAB_ZIP | Support for gzipped links
|
||||
CAPAB_BURST | Supports BURST command
|
||||
CAPAB_TS3 | Support for TS3 protocol
|
||||
CAPAB_TS5 | Support for TS5 protocol
|
||||
CAPAB_DKEY | DH-Key exchange using DKEY
|
||||
CAPAB_DOZIP | Link traffic will be gzipped
|
||||
CAPAB_DODKEY | Do DKEY with this link
|
||||
CAPAB_QS | Supports quit storm removal
|
||||
CAPAB_SCS | String Cache System support
|
||||
CAPAB_PT4 | Support for PT4 protocol
|
||||
CAPAB_UID | Support for UIDs
|
||||
CAPAB_KNOCK | Supports KNOCK
|
||||
CAPAB_CLIENT | Supports CLIENT
|
||||
CAPAB_IPV6 | Support for IPv6 addresses
|
||||
CAPAB_SSJ5 | Smart Join protocol 5 support
|
||||
CAPAB_SN2 | Support for SN2 protocol
|
||||
CAPAB_VHOST | Supports VHOST protocol
|
||||
CAPAB_TOKEN | Supports s2s tokens
|
||||
CAPAB_SSJ3 | Smart Join protocol 3 support
|
||||
CAPAB_NICK2 | Support for extended NICK (v2)
|
||||
CAPAB_UMODE2 | Supports UMODE2 command
|
||||
CAPAB_VL | VLine information in info field
|
||||
CAPAB_TLKEXT | Not 8, but 10 params in TKL's
|
||||
CAPAB_CHANMODE | Channel modes are passed here
|
||||
CAPAB_SJB64 | SJOIN timestamps are base64 encoded
|
||||
CAPAB_NICKCHARS | Character set used by the IRCD for nicks
|
||||
|
||||
2) In the ircd.c find the function anope_cmd_capab(); this function will
|
||||
send the CAPAB/PROTOCTL line (consult your ircd documentation for
|
||||
which to send). In a single line type in the tokens that anope must
|
||||
send. Here is an example of Hybrid's capab line:
|
||||
|
||||
/* CAPAB */
|
||||
void anope_cmd_capab()
|
||||
{
|
||||
send_cmd(NULL, "CAPAB TS5 EX IE HOPS HUB AOPS");
|
||||
}
|
||||
|
||||
3) Ensure that the CAPAB/PROTOCTL event his handled correctly.
|
||||
|
||||
A) In the function module constructor make sure that you have the
|
||||
following two lines:
|
||||
|
||||
m = createMessage("CAPAB", anope_event_capab);
|
||||
addCoreMessage(IRCD,m);
|
||||
|
||||
B) Add the function to handle the event
|
||||
|
||||
int anope_event_capab(char *source, int ac, char **av)
|
||||
{
|
||||
CapabParse(ac, av);
|
||||
return MOD_CONT;
|
||||
}
|
||||
|
||||
This function should call the CapabParse function which parses
|
||||
the received CAPAB/PROTOCTL line.
|
||||
|
||||
7) 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.
|
||||
@@ -0,0 +1,66 @@
|
||||
Anope Multi Language Support
|
||||
----------------------------
|
||||
|
||||
1) Building Anope with gettext support
|
||||
2) Adding a new language
|
||||
3) Using languages with modules
|
||||
4) Updating a language file
|
||||
|
||||
1) Building Anope with gettext support
|
||||
|
||||
To build Anope with gettext support, gettext and its development libraries must be installed on the system.
|
||||
|
||||
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
|
||||
|
||||
If you have already built Anope you will need to delete the build directory and rebuild from scratch.
|
||||
|
||||
Building Anope on Windows with gettext support is explained in docs/WIN32.txt
|
||||
|
||||
2) Adding a new language
|
||||
|
||||
Anope uses gettext (https://www.gnu.org/software/gettext/) to translate messages for users. To add a new language
|
||||
install gettext and run `msginit -l language -o anope.language.po -i anope.pot`. For example if I was translating to
|
||||
Spanish I could run `msginit -l es_ES -o anope.es_ES.po -i anope.pot`. Open the newly generating .po file and start
|
||||
translating. Once you are done simply rerun ./Config; make && make install and add the language to your anope.conf.
|
||||
Note that on Windows it is not quite this simple, windows.cpp must be edited and Anope recompiled and restarted.
|
||||
|
||||
Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
|
||||
po files (especially on Windows).
|
||||
|
||||
If you have finished a language file translation and you want others to use it, please file a pull request on GitHub
|
||||
or send it to team@anope.org (don't forget to mention clearly your (nick)name, your email and the language name).
|
||||
You'll of course get full credit for it.
|
||||
|
||||
3) Using languages with modules
|
||||
|
||||
Module authors can easily add the ability to have their modules translated by adding _() around the strings they
|
||||
want translated (messages to the user, etc).
|
||||
|
||||
If you want to translate a module someone has made, first generate a .pot file if there isn't one already using
|
||||
`xgettext -s -d modulename -o modulename.pot --from-code=utf-8 --keyword --keyword=_ modulename.cpp`.
|
||||
The .pot file is a template of all of the language strings extracted from the source file.
|
||||
|
||||
Next, run msginit on the .pot file with
|
||||
`msginit -l language -o modulename.language.po -i modulename.pot`.
|
||||
Translate the new .po file and rerun ./Config; make && make install.
|
||||
|
||||
All .po and .pot files should be placed in modules/third/language. Additionally an update script is provided there
|
||||
that will create .pot files and merge any changes to it with existing .po files.
|
||||
|
||||
4) Updating a language file
|
||||
|
||||
Poedit (https://poedit.net/) is a popular po file editor, and we recommend using it or another editor designed to edit
|
||||
po files (especially on Windows).
|
||||
|
||||
Before editing the relevant file in languages/, run `update.sh` in the languages/ folder, i.e. `cd` to it and run
|
||||
./update.sh
|
||||
This will update the language file to contain all strings that need a translation.
|
||||
|
||||
Then commit only the changed .po files in git.
|
||||
+47
-43
@@ -12,7 +12,7 @@ Anope Modules
|
||||
|
||||
1) Introduction
|
||||
|
||||
Anope 1.6 onwards supports external modules. External modules are pieces
|
||||
Anope supports external modules. External modules are pieces
|
||||
of code that can be attached to a running Anope process dynamically. These
|
||||
modules can serve several purposes, and perform all kind of operations to
|
||||
enhance your network.
|
||||
@@ -22,16 +22,16 @@ Anope Modules
|
||||
1. If modules are supported by your system, they will be configured
|
||||
automatically when you run ./Config. The modules will be installed
|
||||
to the modules directory in your data path (by default this will
|
||||
be ~/services/modules).
|
||||
be ~/anope/data/modules).
|
||||
|
||||
Note: you might need to run "make distclean" prior to running ./Config
|
||||
2. Compile Anope as usual using ./Config. The "make" process will now
|
||||
compile module support into Anope, and compile the default sample
|
||||
modules, and any other module located in the modules folder or any
|
||||
of its sub-directories, eg. modules/extra.
|
||||
|
||||
2. Compile Anope as usual. The (g)make process will now compile module
|
||||
support into Anope, and compile the default sample modules, and/or
|
||||
any other module located on the modules folder ("src/modules/").
|
||||
|
||||
3. Install Anope as usual. The install process will place the compiled
|
||||
modules in their runtime location, making them available for loading.
|
||||
3. Install Anope as usual. The "make install" process will place the
|
||||
compiled modules in their runtime location, making them available
|
||||
for loading.
|
||||
|
||||
4. Start or restart services to make use of the new Anope executable.
|
||||
Note that you do not need to restart to load new or changed modules,
|
||||
@@ -42,59 +42,64 @@ Anope Modules
|
||||
All module manipulation commands are done through OperServ. These are:
|
||||
|
||||
MODLOAD Load a module
|
||||
MODRELOAD Reload a module
|
||||
MODUNLOAD Un-Load a module
|
||||
MODLIST List loaded modules
|
||||
MODINFO Info about a loaded module
|
||||
|
||||
These commands available to Service Roots only.
|
||||
Access to the above commands require the operserv/modload and modlist
|
||||
permissions. Refer to operserv.example.conf.
|
||||
|
||||
You can also load (and pre-load) Modules automatically by loading them
|
||||
on startup. To do so, edit your services.conf file and change the values
|
||||
of "ModuleAutoload" and "ModuleDelayedAutoload" to include the modules
|
||||
you want to load every time Anope starts.
|
||||
on startup. To do so, edit any one of the configuration files (you may
|
||||
want to use modules.conf for third-party/extra modules, or a config
|
||||
file relevant to the *Serv your module operates on, eg. hostserv.conf),
|
||||
and use the following method to load a module on startup or reload:
|
||||
module { name="hs_modname" }
|
||||
|
||||
4) Usage Example
|
||||
|
||||
/msg OperServ modload hs_moo
|
||||
*** Global -- from OperServ: dengel loaded module hs_moo
|
||||
-OperServ- Module hs_moo loaded
|
||||
/msg OperServ modload ns_identify
|
||||
-OperServ- Module ns_identify loaded
|
||||
|
||||
/msg OperServ modinfo hs_moo
|
||||
-OperServ- Module: hs_moo Version: 1.1 Author: Anope loaded: Mar 21 10:54:37 2004 CLT
|
||||
-OperServ- Providing command: /msg HostServ moo
|
||||
/msg OperServ modinfo ns_identify
|
||||
-OperServ- Module: ns_identify Version: 1.9.7 Author: Anope loaded: Jun 17 18:43:08 2012 BST (2 minutes ago)
|
||||
-OperServ- Providing service: nickserv/identify
|
||||
-OperServ- Command ID on NickServ is linked to nickserv/identify
|
||||
-OperServ- Command IDENTIFY on NickServ is linked to nickserv/identify
|
||||
|
||||
/msg HostServ moo
|
||||
-HostServ- MOO! - This command was loaded via a module!
|
||||
/msg OperServ modreload ns_identify
|
||||
-OperServ- Module ns_identify reloaded
|
||||
|
||||
/msg OperServ modunload hs_moo
|
||||
*** Global -- from OperServ: dengel unloaded module hs_moo
|
||||
-OperServ- Module hs_moo unloaded
|
||||
/msg OperServ modunload ns_identify
|
||||
-OperServ- Module ns_identify unloaded
|
||||
|
||||
/msg HostServ moo
|
||||
-HostServ- Unknown command moo. "/msg HostServ HELP" for help.
|
||||
/msg NickServ IDENTIFY
|
||||
-NickServ- Unknown command identify. "/msg NickServ HELP" for help.
|
||||
NOTE: Doing the above, with the command still existing in a config file,
|
||||
will result in a log message, similar to the following:
|
||||
<@NickServ> Command IDENTIFY exists on me, but its service nickserv/identify was not found!
|
||||
|
||||
* Note that the name of the module file is "hs_moo.c", yet we load
|
||||
and reference the module as "hs_moo" only. By naming convention
|
||||
* Note that the name of the module source file is "ns_identify.cpp", yet we
|
||||
load and reference the module as "ns_identify" only. By naming convention
|
||||
modules have an abbreviated service name they attach to (hs_ for
|
||||
HostServ, cs_ for ChanServ, etc) followed by a descriptive keyword.
|
||||
|
||||
5) More Modules
|
||||
|
||||
Anope ships with three sample modules that only illustrates some of the
|
||||
implemented module capabilities. They don't really do much or anything
|
||||
useful.
|
||||
|
||||
You can download more useful modules from http://modules.anope.org/. Just
|
||||
grab the module file (usually with a .c extension). Place the module
|
||||
file in your modules (src/modules) folder; the same folder that contains
|
||||
both hs_moo.c and catserv.c module files.
|
||||
You can download more useful modules from https://modules.anope.org/. Just
|
||||
grab the module file (usually with a .cpp extension). Place the module
|
||||
file in your modules (anope-1.9.x/modules/third) folder; although any of
|
||||
the other folders within the modules directory will work.
|
||||
|
||||
The new modules need to be compiled and installed before you can make
|
||||
use of them:
|
||||
|
||||
|
||||
1. Make sure you're in the main source directory. (usually anope-1.X.XX/)
|
||||
2. Run `make modules` to compile any new or changed modules.
|
||||
3. Run `make install` to install the modules.
|
||||
2. Run ./Config to find and configure modules, then `cd build`.
|
||||
3. Run `make` to compile Anope, and any modules.
|
||||
4. Run `make install` to copy the compiled binaries to the ~/anope/
|
||||
directory.
|
||||
|
||||
You can now use /msg OperServ MODLOAD to load the new modules.
|
||||
|
||||
@@ -106,19 +111,18 @@ Anope Modules
|
||||
Use modules at your own risk, and make sure you get them from a
|
||||
reputable source. You might get module support by contacting the module
|
||||
author, posting on our online forum, or maybe on our #anope channel
|
||||
at /server irc.anope.org.
|
||||
at /server irc.teranova.net.
|
||||
|
||||
7) Information for Developers
|
||||
|
||||
There are a number of useful documents on the Anope Wiki. The Anope Wiki
|
||||
can be reached at:
|
||||
|
||||
* http://wiki.anope.org/
|
||||
|
||||
* https://wiki.anope.org/
|
||||
|
||||
8) Modules Repository
|
||||
|
||||
You can find modules at http://modules.anope.org
|
||||
You can find modules at https://modules.anope.org/
|
||||
|
||||
These modules are 3rd party and as such are not supported by the Anope Team.
|
||||
Contact the Module Author directly with problems, not the Anope Team.
|
||||
|
||||
-27
@@ -1,27 +0,0 @@
|
||||
Anope MySQL Support
|
||||
-------------------
|
||||
|
||||
MySQL support was readded in version 1.9.2 In the form of three modules.
|
||||
|
||||
db_mysql_read - Allows you to load your databases from MySQL.
|
||||
db_mysql_write - Allows live updating of SQL tables whenever something is executed in Anope.
|
||||
db_mysql_execute - Allows executing of Anope commands via SQL.
|
||||
|
||||
To execute commands via SQL, you must insert the command into the anope_commands table, an example is as follows:
|
||||
|
||||
INSERT INTO `anope_commands` (nick, service, command) VALUES('Adam', 'NickServ', 'REGISTER qwerty Adam@anope.org');
|
||||
|
||||
By default, every 60 seconds Anope checks this table for commands to execute. When Anope sees a new command to execute, it checks the following.
|
||||
|
||||
If the nick given is -SQLUser, then the command gets executed by a special fake user within Anope called -SQLUser. -SQLUser has every permission and command available, there are no permission checks at all for this user, it can do anything.
|
||||
|
||||
If the nick is not -SQLUser, it checks to see if it is a registered nick. If it is, it sees if there are any users online using the NickCore of that nick.
|
||||
If there is a user online with that core the command gets executed as if that user executed it, and the reply goes to that user.
|
||||
If there isn't a user online with the core, it creates a fake user as the nick given to it, and gives to it the permissions the user would have if they were online and identified.
|
||||
If the nick is not registered, it checks to see if there is a user currently on that nick. If there is, it executes the command as that user, and the reply goes to that user.
|
||||
If the nick is not registered and no one is using the nick, it creates a fake user of the nick given to it, and gives it regular nonidentified user access.
|
||||
|
||||
Currently there is no way to check to see if a command was executed successfully within Anope from SQL (even if there was, the possibly update delay would be a problem).
|
||||
|
||||
IMPORTANT: When using db_mysql_write when you already have a database, you need to do an initial import of the data to SQL (as db_mysql_write only updates it when it is changed, it never actually mass-dumps all of your data into SQL). To do this, start Anope and execute /OperServ SQLSYNC.
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
Highlighted News in Anope 1.9
|
||||
=============================
|
||||
|
||||
* Added in live updating SQL and the ability to execute commands through SQL
|
||||
* Re-designed configuration file
|
||||
* Code refresh / rewrite into C++
|
||||
|
||||
-41
@@ -1,41 +0,0 @@
|
||||
Anope Proxy Detector
|
||||
--------------------
|
||||
|
||||
1) Introduction
|
||||
2) Alternatives
|
||||
|
||||
1) Introduction
|
||||
|
||||
Anope has had a built-in proxy detector since it's first version. Recently,
|
||||
however, this built-in proxy detector has been removed. This was because
|
||||
the Anope team found that the proxy detector was showing it's age, and the
|
||||
time needed to restore it to a good state wasn't worth it, also considering
|
||||
that there are currently good alternatives out there which do the job as
|
||||
good as it can be done already.
|
||||
|
||||
2) Alternatives
|
||||
|
||||
A) Blitzed Open Proxy Monitor (BOPM)
|
||||
B) NeoStats + OPSB
|
||||
|
||||
Note that these are seperate projects and that the Anope team won't give
|
||||
support on these programs. For support, please refer to the sites of the
|
||||
creators of the software packages.
|
||||
|
||||
A) Blitzed Open Proxy Monitor (BOPM)
|
||||
|
||||
URL: http://wiki.blitzed.org/BOPM
|
||||
|
||||
BOPM is currently the leading proxy detector for IRC networks out
|
||||
there. Altough it is not designed to run on a central place for the
|
||||
entire network, it can be done with some minor tweaking on most IRCd's.
|
||||
The Anope Team advises BOPM for the best security.
|
||||
|
||||
B) NeoStats + OPSB
|
||||
|
||||
URL: http://www.neostats.net/
|
||||
|
||||
NeoStats is the swiss knife of IRC tools. In combination with the OPSB
|
||||
module by NeoStats Software, it can scan for proxies in a similar way
|
||||
as BOPM does. The OPSB module is based on BOPM and has been adjusted to
|
||||
be able to scan all clients from one centralized proxy detector.
|
||||
+258
-367
@@ -1,367 +1,258 @@
|
||||
Anope -- a set of IRC services for IRC networks
|
||||
-----------------------------------------------
|
||||
|
||||
Anope is 2003-2010 Anope Team <team@anope.org>.
|
||||
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
|
||||
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
|
||||
|
||||
This program is free but copyrighted software; see the file COPYING for
|
||||
details.
|
||||
|
||||
Information about Anope may be found at http://www.anope.org/
|
||||
Information about Epona may be found at http://www.epona.org/
|
||||
Information about Services may be found at http://www.ircservices.esper.net/
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
1) Credits
|
||||
2) Presentation
|
||||
3) Installation
|
||||
4) Command Line Options
|
||||
5) Messages Translation
|
||||
6) Contact and Mailing List
|
||||
|
||||
1) Credits
|
||||
|
||||
Anope is based on Lara's Epona version 1.4.14.
|
||||
Epona is based on Andy Church's IRC Services version 4.3.3.
|
||||
|
||||
The original credits:
|
||||
|
||||
* Mauritz Antunes
|
||||
Portuguese translation
|
||||
* Jose R. Holzmann, Raul S. Villarreal
|
||||
Spanish translation
|
||||
* Andrew Kempe <theshadow@shadowfire.org>
|
||||
News system
|
||||
* <d.duca@eurcom.net>
|
||||
Italian translation
|
||||
* <mikado@holyfire.com>
|
||||
Turkish translation
|
||||
* Andrew Kempe <theshadow@shadowfire.org>
|
||||
Session limiting
|
||||
|
||||
Epona credits:
|
||||
|
||||
* lara <lara@pegsoft.net>
|
||||
Main coding
|
||||
* CafeiN <oytuny@yahoo.com>
|
||||
Turkish translation
|
||||
* Sylvain Cresto aka tost <scresto@netsante.fr>
|
||||
FreeBSD 5 patch
|
||||
* Marcelo Conde Foscarini aka Bras <ircadmin@brmarket.net>
|
||||
Portuguese translation
|
||||
* Alvaro Toledo aka POLLITO <atoledo@keldon.org>
|
||||
Spanish translation
|
||||
* chemical <chemical@musicplay.de>
|
||||
German translation
|
||||
* shine <dh@shinewelt.de>
|
||||
German translation
|
||||
* Guven Guzelbey aka MeShGuL <guzelbey@cs.utk.edu>
|
||||
Turkish translation
|
||||
* Jordi Pujol <jordi.pujol@aujac.org>
|
||||
Catalan translation
|
||||
* Eva Dachs <evadachs@terra.es>
|
||||
Catalan translation
|
||||
* Toni Perez <toni.perez@aujac.org>
|
||||
Catalan translation
|
||||
* Sergios Karalis <sergios_k@hotmail.com>
|
||||
Greek translation
|
||||
* Thomas J. Stensas aka ShadowMaster <shadowmaster@shadow-realm.org>
|
||||
Ultimate 3.x support
|
||||
|
||||
Anope credits:
|
||||
|
||||
* Adam Kramer <ribosome@anope.org>
|
||||
* Adam <adam@anope.org>
|
||||
* Alvaro Toledo <atoledo@keldon.org>
|
||||
* Amanda Folson <amanda@anope.org>
|
||||
* Andrew Berquist <vash@anope.org>
|
||||
* Björn Stiddien <keeper@anope.org>
|
||||
* Charles Kingsley <chaz@anope.org>
|
||||
* Chris Hogben <heinz@anope.org>
|
||||
* Daniel Engel <dane@zero.org>
|
||||
* David <dv@diboo.net>
|
||||
* David Narayan <jester@phrixus.net>
|
||||
* David Robson <rob@anope.org>
|
||||
* Daniele Nicolucci <jollino@sogno.net>
|
||||
* Florian Schulze <certus@anope.org>
|
||||
* Gabriel Acevedo H. <drstein@anope.org>
|
||||
* Jan Milants <viper@anope.org>
|
||||
* Jens Voss <dukepyrolator@anope.org>
|
||||
* JH <jh@irc-chat.net>
|
||||
* Joris Vink <joris@anope.org>
|
||||
* Lucas Nussbaum <lucas@lucas-nussbaum.net>
|
||||
* Mark Summers <mark@goopler.net>
|
||||
* Matthew Beeching <jobe@invictachat.net>
|
||||
* Naram Qashat <cyberbotx@anope.org>
|
||||
* Pieter Bootsma <geniusdex@anope.org>
|
||||
* Robin Burchell <w00t@inspircd.org>
|
||||
* Thomas Juberg Stensås <ShadowMaster@Shadow-Realm.org>
|
||||
* Trystan .S Lee <trystan@nomadirc.net>
|
||||
* openglx <openglx@brasnerd.com.br>
|
||||
|
||||
Anope Translations:
|
||||
|
||||
* GeniusDex <geniusdex@anope.org> (nl.l)
|
||||
* Kein <kein-of@yandex.ru> (ru.l)
|
||||
* Stuff <the.stuff@gmx.de> (de.l)
|
||||
* Gabriel Acevedo H. <drstein@anope.org> (es.l)
|
||||
* Janos Kapitany <sarkanyka@cjbchat.hu> (hun.l)
|
||||
* Szymon S'wierkosz <szymek@adres.pl> (pl.l)
|
||||
|
||||
Anope uses the strlcat() and strlcpy() functions from OpenSSH 2.5.1p2.
|
||||
These functions are copyrighted by Todd C. Miller:
|
||||
|
||||
Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED `AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
|
||||
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
|
||||
|
||||
2) Presentation
|
||||
|
||||
Anope is a set of Services for IRC networks that allows users to manage
|
||||
their nicks and channels in a secure and efficient way, and administrators
|
||||
to manage their network with powerful tools.
|
||||
|
||||
Currently available services are:
|
||||
|
||||
* NickServ, a powerful nickname manager that users can use to protect
|
||||
themselves against nick stealing. Each user has its own nickname
|
||||
group, that allows the user to register as many nicks as needed
|
||||
while still being able to take profit of his privileges and to
|
||||
modify the nick configuration. NickServ also has an optional
|
||||
password retrieval feature.
|
||||
|
||||
* ChanServ, a powerful channel manager that helps users to administer
|
||||
their channels in a totally customizable way. ChanServ has an
|
||||
internal list of privileged users and banned users that controls
|
||||
accesses on a per-channel basis. It eliminates all takeover
|
||||
problems, because of its powerful op/unban/invite and even mass
|
||||
deop and mass kick functions.
|
||||
|
||||
* MemoServ, an helpful companion that allows sending short messages
|
||||
to offline users, that they can then read when they come online
|
||||
later.
|
||||
|
||||
* BotServ, an original service that allows users to get a permanent,
|
||||
friendly bot on their channels in an easy way. Each bot can be
|
||||
configured to monitor the channels against floods, repetitions,
|
||||
caps writing, and swearing, and to take appropriate actions. It
|
||||
also can handle user-friendly commands (like !op, !deop, !voice,
|
||||
!devoice, !kick, and many others), say a short greet message when
|
||||
an user joins a channel, and even "take over" ChanServ actions such
|
||||
as auto-opping users, saying the entry notice, and so on. This
|
||||
service can be disabled if you want to save some bandwidth.
|
||||
|
||||
* OperServ, the IRCops' and IRC admins' black box, that allows them
|
||||
to manage the list of network bans (also known as AKILL (DALnet) or
|
||||
GLINE (Undernet)), to configure messages displayed to users when
|
||||
they log on, to set modes and to kick users from any channel, to
|
||||
send notices quickly to the entire network, and much more!
|
||||
|
||||
* HostServ, a neat service that allows users to show custom vHosts
|
||||
(virtual hosts) instead of their real IP address; this only works
|
||||
on daemons supporting ip cloaking, such as UnrealIRCd, UltimateIRCd
|
||||
and ViagraIRCd.
|
||||
|
||||
Anope currently works with:
|
||||
|
||||
* Bahamut 1.4.27 or later (including 1.8)
|
||||
* InspIRCd 1.1, 1.2, or 2.0
|
||||
* Ratbox 2.0.6 or later
|
||||
* UnrealIRCd 3.2 or later
|
||||
|
||||
Anope could also work with some of the daemons derived by the ones listed
|
||||
above, but there's no support for them if they work or don't work.
|
||||
|
||||
|
||||
3) Installation
|
||||
|
||||
See the INSTALL file for instruction on installing Anope.
|
||||
|
||||
|
||||
4) Command Line Options
|
||||
|
||||
Normally, Anope can be run simply by invoking the "services" executable.
|
||||
Anope will then use the defaults specified in the services.conf file, and
|
||||
connect to the specified uplink server. Alternatively, any of the
|
||||
following command-line options can be specified to change the default
|
||||
values:
|
||||
|
||||
-remote server[:port] Connect to the specified server
|
||||
-local host -or- Connect from the specified address (e.g. for
|
||||
[host]:[port] multihomed servers)
|
||||
-name servername Our server name (e.g. services.some.net)
|
||||
-desc string Description of us (e.g. SomeNet Services)
|
||||
-user username Username for Services' nicks (e.g. services)
|
||||
-host hostname Hostname for Services' nicks (e.g. esper.net)
|
||||
-dir directory Directory containing Services' data files
|
||||
(e.g. /usr/local/lib/services)
|
||||
-log filename Services log filename (e.g. services.log)
|
||||
-update secs How often to update databases (in seconds)
|
||||
-expire secs How often to check for nick/channel
|
||||
expiration (in seconds)
|
||||
|
||||
Additionally, the following command-line options can be used to modify
|
||||
the behavior of Anope:
|
||||
|
||||
-debug Enable debugging mode; more info sent to log (give
|
||||
option more times for more info)
|
||||
-readonly Enable read-only mode; no changes to databases
|
||||
allowed, .db files and log not written
|
||||
-skeleton Enable skeleton mode; like read-only mode, but only
|
||||
OperServ is available
|
||||
-nofork Do not fork after startup; log messages will be
|
||||
written to terminal (as well as to the log file
|
||||
if not in read-only mode)
|
||||
-forceload Try to load as much of the databases as possible,
|
||||
even if errors are encountered
|
||||
-noexpire Expiration routines won't be run at all
|
||||
-logchan Startup with logchan enabled
|
||||
-version Display the version of Anope
|
||||
-nothird Do not load the modules specified in ModulesAutoload
|
||||
or ModulesDelayedAutoload in the config file
|
||||
-protocoldebug Debug each incoming message after protocol parsing
|
||||
-support Used for support, same as -debug -nofork -nothird
|
||||
|
||||
Upon starting, Anope will parse its command-line parameters, open its
|
||||
logfile, then (assuming the -nofork option is not given) detach itself
|
||||
and run in the background. If Anope encounters a problem reading the
|
||||
database files or cannot connect to its uplink server, it will terminate
|
||||
immediately; otherwise, it will run until the connection is terminated
|
||||
(or a QUIT, SHUTDOWN, or RESTART command is sent; see OperServ's help).
|
||||
In the case of an error, an appropriate error message will be written to
|
||||
the log file.
|
||||
|
||||
If Anope is run with the "-readonly" command-line option, it can serve as
|
||||
a "backup" to the full version of services. A "full" version of services
|
||||
(run without -readonly) will automatically reintroduce its pseudo-clients
|
||||
(NickServ, ChanServ, etc.), while a "backup" services will not, thus
|
||||
allowing full services to be brought up at any time without disrupting
|
||||
the network (and without having to take backup services down beforehand).
|
||||
|
||||
If Anope is run with the "-skeleton" command-line option, it will not try
|
||||
to load the nickname or channel databases, and will respond with "service
|
||||
is inactive" messages to any commands sent to NickServ, ChanServ,
|
||||
MemoServ or BotServ. This can be useful as an emergency stopgap measure
|
||||
when the main copy of Anope cannot be started.
|
||||
|
||||
The "-debug" option is useful if you find or suspect a problem in Anope.
|
||||
Giving it once on the command line will cause all traffic to and from
|
||||
services as well as some other debugging information to be recorded in
|
||||
the log file; if you send a bug report, PLEASE include an excerpt from
|
||||
the log file WITH DEBUGGING ACTIVE; we cannot emphasize enough how
|
||||
important this is to tracking down problems. (You can also enable
|
||||
debugging while Services is running using OperServ's SET DEBUG command.)
|
||||
If you repeat the -debug option more than once, the debugging level will
|
||||
be increased, which provides more detailed information but may also slow
|
||||
Anope down considerably and make the log file grow dramatically faster
|
||||
(in particular, at debug level 4 a message is written to the log for
|
||||
every character received from the server). In general, a debug level of 1
|
||||
is sufficient for the coding team to be able to trace a problem, because
|
||||
all network traffic is included and we can usually reproduce the problem.
|
||||
|
||||
The "-forceload" option is provided to attempt recovery of data from
|
||||
corrupted or truncated databases. Normally, if Anope encounters an error
|
||||
writing to a database file, it will attempt to restore the original
|
||||
version of the file and report an error to the logfile and through
|
||||
WALLOPS. However, if this should fail (which normally should not happen),
|
||||
or if Anope is terminated abruptly e.g. by kill -9 or a power failure,
|
||||
then one or more of the databases may be corrupt. Normally, this will
|
||||
cause Anope to abort the next time you try to run it; however, if yo
|
||||
give the -forceload option to Anope, it will instead read as much as it
|
||||
can, then skip to the next database. For obvious reasons, it's highly
|
||||
recommended to keep backup copies of your databases in case something
|
||||
does happen (since Anope will stop at the first error in a database, even
|
||||
with -forceload, meaning you lose any data after that).
|
||||
|
||||
5) Messages Translations
|
||||
|
||||
Anope has a powerful option in NickServ allowing users to choose what
|
||||
language it must use when sending messages to users. Messages are stored
|
||||
in language files (located in the lang directory).
|
||||
|
||||
Anope is currently provided with thirteen languages: Catalan, Dutch,
|
||||
English, French, German, Greek, Hungarian, Italian, Polish, Portuguese,
|
||||
Russian, Spanish and Turkish. If you want to translate Anope messages
|
||||
into another language, follow this instructions:
|
||||
|
||||
* Copy the lang/en_us.l file to a meaningful name (for example, if
|
||||
you would like to translate messages in Spanish, you would rename
|
||||
it to es.l).
|
||||
|
||||
* Edit the file with your favorite text editor. Carefully read the
|
||||
instructions given at the top of the file, and start translating
|
||||
the whole file. The file is big, so make sure you have some coffee
|
||||
available ;) Try to avoid the use of English words as much as
|
||||
possible. If the new language contains only a few 'special'
|
||||
characters, try and use latin representations of it, if possible.
|
||||
Remember that most clients are only capable of handling the
|
||||
ISO-8859-1 charset. Of course, if you are translating Anope to a
|
||||
language with a totally different charset, such as Russian, feel
|
||||
free to use the one that suites it best (and the one that is in use
|
||||
by most speakers of that language ;)).
|
||||
|
||||
* When this is done, you have two solutions: either patch Services
|
||||
source code so they take in account the new language file
|
||||
(basically, you'll have to modify lang/Makefile, language.c and
|
||||
maybe services.h), or send us the translated file so we can make
|
||||
the patch and include your language in the next Anope release.
|
||||
|
||||
* Note that there is a language tool on bin/langtool.pl that can aid
|
||||
the verification process on newly created language files. Try to
|
||||
use it before you submit a language file.
|
||||
|
||||
When new major releases come out, you'll not have to retranslate the
|
||||
whole file; the Changes.lang file will help you to know which messages
|
||||
were added, modified or deleted.
|
||||
|
||||
If you did a language file translation, and want to let others use it,
|
||||
please send it to team@anope.org (don't forget to mention clearly your
|
||||
(nick)name, your e-mail and the language name). You'll of course get full
|
||||
credit for it, and will even get future final major releases before
|
||||
anyone else to complete the translation!... ;)
|
||||
|
||||
6) Contact
|
||||
|
||||
For announcements and discussions about Anope, please visit our
|
||||
Portal and Forums at http://www.anope.org/ -- make sure you register
|
||||
yourself and your network to get full benefits.
|
||||
|
||||
If you read the documentation carefully, and didn't find the answer to
|
||||
your question, feel free to post on the website forums or join our irc
|
||||
channel (irc.anope.org #anope). Once you join our Support channel, just
|
||||
type "? report" for instructions on how to report a Bug. Be as precise as
|
||||
possible when asking a question, because we have no extraordinary powers
|
||||
and can't guess things if they aren't provided. The more precise you are,
|
||||
the sooner you'll be likely to get an answer.
|
||||
|
||||
If you think you found a bug, add it to the bug tracking system
|
||||
(http://bugs.anope.org) and - again - be as precise as possible. Also say
|
||||
whether the bug happens always or under what circumstances, and anything
|
||||
that could be useful to track your bug down. If you wrote a patch, send
|
||||
it over. :)
|
||||
Anope -- a set of IRC services for IRC networks
|
||||
-----------------------------------------------
|
||||
|
||||
Anope is 2003-2025 Anope Team <team@anope.org>.
|
||||
Based on Epona 2000-2002 PegSoft <epona@pegsoft.net>.
|
||||
Based on Services 1996-1999 Andrew Church <achurch@achurch.org>.
|
||||
|
||||
This program is free but copyrighted software; see the file COPYING for
|
||||
details.
|
||||
|
||||
Information about Anope may be found at https://www.anope.org/
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
1) Credits
|
||||
2) Presentation
|
||||
3) Installation
|
||||
4) Command Line Options
|
||||
5) Messages Translation
|
||||
6) Contact
|
||||
|
||||
1) Credits
|
||||
|
||||
Anope is based on Lara's Epona version 1.4.14.
|
||||
Epona is based on Andy Church's IRC Services version 4.3.3.
|
||||
|
||||
The original credits:
|
||||
|
||||
* Mauritz Antunes
|
||||
Portuguese translation
|
||||
* Jose R. Holzmann, Raul S. Villarreal
|
||||
Spanish translation
|
||||
* Andrew Kempe <theshadow@shadowfire.org>
|
||||
News system
|
||||
* <d.duca@eurcom.net>
|
||||
Italian translation
|
||||
* <mikado@holyfire.com>
|
||||
Turkish translation
|
||||
* Andrew Kempe <theshadow@shadowfire.org>
|
||||
Session limiting
|
||||
|
||||
Epona credits:
|
||||
|
||||
* lara <lara@pegsoft.net>
|
||||
Main coding
|
||||
* CafeiN <oytuny@yahoo.com>
|
||||
Turkish translation
|
||||
* Sylvain Cresto aka tost <scresto@netsante.fr>
|
||||
FreeBSD 5 patch
|
||||
* Marcelo Conde Foscarini aka Bras <ircadmin@brmarket.net>
|
||||
Portuguese translation
|
||||
* Alvaro Toledo aka POLLITO <atoledo@keldon.org>
|
||||
Spanish translation
|
||||
* chemical <chemical@musicplay.de>
|
||||
German translation
|
||||
* shine <dh@shinewelt.de>
|
||||
German translation
|
||||
* Guven Guzelbey aka MeShGuL <guzelbey@cs.utk.edu>
|
||||
Turkish translation
|
||||
* Jordi Pujol <jordi.pujol@aujac.org>
|
||||
Catalan translation
|
||||
* Eva Dachs <evadachs@terra.es>
|
||||
Catalan translation
|
||||
* Toni Perez <toni.perez@aujac.org>
|
||||
Catalan translation
|
||||
* Sergios Karalis <sergios_k@hotmail.com>
|
||||
Greek translation
|
||||
* Thomas J. Stensas aka ShadowMaster <shadowmaster@shadow-realm.org>
|
||||
Ultimate 3.x support
|
||||
|
||||
Anope credits:
|
||||
|
||||
* Adam Kramer <ribosome@anope.org>
|
||||
* Adam <adam@anope.org>
|
||||
* Alvaro Toledo <atoledo@keldon.org>
|
||||
* Amanda Folson <amanda@anope.org>
|
||||
* Andrew Berquist <vash@anope.org>
|
||||
* Björn Stiddien <keeper@anope.org>
|
||||
* Charles Kingsley <chaz@anope.org>
|
||||
* Chris Hogben <heinz@anope.org>
|
||||
* Daniel Engel <dane@zero.org>
|
||||
* David <dv@diboo.net>
|
||||
* David Narayan <jester@phrixus.net>
|
||||
* David Robson <rob@anope.org>
|
||||
* Daniele Nicolucci <jollino@sogno.net>
|
||||
* Florian Schulze <certus@anope.org>
|
||||
* Gabriel Acevedo H. <drstein@anope.org>
|
||||
* Jan Milants <viper@anope.org>
|
||||
* Jens Voss <dukepyrolator@anope.org>
|
||||
* JH <jh@irc-chat.net>
|
||||
* Joris Vink <joris@anope.org>
|
||||
* Lee Holmes <lethality@anope.org>
|
||||
* Lucas Nussbaum <lucas@lucas-nussbaum.net>
|
||||
* Mark Summers <mark@goopler.net>
|
||||
* Matthew Beeching <jobe@mdbnet.co.uk>
|
||||
* Naram Qashat <cyberbotx@anope.org>
|
||||
* Phil Lavin <phil@anope.org>
|
||||
* Pieter Bootsma <geniusdex@anope.org>
|
||||
* Robin Burchell <w00t@inspircd.org>
|
||||
* Sean Roe <therock247uk@anope.org>
|
||||
* Sebastian V <hal9000@anope.org>
|
||||
* Thomas Juberg Stensås <ShadowMaster@Shadow-Realm.org>
|
||||
* Trystan .S Lee <trystan@nomadirc.net>
|
||||
* openglx <openglx@brasnerd.com.br>
|
||||
|
||||
Anope Translations:
|
||||
|
||||
* Robby <robby@chatbelgie.be> (nl_NL)
|
||||
* Kein <kein-of@yandex.ru> (ru_RU)
|
||||
* Maik Funke <Han@mefalcon.org> (de_DE)
|
||||
* Isaac Fontal <i_fontal@hotmail.com> (es_ES)
|
||||
* Janos Kapitany <sarkanyka@cjbchat.hu> (hu_HU)
|
||||
* Szymon S'wierkosz <szymek@adres.pl> (pl_PL)
|
||||
* Christopher N. <saka@epiknet.org> (fr_FR)
|
||||
* Yusuf Kurekci <ysfm.20@gmail.com> (tr_TR)
|
||||
|
||||
Anope Web panel:
|
||||
|
||||
* Denis M. (Phr33d0m) <god@politeia.in>
|
||||
|
||||
2) Presentation
|
||||
|
||||
Anope is a set of services for IRC networks that allows users to manage
|
||||
their nicks and channels in a secure and efficient way, and administrators
|
||||
to manage their network with powerful tools.
|
||||
|
||||
Currently available services are:
|
||||
|
||||
* NickServ, a powerful nickname manager that users can use to protect
|
||||
themselves against nick stealing. Each user has its own nickname
|
||||
group, that allows the user to register as many nicks as needed
|
||||
while still being able to take profit of his privileges and to
|
||||
modify the nick configuration. NickServ also has an optional
|
||||
password retrieval feature.
|
||||
|
||||
* ChanServ, a powerful channel manager that helps users to administer
|
||||
their channels in a totally customizable way. ChanServ has an
|
||||
internal list of privileged users and banned users that controls
|
||||
accesses on a per-channel basis. It eliminates all takeover
|
||||
problems, because of its powerful op/unban/invite and even mass
|
||||
deop and mass kick functions.
|
||||
|
||||
* MemoServ, an helpful companion that allows sending short messages
|
||||
to offline users, that they can then read when they come online
|
||||
later.
|
||||
|
||||
* BotServ, an original service that allows users to get a permanent,
|
||||
friendly bot on their channels in an easy way. Each bot can be
|
||||
configured to monitor the channels against floods, repetitions,
|
||||
caps writing, and swearing, and to take appropriate actions. It
|
||||
also can handle user-friendly commands (like !op, !deop, !voice,
|
||||
!devoice, !kick, and many others), say a short greet message when
|
||||
an user joins a channel, and even "take over" ChanServ actions such
|
||||
as auto-opping users, saying the entry notice, and so on. This
|
||||
service can be disabled if you want to save some bandwidth.
|
||||
|
||||
* OperServ, the IRCops' and IRC admins' black box, that allows them
|
||||
to manage the list of network bans (also known as AKILL (DALnet) or
|
||||
GLINE (Undernet)), to configure messages displayed to users when
|
||||
they log on, to set modes and to kick users from any channel, to
|
||||
send notices quickly to the entire network, and much more!
|
||||
|
||||
* HostServ, a neat service that allows users to show custom vHosts
|
||||
(virtual hosts) instead of their real IP address; this only works
|
||||
on daemons supporting ip cloaking, such as UnrealIRCd.
|
||||
|
||||
Anope currently works with:
|
||||
|
||||
* Bahamut 2.0 or later
|
||||
* InspIRCd 3 or later
|
||||
* ircd-hybrid 8.2.23 or later
|
||||
* ircd-ratbox 3 or later
|
||||
* ngIRCd 19.2 or later
|
||||
* Plexus 3 or later
|
||||
* Solanum (all versions)
|
||||
* UnrealIRCd 6 or later
|
||||
|
||||
Anope could also work with some of the daemons derived by the ones listed
|
||||
above, but there's no support for them if they work or don't work.
|
||||
|
||||
|
||||
3) Installation
|
||||
|
||||
See the INSTALL file for instruction on installing Anope.
|
||||
|
||||
|
||||
4) Command Line Options
|
||||
|
||||
Normally, Anope can be run simply by invoking the "services" executable.
|
||||
Any of the following command-line options can be specified to change
|
||||
the behavior of Anope:
|
||||
|
||||
--debug Enable debugging mode; more info sent to log (give
|
||||
option more times for more info)
|
||||
--readonly Enable read-only mode; no changes to databases
|
||||
allowed
|
||||
--nofork Do not fork after startup; log messages will be
|
||||
written to terminal
|
||||
--noexpire Expiration routines won't be run at all
|
||||
--version Display the version of Anope
|
||||
--nothird Do not load the non-core modules specified
|
||||
--protocoldebug Debug each incoming message after protocol parsing
|
||||
--support Used for support, same as --debug --nofork --nothird
|
||||
|
||||
Upon starting, Anope will parse its command-line parameters then
|
||||
(assuming the --nofork option is not given) detach itself and run in the
|
||||
background. If Anope encounters a problem reading the database files or
|
||||
cannot connect to its uplink server, it will terminate immediately;
|
||||
otherwise, it will run until the connection is terminated (or a QUIT,
|
||||
SHUTDOWN, or RESTART command is sent; see OperServ's help).
|
||||
|
||||
In the case of an error, an appropriate error message will be written to
|
||||
the log file.
|
||||
|
||||
If Anope is run with the "--readonly" command-line option, it can serve as
|
||||
a "backup" to the full version of services. A "full" version of services
|
||||
(run without --readonly) will automatically reintroduce its pseudo-clients
|
||||
(NickServ, ChanServ, etc.), while a "backup" services will not, thus
|
||||
allowing full services to be brought up at any time without disrupting
|
||||
the network (and without having to take backup services down beforehand).
|
||||
|
||||
The "--debug" option is useful if you find or suspect a problem in Anope.
|
||||
Giving it once on the command line will cause all traffic to and from
|
||||
services as well as some other debugging information to be recorded in
|
||||
the log file; if you send a bug report, PLEASE include an excerpt from
|
||||
the log file WITH DEBUGGING ACTIVE; we cannot emphasize enough how
|
||||
important this is to tracking down problems. (You can also enable
|
||||
debugging while Anope is running using OperServ's SET DEBUG command.)
|
||||
If you repeat use --debug=<level>, the debugging level will be increased,
|
||||
which provides more detailed information but may also slow Anope down
|
||||
considerably and make the log file grow dramatically faster. In general,
|
||||
a debug level of 1 is sufficient for the coding team to be able to trace
|
||||
a problem, because all network traffic is included and we can usually
|
||||
reproduce the problem.
|
||||
|
||||
5) Messages Translations
|
||||
|
||||
Please see LANGUAGE for this information
|
||||
|
||||
6) Contact
|
||||
|
||||
For announcements and discussions about Anope, please visit our
|
||||
Portal and Forums at https://www.anope.org/ -- make sure you register
|
||||
yourself to get full benefits.
|
||||
|
||||
If you read the documentation carefully, and didn't find the answer to
|
||||
your question, feel free to post on the website forums or join our irc
|
||||
channel (irc.teranova.net #anope). Once you join our Support channel be as
|
||||
precise as possible when asking a question, because we have no extraordinary
|
||||
powers and can't guess things if they aren't provided.
|
||||
|
||||
The more precise you are the sooner you'll be likely to get an answer.
|
||||
|
||||
If you think you found a bug, add it to the bug tracking system
|
||||
(https://github.com/anope/anope/issues) and - again - be as precise as possible.
|
||||
Also say whether the bug happens always or under what circumstances, and anything
|
||||
that could be useful to track your bug down. If you wrote a patch, send
|
||||
it over. :)
|
||||
|
||||
+160
@@ -0,0 +1,160 @@
|
||||
Anope has Redis database support (https://redis.io/).
|
||||
This document explains the data structure used by Anope, and explains how
|
||||
keyspace notification works.
|
||||
|
||||
This is not a tutorial on how to use Redis, see https://redis.io/documentation
|
||||
for that.
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
1) Data structure
|
||||
2) Keyspace notifications
|
||||
3) Examples of modifying, deleting, and creating objects
|
||||
|
||||
1) Data structure
|
||||
|
||||
There are 4 key namespaces in Anope, they are:
|
||||
|
||||
id - The keys in id are used to atomically create object ids for new
|
||||
objects. For example, if I were to create a new BotInfo I would first:
|
||||
|
||||
redis 127.0.0.1:6379> INCR id:BotInfo
|
||||
|
||||
To get the object ID of the new object.
|
||||
|
||||
ids - The keys in ids contain a set of all object ids of the given type.
|
||||
For example:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS ids:BotInfo
|
||||
|
||||
Returns "1", "2", "3", "4", "5", "6", "7", "8" because I have 8 bots that
|
||||
have IDs 1, 2, 3, 4, 5, 6, 7, and 8, respectively.
|
||||
|
||||
hash - The keys in hash are the actual objects, stored as hashes. For
|
||||
example, if I had just looked up all BotInfo ids and wanted to iterate
|
||||
over all of them, I would start by:
|
||||
|
||||
redis 127.0.0.1:6379> HGETALL hash:BotInfo:1
|
||||
|
||||
Which gets all keys and values from the hash of type BotInfo with id 1.
|
||||
This may return:
|
||||
|
||||
"nick" -> "BotServ"
|
||||
"user" -> "services"
|
||||
"host" -> "services.anope.org"
|
||||
"created" -> "1368704765"
|
||||
|
||||
value - The keys in value only exist to aid looking up object IDs. They
|
||||
are sets of object IDs and are used to map key+value pairs to objects.
|
||||
For example:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nick:Adam
|
||||
|
||||
Returns a set of object ids of NickAlias objects that have the key
|
||||
'nick' set to the value 'Adam' in its hash. Clearly this can only
|
||||
ever contain at most one object, since it is not possible to have
|
||||
more than one registered nick with the same name, but other keys
|
||||
will contain more than one, such as:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickCore:email:adam@anope.org
|
||||
|
||||
Which would return all accounts with the email "adam@anope.org".
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:ChanAccess:mask:Adam
|
||||
|
||||
Which would return all access entries set on the account "Adam".
|
||||
|
||||
Behavior similar to SQL's AND, can be achieved using the
|
||||
SINTER command, which does set intersection on one or more sets.
|
||||
|
||||
2) Keyspace notifications
|
||||
|
||||
Redis 2.7 (unstable) and 2.8 (stable) and newer support keyspace notifications
|
||||
(https://redis.io/topics/notifications). This allows Redis to notify Anope of
|
||||
any external changes to objects in the database. Once notified, Anope will
|
||||
immediately update the object. Otherwise, Anope keeps all objects in memory
|
||||
and will not regularly read from the database once started.
|
||||
|
||||
You can use this to modify objects in Redis and have them immediately reflected
|
||||
back into Anope. Additionally you can use this feature to run multiple Anope
|
||||
instances simultaneously from the same database (see also, Redis database
|
||||
replication).
|
||||
|
||||
To use keyspace notifications you MUST execute
|
||||
|
||||
redis 127.0.0.1:6379> CONFIG SET notify-keyspace-events KA
|
||||
OK
|
||||
|
||||
or set notify-keyspace-events in redis.conf properly. Anope always executes
|
||||
CONFIG SET when it first connects.
|
||||
|
||||
If you do not enable keyspace events properly Anope will be UNABLE to see any
|
||||
object modifications you do.
|
||||
|
||||
The key space ids and value are managed entirely by Anope, you do
|
||||
not (and should not) modify them. Once you modify the object (hash), Anope will
|
||||
update them for you to correctly reflect any changes made to the object.
|
||||
|
||||
Finally, always use atomic operations. If you are inserting a new object with
|
||||
multiple commands, or inserting multiple objects at once, specifically if the
|
||||
objects depend on each other, you MUST use a transaction.
|
||||
|
||||
3) Examples of modifying, deleting, and creating objects
|
||||
|
||||
These examples will ONLY work if you meet the criteria in section 2.
|
||||
|
||||
If I want to change the email account 'Adam' to 'Adam@anope.org', I would execute the following:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam
|
||||
|
||||
Which returns a value of "1", which is the object id I want to modify.
|
||||
Now to change the email:
|
||||
|
||||
redis 127.0.0.1:6379> HSET hash:NickCore:1 email Adam@anope.org
|
||||
|
||||
You can now see this in NickServ's INFO command:
|
||||
-NickServ- Email address: Adam@anope.org
|
||||
|
||||
If I want to drop the account "Adam", I would execute the following:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickCore:display:Adam
|
||||
|
||||
Which returns a value of "1". I would then check:
|
||||
|
||||
redis 127.0.0.1:6379> SMEMBERS value:NickAlias:nc:Adam
|
||||
|
||||
To see what nicknames depend on this account to exist, as I will
|
||||
have to remove those too. This returns the values "2", and "3".
|
||||
|
||||
Finally, I can drop the nick using a transaction via:
|
||||
|
||||
redis 127.0.0.1:6379> MULTI
|
||||
OK
|
||||
redis 127.0.0.1:6379> DEL hash:NickAlias:2
|
||||
QUEUED
|
||||
redis 127.0.0.1:6379> DEL hash:NickAlias:3
|
||||
QUEUED
|
||||
redis 127.0.0.1:6379> DEL hash:NickCore:1
|
||||
QUEUED
|
||||
redis 127.0.0.1:6379> EXEC
|
||||
|
||||
Or alternatively simply:
|
||||
|
||||
redis 127.0.0.1:6379> DEL hash:NickAlias:2 hash:NickAlias:3 hash:NickCore:1
|
||||
|
||||
If I wanted to create a BotServ bot, I would execute the following:
|
||||
|
||||
redis 127.0.0.1:6379> INCR id:BotInfo
|
||||
|
||||
Which returns a new object ID for me, in this example it will be "8".
|
||||
Now I can create the object:
|
||||
|
||||
HMSET hash:BotInfo:8 nick redis user redis host services.anope.org realname "Anope IRC Services"
|
||||
|
||||
Note if you are using HSET instead of HMSET you will need to use a transaction, as shown in the above example.
|
||||
If you are watching your services logs you will immediately see:
|
||||
|
||||
USERS: redis!redis@services.anope.org (Anope IRC Services) connected to the network (services.anope.org)
|
||||
|
||||
And the bot redis will be in BotServ's bot list.
|
||||
Notice how ids:BotInfo and the value keys are updated automatically.
|
||||
@@ -0,0 +1,21 @@
|
||||
RPC using JSON-RPC and XML-RPC (using PECL's xmlrpc_encode_request and xmlrpc_decode functions) is supported.
|
||||
|
||||
This allows external applications, such as websites, to execute remote procedure calls to Anope in real time.
|
||||
|
||||
Currently there are 5 supported RPC calls, provided by rpc_main:
|
||||
|
||||
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 the given command to Anope using the given service name. If the user given is online, the
|
||||
command reply will go to them, if not it is returned by RPC.
|
||||
|
||||
stats - Takes no parameters, returns miscellaneous stats that can be found in the /operserv stats command.
|
||||
|
||||
RPC was designed to be used with db_sql, and will not return any information that can be pulled from the SQL
|
||||
database, such as accounts and registered channel information. It is instead used for pulling realtime data such
|
||||
as users and channels currently online. For examples on how to use these calls in PHP, see xmlrpc.php in docs/RPC.
|
||||
|
||||
Also note that when using XMLRPC the parameter named "id" is reserved for query ID. If you pass a query to Anope containing a value for id. it will
|
||||
be stored by Anope and the same id will be passed back in the result.
|
||||
@@ -0,0 +1,211 @@
|
||||
// SPDX-License-Identifier: CC0-1.0
|
||||
"use strict";
|
||||
|
||||
/** Implements methods for accessing an Anope JSON-RPC server. */
|
||||
class AnopeRPC {
|
||||
|
||||
/**
|
||||
* Initializes a new AnopeRPC instance with the specified RPC host.
|
||||
*
|
||||
* @param {string} The RPC host base URL.
|
||||
*/
|
||||
constructor(host) {
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes an arbitrary RPC query.
|
||||
*
|
||||
* @param {string} method The name of the method to execute.
|
||||
* @param {...*} params The parameters pass to the method.
|
||||
* @returns {*} The result of the RPC query.
|
||||
*/
|
||||
async run(method, ...params) {
|
||||
const request = JSON.stringify({
|
||||
"jsonrpc": "2.0",
|
||||
"method": method,
|
||||
"params": params,
|
||||
"id": Math.random().toString(36).slice(2)
|
||||
});
|
||||
const response = await fetch(this.host, {
|
||||
method: 'POST',
|
||||
body: request
|
||||
});
|
||||
if (!response.ok) {
|
||||
throw new Error(`HTTP returned ${response.status}`)
|
||||
}
|
||||
const json = await response.json();
|
||||
if ("error" in json) {
|
||||
throw new Error(`JSON-RPC returned ${json.error.code}: ${json.error.message}`)
|
||||
}
|
||||
if ("result" in json) {
|
||||
return json.result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of accounts.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} The level of detail to request.
|
||||
* @returns {array} An array of account names.
|
||||
*/
|
||||
listAccounts(detail = "name") {
|
||||
return this.run("anope.listAccounts", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified account.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the account.
|
||||
* @returns {object} An object containing information about the account.
|
||||
*/
|
||||
account(name) {
|
||||
return this.run("anope.account", name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of channels.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} The level of detail to request.
|
||||
* @returns {array} An array of channel names.
|
||||
*/
|
||||
listChannels(detail = "name") {
|
||||
return this.run("anope.listChannels", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified channel.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the channel.
|
||||
* @returns {object} An object containing information about the channel.
|
||||
*/
|
||||
channel(name) {
|
||||
return this.run("anope.channel", name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of services operators.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} The level of detail to request.
|
||||
* @returns {array} An array of channel names.
|
||||
*/
|
||||
listOpers(detail = "name") {
|
||||
return this.run("anope.listOpers", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified services operator.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the services operator.
|
||||
* @returns {object} An object containing information about the services operator.
|
||||
*/
|
||||
oper(name) {
|
||||
return this.run("anope.oper", name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of servers.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} The level of detail to request.
|
||||
* @returns {array} An array of servers names.
|
||||
*/
|
||||
listServers(detail = "name") {
|
||||
return this.run("anope.listServers", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified server.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the server.
|
||||
* @returns {object} An object containing information about the server.
|
||||
*/
|
||||
server(name) {
|
||||
return this.run("anope.server", name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a list of users.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} The level of detail to request.
|
||||
* @returns {array} An array of channel names.
|
||||
*/
|
||||
listUsers(detail = "name") {
|
||||
return this.run("anope.listUsers", detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves information about the specified user.
|
||||
*
|
||||
* Requires the rpc_data module to be loaded.
|
||||
*
|
||||
* @param {string} nick The nick of the user.
|
||||
* @returns {object} An object containing information about the user.
|
||||
*/
|
||||
user(nick) {
|
||||
return this.run("anope.user", nick);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to every user on the network.
|
||||
*
|
||||
* Requires the rpc_message module to be loaded.
|
||||
*
|
||||
* @param {...*} messages One or more messages to send.
|
||||
*/
|
||||
messageNetwork(...messages) {
|
||||
return this.run("anope.messageNetwork", ...messages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to every user on the specified server.
|
||||
*
|
||||
* Requires the rpc_message module to be loaded.
|
||||
*
|
||||
* @param {string} name The name of the server.
|
||||
* @param {...*} messages One or more messages to send.
|
||||
*/
|
||||
messageServer(server, ...messages) {
|
||||
return this.run("anope.messageServer", server, ...messages);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a message to the specified user.
|
||||
*
|
||||
* Requires the rpc_message module to be loaded.
|
||||
*
|
||||
* @param {string} source The source pseudoclient to send the message from.
|
||||
* @param {string} target The target user to send the message to.
|
||||
* @param {...*} messages One or more messages to send.
|
||||
*/
|
||||
messageUser(source, target, ...messages) {
|
||||
return this.run("anope.messageUser", source, target, ...messages);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
const arpc = new AnopeRPC("http://127.0.0.1:8080/jsonrpc");
|
||||
arpc.listServers().then(servers => {
|
||||
console.log(servers);
|
||||
}).catch (error => {
|
||||
console.log(error);
|
||||
});
|
||||
*/
|
||||
@@ -0,0 +1,150 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* JSON-RPC functions
|
||||
*
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*/
|
||||
|
||||
class AnopeRPC
|
||||
{
|
||||
/**
|
||||
* The RPC host
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $host;
|
||||
|
||||
/**
|
||||
* Initiate a new AnopeRPC instance
|
||||
*
|
||||
* @param $host
|
||||
*/
|
||||
public function __construct($host)
|
||||
{
|
||||
$this->host = $host;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run an RPC command. Name should be a query name and params an array of parameters, eg:
|
||||
* $this->raw("checkAuthentication", ["adam", "qwerty"]);
|
||||
* If successful returns back an array of useful information.
|
||||
*
|
||||
* Note that $params["id"] is reserved for query ID, you may set it to something if you wish.
|
||||
* If you do, the same ID will be passed back with the reply from Anope.
|
||||
*
|
||||
* @param $name
|
||||
* @param $params
|
||||
* @return array|null
|
||||
*/
|
||||
public function run($name, $params)
|
||||
{
|
||||
$request = json_encode([
|
||||
"jsonrpc" => "2.0",
|
||||
"id" => uniqid(),
|
||||
"method" => $name,
|
||||
"params" => $params,
|
||||
]);
|
||||
$context = stream_context_create(["http" => [
|
||||
"method" => "POST",
|
||||
"header" => "Content-Type: application/json",
|
||||
"content" => $request]]);
|
||||
|
||||
$inbuf = file_get_contents($this->host, false, $context);
|
||||
$response = json_decode($inbuf, true);
|
||||
|
||||
if ($response) {
|
||||
return $response;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Do Command on Service as User, eg:
|
||||
* $anope->command("ChanServ", "Adam", "REGISTER #adam");
|
||||
* Returns an array of information regarding the command execution, if
|
||||
* If 'online' is set to yes, then the reply to the command was sent to the user on IRC.
|
||||
* If 'online' is set to no, then the reply to the command is in the array member 'return'
|
||||
*
|
||||
* @param $service
|
||||
* @param $user
|
||||
* @param $command
|
||||
* @return array|null
|
||||
*/
|
||||
public function command($service, $user, $command)
|
||||
{
|
||||
return $this->run("command", [$service, $user, $command]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check an account/nick name and password to see if they are valid
|
||||
* Returns the account display name if valid
|
||||
*
|
||||
* @param $account
|
||||
* @param $pass
|
||||
* @return string|null
|
||||
*/
|
||||
public function auth($account, $pass)
|
||||
{
|
||||
$ret = $this->run("checkAuthentication", [$account, $pass]);
|
||||
|
||||
if ($ret && array_key_exists("result", $ret) && array_key_exists("account", $ret["result"])) {
|
||||
return $ret["result"]["account"];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of misc stats regarding Anope
|
||||
*
|
||||
* @return array|null
|
||||
*/
|
||||
public function stats()
|
||||
{
|
||||
return $this->run("stats", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Look up data for a channel
|
||||
* Returns an array containing channel information, or an array of size one
|
||||
* (just containing the name) if the channel does not exist
|
||||
*
|
||||
* @param $channel
|
||||
* @return array|null
|
||||
*/
|
||||
public function channel($channel)
|
||||
{
|
||||
return $this->run("anope.channel", [$channel]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sent a notice to a user.
|
||||
* Returns an array containing channel information, or an array of size one
|
||||
* (just containing the name) if the channel does not exist
|
||||
*
|
||||
* @param $source
|
||||
* @param $target
|
||||
* @param $message
|
||||
* @return array|null
|
||||
*/
|
||||
public function notice($source, $target, $message)
|
||||
{
|
||||
return $this->run("anope.messageUser", [$source, $target, $message]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Like channel(), but different.
|
||||
*
|
||||
* @param $user
|
||||
* @return array|null
|
||||
*/
|
||||
public function user($user)
|
||||
{
|
||||
return $this->run("anope.user", [$user]);
|
||||
}
|
||||
}
|
||||
|
||||
$anope = new AnopeRPC("http://127.0.0.1:8080/jsonrpc");
|
||||
@@ -0,0 +1,457 @@
|
||||
# Anope `rpc_data` RPC interface
|
||||
|
||||
## `anope.listAccounts`
|
||||
|
||||
Lists all accounts that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the account names. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of account names.
|
||||
|
||||
If the detail level is "full" then a mapping of account names to information about the account. See `anope.account` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["account1", "account2", "account3"]
|
||||
```
|
||||
|
||||
## `anope.account`
|
||||
|
||||
Retrieves information about the specified account.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | A nickname belonging to the account.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified account does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the account.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
display | string | The display nickname of the account.
|
||||
email | string or null | The email address associated with the account or null if one has not been specified.
|
||||
extensions | map | A key-value map of the extensions set on this account by modules.
|
||||
language | string or null | The language associated with the account or null if the account uses the default language.
|
||||
lastmail | int | The time at which an email was last sent for this account.
|
||||
nicks | map | Information about nicknames that belong to the account keyed by the nickname.
|
||||
nicks.\*.extensions | map | A key-value map of the extensions set on this nickname by modules.
|
||||
nicks.\*.lastseen | int | The time at which this nickname was last used.
|
||||
nicks.\*.registered | int | The time at which this nickname was registered.
|
||||
nicks.\*.vhost | map or null | The vhost associated with the account or null if the user has no vhost.
|
||||
nicks.\*.vhost.created | int | The time at which the vhost was created.
|
||||
nicks.\*.vhost.creator | string | The nickname of the creator of the vhost.
|
||||
nicks.\*.vhost.host | string | The host segment of the vhost.
|
||||
nicks.\*.vhost.ident | string or null | The ident segment of the vhost or null if there is not one.
|
||||
nicks.\*.vhost.mask | string | The user@host or host mask of the vhost.
|
||||
opertype | map or null | The oper type associated with the account or null if they are not a services operator.
|
||||
opertype.commands | array[string] | The commands that the services operator type can use.
|
||||
opertype.name | string | The name of the services operator type.
|
||||
opertype.privileges | array[string] | The privileges that the services operator type has.
|
||||
registered | int | The time at which the account was registered.
|
||||
uniqueid | uint | The unique immutable identifier of the account.
|
||||
users | array[string] | The IRC users who are currently logged in to this account.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"display": "foo",
|
||||
"email": "example@example.com",
|
||||
"extensions": {
|
||||
"AUTOOP": true,
|
||||
"HIDE_EMAIL": true,
|
||||
"HIDE_MASK": true,
|
||||
"MEMO_RECEIVE": true,
|
||||
"MEMO_SIGNON": true,
|
||||
"NS_PRIVATE": true,
|
||||
"PROTECT": true,
|
||||
"PROTECT_AFTER": 69
|
||||
},
|
||||
"language": null,
|
||||
"lastmail": 1745071858,
|
||||
"nicks": {
|
||||
"foo": {
|
||||
"extensions": {
|
||||
"NS_NO_EXPIRE": true
|
||||
},
|
||||
"lastseen": 1745074153,
|
||||
"registered": 1745071857,
|
||||
"vhost": null
|
||||
},
|
||||
"bar": {
|
||||
"extensions": {},
|
||||
"lastseen": 1745072602,
|
||||
"registered": 1745071857,
|
||||
"vhost": {
|
||||
"created": 1745072653,
|
||||
"creator": "foo",
|
||||
"host": "bar.baz",
|
||||
"ident": "foo",
|
||||
"mask": "foo@bar.baz"
|
||||
}
|
||||
}
|
||||
},
|
||||
"opertype": {
|
||||
"commands": ["hostserv/*", "operserv/session"],
|
||||
"name": "Helper",
|
||||
"privileges": ["chanserv/no-register-limit"]
|
||||
},
|
||||
"registered": 1745071857,
|
||||
"uniqueid": 11085415958920757000,
|
||||
"users": [
|
||||
"foo"
|
||||
]
|
||||
}
|
||||
```
|
||||
## `anope.listChannels`
|
||||
|
||||
Lists all channels that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the channel names. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of channel names.
|
||||
|
||||
If the detail level is "full" then a mapping of channel names to information about the channel. See `anope.channel` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["#chan1", "#chan2", "#chan3"]
|
||||
```
|
||||
|
||||
## `anope.channel`
|
||||
|
||||
Retrieves information about the specified channel.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The name of the channel.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified channel does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the channel.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
created | int | The UNIX time at which the channel was originally created.
|
||||
listmodes | map | List modes which are set on the channel keyed by the mode character.
|
||||
modes | array[string] | Flag and parameter modes which are set on the channel.
|
||||
name | string | The name of the channel.
|
||||
registered | boolean | Whether the channel is registered.
|
||||
topic | map or null | The channel topic or null if no topic is set.
|
||||
topic.setat | int | The time at which the topic was set.
|
||||
topic.setby | string | The nick or nuh of the user who set the topic.
|
||||
topic.value | string | The text of the topic.
|
||||
users | array[string] | The users that are current in the channel prefixed by their status mode prefixes.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"created": 1740402691,
|
||||
"listmodes": {
|
||||
"b": ["foo!bar@baz", "account:bax"],
|
||||
},
|
||||
"modes": ["+knrt", "secret"],
|
||||
"name": "#chan1",
|
||||
"registered": true,
|
||||
"topic": {
|
||||
"setat": 1740404706,
|
||||
"setby": "nick1",
|
||||
"value": "Example channel topic"
|
||||
},
|
||||
"users": ["@nick1", "nick2"]
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.listOpers`
|
||||
|
||||
Lists all services operators that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the services operator nicknames. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of services operator names.
|
||||
|
||||
If the detail level is "full" then a mapping of services operator names to information about the services operator. See `anope.oper` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["nick1", "nick2", "nick3"]
|
||||
```
|
||||
|
||||
## `anope.oper`
|
||||
|
||||
Retrieves information about the specified services operator.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The name of the services operator.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified services operator does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the services operator.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
fingerprints | array[string] or null | The client certificate fingerprints that a user must be using to log in as this services operator or null if there are no client certificate restrictions.
|
||||
hosts | array[string] or null | The user@ip and user@ip masks that a user must be connecting from to log in as this services operator or null if there are no host restrictions.
|
||||
name | string | The name of the services operator.
|
||||
operonly | boolean | Whether a user has to be a server operator to log in as this services operator.
|
||||
opertype | map | The oper type associated with the services operator.
|
||||
opertype.commands | array[string] | The commands that the services operator type can use.
|
||||
opertype.name | string | The name of the services operator type.
|
||||
opertype.privileges | array[string] | The privileges that the services operator type has.
|
||||
password | boolean | Whether a user has to specify a password to log in as the services operator.
|
||||
vhost | string or null | The vhost of the services operator or null if there is no vhost.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"fingerprints": null,
|
||||
"hosts": ["*@*.example.com"],
|
||||
"name": "stest",
|
||||
"operonly": true,
|
||||
"opertype": {
|
||||
"commands": ["hostserv/*", "operserv/session"],
|
||||
"name": "Helper",
|
||||
"privileges": ["chanserv/no-register-limit"]
|
||||
},
|
||||
"password": false,
|
||||
"vhost": null
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.listServers`
|
||||
|
||||
Lists all servers that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the server names. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of server names.
|
||||
|
||||
If the detail level is "full" then a mapping of server names to information about the server. See `anope.server` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["irc1.example.com", "irc2.example.com", "services.example.com"]
|
||||
```
|
||||
|
||||
## `anope.server`
|
||||
|
||||
Retrieves information about the specified server.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The name of the server.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified server does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the server.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
description | string | The description of the server.
|
||||
downlinks | array[string] | The servers which are behind this server
|
||||
juped | boolean | Whether the server has been juped.
|
||||
name | string | The name of the server.
|
||||
sid | string or null | The unique immutable identifier of the server or null if the IRCd does not use SIDs.
|
||||
synced | boolean | Whether the server has finished syncing.
|
||||
ulined | boolean | Whether the server is U-lined.
|
||||
uplink | string or null | The server in front of this server or null if it is the services server.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"description": "Anope IRC Services",
|
||||
"downlinks": ["irc.example.com"],
|
||||
"juped": false,
|
||||
"name": "services.example.com",
|
||||
"sid": "00B",
|
||||
"synced": true,
|
||||
"ulined": true,
|
||||
"uplink": null
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.listUsers`
|
||||
|
||||
Lists all users that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If specified then the level of detail to retrieve. Can be set to "full" to retrieve all information or "name" to just retrieve the user nicknames. Defaults to "name".
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified detail level does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
If the detail level is not specified or is "name" then an array of user nicknames.
|
||||
|
||||
If the detail level is "full" then a mapping of user nicknames to information about the user. See `anope.user` for more information on the data structure.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
["nick1", "nick2", "nick3"]
|
||||
```
|
||||
|
||||
## `anope.user`
|
||||
|
||||
Retrieves information about the specified user.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The nickname of the user.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified user does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the user.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
account | map or null | The user's account or null if they are not logged in to an account.
|
||||
account.display | string | The display nickname of the account.
|
||||
account.opertype | string or null | The account's oper type or null if the account is not a services operator.
|
||||
account.uniqueid | uint | The unique immutable identifier of the account.
|
||||
address | string | The IP address the user is connecting from.
|
||||
channels | array[string] | The channels that the user is in prefixed by their status mode prefixes.
|
||||
chost | string or null | The cloaked hostname of the user or null if they have no cloak.
|
||||
fingerprint | string or null | The fingerprint of the user's client certificate or null if they are not using one.
|
||||
host | string | The real hostname of the user.
|
||||
ident | string | The username (ident) of the user.
|
||||
modes | array[string] | Flag and parameter modes which are set on the user.
|
||||
nick | string | The nickname of the user.
|
||||
nickchanged | int | The time at which the user last changed their nickname.
|
||||
real | string | The real name of the user.
|
||||
server | string | The server that the user is connected to.
|
||||
signon | int | The time at which the user connected to the network.
|
||||
uid | string or null | The unique immutable identifier of the user or null if the IRCd does not use UIDs.
|
||||
vhost | string or null | The virtual host of the user or null if they have no vhost.
|
||||
vident | string or null | The virtual ident (username) of the user or null if they have no vident.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"account": {
|
||||
"display": "nick1",
|
||||
"opertype": "Services Root",
|
||||
"uniqueid": "17183514657819486040"
|
||||
},
|
||||
"address": "127.0.0.1",
|
||||
"channels": ["@#chan1", "#chan2"],
|
||||
"chost": "localhost",
|
||||
"fingerprint": null,
|
||||
"host": "localhost",
|
||||
"id": "9TSAAAAAA",
|
||||
"ident": "user1",
|
||||
"modes": ["+r"],
|
||||
"nick": "nick1",
|
||||
"nickchanged": 1740408318,
|
||||
"real": "An IRC User",
|
||||
"server": "irc.example.com",
|
||||
"signon": 1740408296,
|
||||
"vhost": "staff.example.com",
|
||||
"vident": null,
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,67 @@
|
||||
# Anope `rpc_message` RPC interface
|
||||
|
||||
## `anope.messageNetwork`
|
||||
|
||||
Sends a message to all users on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0+ | One or more messages to send.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The global service is not available.
|
||||
|
||||
### Result
|
||||
|
||||
This procedure returns no result.
|
||||
|
||||
## `anope.messageServer`
|
||||
|
||||
Sends a message to all users on the specified server.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The name of the server to message users on.
|
||||
1+ | One or more messages to send.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The global service is not available.
|
||||
-32098 | The specified server does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
This procedure returns no result.
|
||||
|
||||
## `anope.messageUser`
|
||||
|
||||
Sends a message to the specified user.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | The source pseudoclient to send the message from.
|
||||
1 | The target user to send the message to.
|
||||
2+ | One or more messages to send.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified source does not exist.
|
||||
-32098 | The specified target does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
This procedure returns no result.
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
Legend:
|
||||
x = done
|
||||
? = unsure
|
||||
+ = in progress
|
||||
|
||||
1.9.2
|
||||
-----
|
||||
[x] Redo database insanity.
|
||||
[x] Move database load/save to a module
|
||||
[x] realtime SQL/whatever module using events (possibly ongoing)
|
||||
[x] flatfile save on a periodic timer
|
||||
[x] SANE password encryption - prefix password with the method it was encrypted with, allowing for *seamless* upgrading to different methods
|
||||
[x] Salted SHA256 (contact Special for this)
|
||||
[x] New database format (text, not binary - works very well for merging and so on)
|
||||
[x] generic database routines modules can use to create their own database
|
||||
[?] IRCd capability support: don't rely on CAPAB, provide an interface to turn capabilities on specifically
|
||||
[x] Socket subsystem needs some serious loving
|
||||
[x] Multiple sockets
|
||||
[x] Asynchronous, using select() (multiple engines? not really needed..)
|
||||
[x] Callbacks, event style, see also inspircd
|
||||
[x] generic way to check which modes a user has set (u->HasUmode(UMODE_OPER))
|
||||
[x] way for one module to depend on another... not like 2 MOD_HEADs and it being unpredictable which is loaded first..
|
||||
the MOD_HEAD MOD_TAIL allows for too few combinations (interface code of insp, hooks code of insp?)
|
||||
[x] Last used time on AKICK/access entries
|
||||
[x] Channel passwords seem to be of limited use, think of a more appropriate way to handle this
|
||||
[+] General options block, ability to turn LOGCHAN on from the config file..
|
||||
[x] Docs directory cleanup
|
||||
[x] Fix permanent channels support properly
|
||||
[x] CS SET INHABIT to keep pseudoclient in a channel after it empties to maintain banlists and such
|
||||
[x] Set forbidden channels +s
|
||||
[x] SendAkill should just take a pointer to the Akill class instead of millions of fields (same for some other stuff)
|
||||
[x] burn do_sjoin with fire
|
||||
[x] Channel access additions
|
||||
[x] Setter
|
||||
[x] Last used
|
||||
|
||||
Future
|
||||
------
|
||||
[ ] Asynchronous DNS
|
||||
[ ] CIDR Akills, session exceptions, etc
|
||||
[ ] Hashing system for storing just about everything needs to die
|
||||
[ ] Move a (lot) of stuff to class members as a defined interface rather than copypasta everywhere (ns_set, ns_saset!)
|
||||
[?] Remote identification (1.9.1? will this break stuff?)
|
||||
[ ] Language charset stuff, including collation (1.9.1? phoenix?)
|
||||
[ ] Add support for +k, +q, etc type umodes
|
||||
[ ] fantasy: allow replies/notifications to fantasy commands to go to the channel via notice
|
||||
[?] a way for a module to queue itself (or even another module) for unloading
|
||||
[ ] Language system is disgusting, it must die.
|
||||
[ ] Modules should also have a way to add strings programatically
|
||||
[ ] Should be able to add many strings by dropping a file in a set location.
|
||||
[ ] I forsee this working via a function rather than defines, as it seems to do now: e.g. _("NS_NICK_IS_REGISTERED").
|
||||
[?] Update help to reflect the fact /msg memoserv set notify mail - works just fine ;)
|
||||
[ ] Useful/common "third party" modules to core distro
|
||||
[ ] NS AJOIN
|
||||
[+] Method to store listmodes (more generically than AKICK, too) for e.g. +beI and extbans, etc.
|
||||
[ ] Channel access additions
|
||||
[ ] Time added
|
||||
[ ] Time modified
|
||||
[ ] Expiry (useful?)
|
||||
[ ] NS INFO: seperate field for last seen realhost, shown to SRA only
|
||||
[ ] NS SUSPEND: show suspender and reason, probably to sopers only (see CS SUSPEND)
|
||||
[ ] Merge NS INFO blah ALL with NS INFO blah, if you're requesting info, you really want the info anyway.
|
||||
[?] Don't allow soper accounts to expire
|
||||
[?] Reason for CS SET RESTRICTED
|
||||
[ ] NS IDENTIFY changes
|
||||
[?] Last failed identify? Maybe more useful for sopers only, so users don't get unnecessarily worried
|
||||
[?] Last successful login time/ip? perhaps both of these should be a new nick setting
|
||||
[x] AKILL/SGLINE/etc..
|
||||
[x] Setter
|
||||
[x] Time added
|
||||
[+] Time modified (can they be modified?)
|
||||
[ ] Time until expiry/expiry time (YES, time until expiry *instead of* expiry time, more human)
|
||||
[x] Reason
|
||||
[ ] Unique IDs on each AKILL/blah so that networks may use them as ticket IDs
|
||||
[ ] HS ACTIVATE -ALL (rob sez this all needs reviewing)
|
||||
[?] NS MARK, CS MARK. Allow multiple marks. Combine into OS MARK? (AKA os_info)
|
||||
[?] MS IGNORE. Make it take nick (accounts) or n!u@h masks. Fake success of memo send still, but send to opers?
|
||||
[?] More "friendly" date displays of some things like registration time ("November 7th 2006 (2 years, 0 months, 0 days ago)")
|
||||
[?] OS INJECT
|
||||
[?] Drop CS SET ENTRYMSG, replace with a 'news' type system? (limited to a configured number of items, default 3)
|
||||
@@ -1,309 +0,0 @@
|
||||
Troubleshooting Guide for Anope 1.9
|
||||
------------------------------------------------
|
||||
|
||||
NOTE:
|
||||
An updated version of this guide can be found on our wiki:
|
||||
|
||||
http://wiki.anope.org/index.php/Troubleshooting
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
|
||||
1) General
|
||||
1.1) Anope complains in the logfile about being unable to load the default
|
||||
language.
|
||||
1.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
|
||||
1.3) I selected a language other than English, but sometimes Anope sends
|
||||
responses in English instead.
|
||||
1.4) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
|
||||
back up nick.db".
|
||||
1.5) Anope crashed with a segmentation fault.
|
||||
1.6) I've found a bug that's not mentioned here or in the README or BUGS
|
||||
files. What should I do?
|
||||
1.7) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not
|
||||
found'
|
||||
1.8) Anope and long (more then 30 character) nicknames.
|
||||
|
||||
2) Installation / Configuration
|
||||
2.1) When I run "make", I get an error message like "missing separator",
|
||||
"Unassociated shell command", "Unexpected end of line seen", etc.
|
||||
2.2) I get an error like "Makefile.inc not found".
|
||||
2.3) I typed "./services" at the command line, but nothing happened!
|
||||
2.4) Whenever I start Anope, I get a message on my IRC server saying
|
||||
"connection refused" or something similar, and Anope gives an error
|
||||
message from the server saying "Closing Link: ...".
|
||||
2.5) My IRC server is giving me messages like "Connection to
|
||||
services.whatever.net[127.0.0.1] activated" and then "Access denied --
|
||||
no N line". Why?
|
||||
2.6) When I say "/connect services.*", it doesn't work!
|
||||
2.7) Anope starts up okay, but if I try to register a nickname, it comes
|
||||
back with "Sorry, registration failed."
|
||||
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number
|
||||
of users online than I get from doing /lusers.
|
||||
|
||||
3) BotServ
|
||||
3.1) How do I add bots to BotServ?
|
||||
3.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
|
||||
IRCd?
|
||||
|
||||
4) ChanServ
|
||||
4.1) Anope's channel mode setting doesn't work. I can't set modes with
|
||||
OperServ, and every time ChanServ tries to set a mode, my server
|
||||
reverses the change.
|
||||
4.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
|
||||
founder expired.
|
||||
4.3) How to auto voice all those whom join my #channel?
|
||||
4.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
|
||||
|
||||
5) OperServ
|
||||
5.1) Using the OperServ JUPE command results in server messages like
|
||||
"Server juped.server introduced by non-hub server services.my.net".
|
||||
5.2) When I add an AKILL, the users matching it don't get killed.
|
||||
5.3) Trying to use OperServ gives me "Access denied".
|
||||
5.4) I can't get /OS UMODES and /OS SVSNICK to work!
|
||||
5.5) What is a Super-Admin? How does it work? Why might it not work?
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
1) General
|
||||
|
||||
1.1) Anope complains in the logfile about being unable to load the default
|
||||
language.
|
||||
|
||||
You forgot to run "make install".
|
||||
|
||||
1.2) Anope spricht kein Deutsch!, etc. (Anope doesn't speak my language!)
|
||||
|
||||
See section 5 of the README file.
|
||||
|
||||
1.3) I selected a language other than English, but sometimes Anope sends
|
||||
responses in English instead.
|
||||
|
||||
Some language files are not complete--in other words, they only have a
|
||||
translation of some of the message Anope uses. In this case, the
|
||||
missing messages will be displayed in English. You can either wait for
|
||||
the primary translator to provide us with a translation, or do the
|
||||
translation yourself and send us the messages translated into your
|
||||
language.
|
||||
|
||||
1.4) Anope always dies after about five minutes, saying "FATAL ERROR! Can't
|
||||
back up nick.db".
|
||||
|
||||
Make sure that the user Anope runs as has write access to the data
|
||||
directory, and that the data directory actually exists (the latter
|
||||
shouldn't be a problem if you ran the Config script). This means Anope
|
||||
needs write and execute permission on the data directory itself and execute
|
||||
permission on every parent directory of the data directory.
|
||||
|
||||
1.5) Anope crashed with a segmentation fault.
|
||||
|
||||
See if you can reproduce this by doing a certain sequence of things. If
|
||||
so, please report it to us (see part 6 of README file). If not, you're
|
||||
probably out of luck; if you like, you can report it to us anyway, but
|
||||
chances are it won't get fixed if we don't have instructions on reproducing
|
||||
it. If you do have such a problem, you may find the crontab utility useful
|
||||
for dealing with it.
|
||||
|
||||
Also, see the DumpCore directive in the configuration file. It allows Anope
|
||||
to dump its core whenever it's segfaulting, usually calling it core and
|
||||
placing it into Anope's main directory. Open up gdb by issuing the
|
||||
following command at your shell:
|
||||
|
||||
* gdb services core
|
||||
|
||||
(of course replacing 'core' with the name of the core if different) and
|
||||
type 'bt' at the gdb prompt. After that, send us the output you got and
|
||||
keep the core file in a safe place, in case we need it to dig deeper into
|
||||
the problem.
|
||||
|
||||
1.6) I've found a bug that's not mentioned here or in the README or BUGS files.
|
||||
What should I do?
|
||||
|
||||
See section 6 of the README file.
|
||||
|
||||
1.7) My FreeBSD box complains about 'Shared object "nss_dns.so.1" not found'
|
||||
|
||||
We haven't figured out the exact cause yet, but as a quickfix you can
|
||||
delete the /etc/nsswitch.conf file. Please keep in mind that removing a
|
||||
configuration file can be dangerous, so only do this if you know what you
|
||||
are doing.
|
||||
|
||||
1.8) Anope and long (more then 30 character) nicknames.
|
||||
|
||||
By default, Anope only supports nicknames up to 30 characters (NICKLEN=30).
|
||||
If your IRCd allows for longer nicknames or has been modified to do so
|
||||
Anope will start logging a lot of ("NICK from nonexistent nick") messages.
|
||||
This is because once a user uses a nick that is too long for Anope to handle,
|
||||
Anope loses track of the user for the remainder of the session.
|
||||
It is POSSIBLE but not NOT RECOMMENDED to extend the maximum length of nicknames
|
||||
Anope can track, however this will also break database compatibility. DBs saved
|
||||
with Anope set to allow for example 40 chars cannot be read by a clean Anope
|
||||
installation and vice versa. So changing the maximum nick length is only possible
|
||||
when starting with fresh databases and even then the consequences of this are
|
||||
UNTESTED.
|
||||
In order to change the maximum internal nick length, change the NICKMAX setting
|
||||
in include/config.h, recompile anope and start without databases.
|
||||
|
||||
|
||||
2) Installation / Configuration
|
||||
|
||||
2.1) When I run "make", I get an error message like "missing separator",
|
||||
"Unassociated shell command", "Unexpected end of line seen", etc.
|
||||
|
||||
Your make program isn't compatible with the Makefile for Anope. The
|
||||
Makefile was designed to work with GNU make, and as such may not work on
|
||||
other systems' "make" programs. If you get an error from "make", obtain
|
||||
GNU make from ftp://prep.ai.mit.edu/pub/gnu/make/ (or wherever you prefer) and
|
||||
use it instead of your system's default "make". Note that GNU make may
|
||||
already be installed on your system; try using the command "gmake" instead
|
||||
of "make".
|
||||
|
||||
The make programs bundled with SunOS/Solaris and FreeBSD have been reported
|
||||
not to work; you will need to use GNU make on these systems.
|
||||
|
||||
2.2) I get an error like "Makefile.inc not found".
|
||||
|
||||
You forgot to run the Config script first. See the INSTALL file for
|
||||
compilation instructions.
|
||||
|
||||
2.3) I typed "./services" at the command line, but nothing happened!
|
||||
|
||||
Anope puts itself in the background when it starts, so you get your shell
|
||||
prompt right back. Meanwhile, Anope will continue setting up, then connect
|
||||
to the IRC server specified in services.conf (or on the command line). If
|
||||
it doesn't connect, you probably specified the wrong IRCd or RemoteServer in
|
||||
the configuration file. Check to make sure that you are actually running one of
|
||||
the supported IRCds, also. A list of supported IRCds can be found in the README
|
||||
file.
|
||||
|
||||
You can also check the log file (services.log by default) for error
|
||||
messages. Starting services with the -support command line option
|
||||
will prevent it from running in the background will output the
|
||||
messages written to the log file to the console as well. Please note that this
|
||||
will also prevent 3rd party modules from loading and will put Anope into
|
||||
debug mode.
|
||||
|
||||
2.4) Whenever I start Anope, I get a message on my IRC server saying
|
||||
"connection refused" or something similar, and Anope gives an error
|
||||
message from the server saying "Closing Link: ...".
|
||||
|
||||
See section 3 of the INSTALL file.
|
||||
|
||||
2.5) My IRC server is giving me messages like "Connection to
|
||||
services.whatever.net[127.0.0.1] activated" and then "Access denied -- no
|
||||
N line". Why?
|
||||
|
||||
This is typically caused by including a port number in the C:line for
|
||||
services, which tells your server to try to autoconnect to it (depending on
|
||||
the class (Y:line) settings). This is not what you want, because Anope
|
||||
will connect to the server itself, but does not listen for servers to
|
||||
connect to it. The solution is to remove the port number from the C:line.
|
||||
|
||||
2.6) When I say "/connect services.*", it doesn't work!
|
||||
|
||||
You cannot /connect services. When you start Anope, it will attempt to
|
||||
connect to the server you specified in services.conf. Please see the answer
|
||||
above for more information.
|
||||
|
||||
2.7) Anope starts up okay, but if I try to register a nickname, it comes back
|
||||
with "Sorry, registration failed."
|
||||
|
||||
Make sure you've selected the correct IRC server type in the configure
|
||||
script; see section 3 of the INSTALL file for details.
|
||||
|
||||
2.8) Anope reports (via /stats u or /msg OperServ STATS) a different number of
|
||||
users online than I get from doing /lusers.
|
||||
|
||||
Anope doesn't count its own pseudo-clients (NickServ, ChanServ, etc.) in
|
||||
its user count, while the IRC server does.
|
||||
|
||||
3) BotServ
|
||||
|
||||
3.1) How do I add bots to BotServ?
|
||||
|
||||
Read /msg BotServ HELP and /msg BotServ HELP BOT. Note that you need to be
|
||||
opered up and identified as a Services Administrator in Anope before you
|
||||
can use the BOT command.
|
||||
|
||||
3.2) Why do kick triggers and fantasy commands fail to work with my Bahamut
|
||||
IRCd?
|
||||
|
||||
Bahamut allows you to setup a server as 'serviceshub'. This will filter
|
||||
certain data that services usually don't need to process. This option also
|
||||
filters channel messages, because DALnet's services have no use for them.
|
||||
Anope parses the channel messages for kick triggers and fantasy commands.
|
||||
To make sure these work the server type of the hub they're linked to should
|
||||
be simply 'hub' and not 'serviceshub'.
|
||||
|
||||
|
||||
4) ChanServ
|
||||
|
||||
4.1) Anope's channel mode setting doesn't work. I can't set modes with
|
||||
OperServ, and every time ChanServ tries to set a mode, my server reverses
|
||||
the change.
|
||||
|
||||
Make sure EVERY server on your network has a U: line for Services in
|
||||
ircd.conf, for example:
|
||||
|
||||
U:services.whatever.net:*:*
|
||||
|
||||
4.2) Anope ignored the SET SUCCESSOR setting and deleted a channel when the
|
||||
founder expired.
|
||||
|
||||
Normally, this is because the successor had too many channels registered.
|
||||
In this case, you will see an entry in the log file like the following:
|
||||
|
||||
[date] Successor (SuccessorNick) of channel #somechannel owns too many
|
||||
channels, deleting channel #somechannel
|
||||
|
||||
If you don't get a message like this or you can verify that the successor
|
||||
wasn't running into the channel limit, please report it using the
|
||||
bug-reporting procedure in section 6 of the README file.
|
||||
|
||||
4.3) How to auto voice all those whom join my #channel?
|
||||
|
||||
Execute the following commands (/cs is an alias for /msg ChanServ):
|
||||
|
||||
/cs set #channel secure off
|
||||
/cs set #channel xop off
|
||||
/cs levels #channel set AUTOVOICE -1
|
||||
|
||||
4.4) Channel options like RESTRICTED or SECUREOPS don't work. What's wrong?
|
||||
|
||||
Make sure that you didn't put any of your normal IRCd's as a ULined server
|
||||
in Anope. Some access checks for clients from ULined servers are skipped to
|
||||
avoid fights between the ULined servers. This is usually only useful when
|
||||
you have a statistics server connected to your network.
|
||||
|
||||
5) OperServ
|
||||
|
||||
5.1) Using the OperServ JUPE command results in server messages like "Server
|
||||
juped.server introduced by non-hub server services.my.net".
|
||||
|
||||
Services' uplink must have an H: line for Services in the ircd.conf file,
|
||||
which looks something like:
|
||||
|
||||
H:*::services.whatever.net
|
||||
|
||||
5.2) When I add an AKILL, the users matching it don't get killed.
|
||||
|
||||
Use the AkillOnAdd configuration directive.
|
||||
|
||||
5.3) Trying to use OperServ gives me "Access denied".
|
||||
|
||||
Check that you're opered on your IRCd (ie, moded +o)
|
||||
Check that you're identified to a nickname listed within an opertype allowed to do the command you're trying.
|
||||
Check whether you can use /msg operserv staff
|
||||
|
||||
5.4) I can't get /OS UMODES and /OS SVSNICK to work!
|
||||
|
||||
You need to be a SuperAdmin to be able to use these commands.
|
||||
|
||||
5.5) What is a Super-Admin? How does it work? Why might it not work?
|
||||
|
||||
SuperAdmin's have extra privileges, including being founder on all
|
||||
channels. It must be activated on a per user basis and is only available to
|
||||
Services Roots. It is set using OperServ and is not persistent. It only
|
||||
works if SuperAdmin is not commented in the services configuration file,
|
||||
which is commented out by default. Read /msg OperServ HELP SET SUPERADMIN
|
||||
for further help.
|
||||
+21
-83
@@ -18,56 +18,23 @@ Anope for Windows
|
||||
1) Download the required files:
|
||||
|
||||
* Current Anope source:
|
||||
http://sourceforge.net/project/showfiles.php?group_id=94081
|
||||
https://github.com/anope/anope/releases
|
||||
|
||||
* CMake:
|
||||
http://www.cmake.org/cmake/resources/software.html
|
||||
https://cmake.org/download/
|
||||
|
||||
(NOTE: When installing, tell CMake to add itself to the PATH.)
|
||||
|
||||
If you have Visual C++ 6, 7 (.NET 2002/2003), 8 (2005), or 9 (2008) skip ahead to step 2, else you
|
||||
need to download the following free components from Microsoft. Once
|
||||
downloaded, install these packages.
|
||||
If you have Visual C++ 10 or 11 (2010/2012) skip ahead to step 2, else you
|
||||
need to download and install the following free component from Microsoft.
|
||||
|
||||
* Microsoft Visual C++ 2008 Express Edition:
|
||||
http://www.microsoft.com/express/vc/
|
||||
|
||||
or
|
||||
|
||||
* Microsoft Visual C++ 2005 Express Edition:
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=7B0B0339-613A-46E6-AB4D-080D4D4A8C4E&displaylang=en
|
||||
|
||||
then download and install:
|
||||
|
||||
* Microsoft Windows 2008 SDK:
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en
|
||||
|
||||
or (if you prefer a smaller download)
|
||||
|
||||
* Microsoft Windows 2003 Platform SDK: (Requires WGA validation)
|
||||
http://www.microsoft.com/downloads/details.aspx?FamilyId=0BAF2B35-C656-4969-ACE8-E4C0C0716ADB&displaylang=en
|
||||
|
||||
(NOTE: Although they say for Windows Server 2003 or 2008, they do infact work on all supported
|
||||
versions of Windows. When installing the 2003 SDK, you should select the Custom option, and only select
|
||||
to have the Microsoft Windows Core SDK installed. When installing the 2008 SDK, you should select the
|
||||
Custom option, and only select to have the Developer Tools installed, but also expand that and deselect
|
||||
the Visual C++ Compilers as well as the Mobile Tools. Doing this will decrease the install time as well
|
||||
as the space used by the SDK.)
|
||||
|
||||
If you chose to download the 2003 SDK, it will not work out-of-the-box on either Visual C++ 2005 Express or
|
||||
Visual C++ 2008 Express. The 2008 SDK will work out-of-the-box with Visual C++ 2008 Express but not with
|
||||
Visual C++ 2005 Express.
|
||||
* Microsoft Visual C++ 2010 Express Edition:
|
||||
http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express
|
||||
|
||||
2) Unpack the Anope tarball with your favorite uncompression program
|
||||
(WinZip or WinRAR, etc).
|
||||
|
||||
3) (Note before this step: If you fall under one of the situations at the end of Step 1 where it says that the
|
||||
SDK will not work out of the box, do not bring up the Visual C++ Command Prompt by using the link in
|
||||
the Windows Start Menu. Instead, edit vsvars32.bat in the directory where you unpacked the source code
|
||||
in step 2, so the first line that says "@SET VSINSTALLDIR=<whatever>" has the directory where you installed
|
||||
Visual C++ Express to, if different from the default. Save the file and then run it instead.)
|
||||
|
||||
Bring up the Visual C++ Command Prompt; This will launch a
|
||||
3) Bring up the Visual C++ Command Prompt; This will launch a
|
||||
DOS Command Prompt like window, which will set the environment
|
||||
properties needed to make Anope.
|
||||
|
||||
@@ -84,7 +51,7 @@ Anope for Windows
|
||||
|
||||
4) You now need to configure Anope to your requirements. At the prompt type:
|
||||
|
||||
<path to source directory>\Config.bat
|
||||
<path to source directory>\Config.exe
|
||||
|
||||
NOTE: If you run an Anti-Virus program such as McAfee or Norton, you may
|
||||
be unable to run this command due to the protection in place. Some Anti-
|
||||
@@ -103,6 +70,14 @@ Anope for Windows
|
||||
If you cannot find whats causing the error, please visit our forums or
|
||||
our IRC Support channel for assistance.
|
||||
|
||||
Some Anope modules require third party libraries, such as mysql and
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
@@ -128,7 +103,7 @@ Anope for Windows
|
||||
INSTALL within the Solution Explorer. Right-click on INSTALL and choose Build.
|
||||
|
||||
When you have done this, all the files will be installed to where they belong.
|
||||
The only thing you need to do is rename "data/example.conf" to be "data/services.conf",
|
||||
The only thing you need to do is rename "data/anope.example.conf" to be "data/anope.conf",
|
||||
and then follow the steps to set up Anope.
|
||||
|
||||
You have now completed the building phase of Anope for Windows. You can
|
||||
@@ -145,23 +120,11 @@ Anope for Windows
|
||||
Notepad will cause strange characters to appear, and you may not be able to
|
||||
edit the file correctly.
|
||||
|
||||
Open services.conf, and read through it carefully and adjust the settings
|
||||
you think you need to adjust. Pay special attention to these settings:
|
||||
|
||||
A) IRCDModule: This is the name of an IRCd Module that Anope will use
|
||||
to communicate with your server. Anope supports 15 IRCds,
|
||||
so ensure you set the right value here.
|
||||
B) RemoteServer: This is the address to your ircd, along with the port
|
||||
and password. You should consult your ircd
|
||||
documentation on how to link ircds.
|
||||
C) ServicesRoot: Remove the # and change the names to your nick so you
|
||||
can take control of services once they are online.
|
||||
D) UserKey1/2/3: Remove the # infront of the three UserKey settings, and
|
||||
change the parameters to numbers; around 6-7 digits will
|
||||
do.
|
||||
Open anope.conf, and read through it carefully and adjust the settings
|
||||
you think you need to adjust.
|
||||
|
||||
If you are unsure of the settings, you can go to the dos command prompt
|
||||
and run "anope.exe -nofork -debug" and watch the information as it
|
||||
and run "anope.exe --nofork --debug" and watch the information as it
|
||||
attempts to connect.
|
||||
|
||||
You can launch services in two ways. If you are sure that the entered
|
||||
@@ -174,31 +137,7 @@ Anope for Windows
|
||||
3) Compiling Modules
|
||||
|
||||
If you want to build other modules than the ones shipped by default, you
|
||||
will need to modify the Makefile.inc.win32 file, in the src\modules folder.
|
||||
|
||||
A) Add modules; find the line stating "SRCS=" and add the name of the
|
||||
file to the end of the line. So if you have two files:
|
||||
|
||||
SRCS=file.c file2.c
|
||||
|
||||
If you are compiling a folder of module components, such as the example
|
||||
"catserv", you will need to add/change the "SUBS=" line. If you were
|
||||
compiling the "catserv" example, the line would look like this:
|
||||
|
||||
SUBS=catserv
|
||||
|
||||
B) When you've done this, use the same command prompt you set up in part
|
||||
1, change directories to the src\modules folder, and type:
|
||||
|
||||
nmake -f Makefile.win32
|
||||
|
||||
followed afterwards, by:
|
||||
|
||||
nmake -f Makefile.win32 install
|
||||
|
||||
C) You should now be able to load your modules on IRC via OperServ, or via
|
||||
the services.conf file.
|
||||
|
||||
will need to rerun Config.exe
|
||||
|
||||
4) Other compile options
|
||||
|
||||
@@ -220,4 +159,3 @@ Anope for Windows
|
||||
Anope's Windows Installer was made using:
|
||||
|
||||
* NSIS 2.20 <http://nsis.sourceforge.net>
|
||||
|
||||
|
||||
@@ -0,0 +1,168 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
#
|
||||
# Script taken from InspIRCd, https://www.inspircd.org/
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
|
||||
BEGIN { require 5.8.0; }
|
||||
|
||||
use strict;
|
||||
use warnings FATAL => qw(all);
|
||||
|
||||
use File::Copy ();
|
||||
use Cwd;
|
||||
|
||||
sub list_extras ();
|
||||
sub enable_extras (@);
|
||||
sub disable_extras (@);
|
||||
|
||||
# Routine to list out the extra/ modules that have been enabled.
|
||||
# Note: when getting any filenames out and comparing, it's important to lc it if the
|
||||
# file system is not case-sensitive (== Epoc, MacOS, OS/2 (incl DOS/DJGPP), VMS, Win32
|
||||
# (incl NetWare, Symbian)). Cygwin may or may not be case-sensitive, depending on
|
||||
# configuration, however, File::Spec does not currently tell us (it assumes Unix behavior).
|
||||
sub list_extras () {
|
||||
use File::Spec;
|
||||
# @_ not used
|
||||
my $srcdir = File::Spec->catdir("modules");
|
||||
my $abs_srcdir = File::Spec->rel2abs($srcdir);
|
||||
local $_;
|
||||
my $dd;
|
||||
opendir $dd, File::Spec->catdir($abs_srcdir, "extra") or die (File::Spec->catdir($abs_srcdir, "extra") . ": $!\n");
|
||||
my @extras = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
|
||||
closedir $dd;
|
||||
undef $dd;
|
||||
opendir $dd, $abs_srcdir or die "$abs_srcdir: $!\n";
|
||||
my @sources = map { File::Spec->case_tolerant() ? lc($_) : $_ } (readdir($dd));
|
||||
closedir $dd;
|
||||
undef $dd;
|
||||
my $maxlen = (sort { $b <=> $a } (map {length($_)} (@extras)))[0];
|
||||
my %extras = ();
|
||||
EXTRA: for my $extra (@extras) {
|
||||
next if (File::Spec->curdir() eq $extra || File::Spec->updir() eq $extra);
|
||||
my $abs_extra = File::Spec->catfile($abs_srcdir, "extra", $extra);
|
||||
my $abs_source = File::Spec->catfile($abs_srcdir, $extra);
|
||||
next unless ($extra =~ m/\.(cpp|h)$/ || (-d $abs_extra)); # C++ Source/Header, or directory
|
||||
if (-l $abs_source) {
|
||||
# Symlink, is it in the right place?
|
||||
my $targ = readlink($abs_source);
|
||||
my $abs_targ = File::Spec->rel2abs($targ, $abs_srcdir);
|
||||
if ($abs_targ eq $abs_extra) {
|
||||
$extras{$extra} = "\e[32;1menabled\e[0m";
|
||||
} else {
|
||||
$extras{$extra} = sprintf("\e[31;1mwrong symlink target (%s)\e[0m", $abs_targ);
|
||||
}
|
||||
} elsif (-e $abs_source) {
|
||||
my ($devext, $inoext) = stat($abs_extra);
|
||||
my ($devsrc, $inosrc, undef, $lnksrc) = stat($abs_source);
|
||||
if ($lnksrc > 1) {
|
||||
if ($devsrc == $devext && $inosrc == $inoext) {
|
||||
$extras{$extra} = "\e[32;1menabled\e[0m";
|
||||
} else {
|
||||
$extras{$extra} = sprintf("\e[31;1mwrong hardlink target (%d:%d)\e[0m", $devsrc, $inosrc);
|
||||
}
|
||||
} else {
|
||||
open my $extfd, "<", $abs_extra;
|
||||
open my $srcfd, "<", $abs_source;
|
||||
local $/ = undef;
|
||||
if (scalar(<$extfd>) eq scalar(<$srcfd>)) {
|
||||
$extras{$extra} = "\e[32;1menabled\e[0m";
|
||||
} else {
|
||||
$extras{$extra} = sprintf("\e[31;1mout of synch (re-copy)\e[0m");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$extras{$extra} = "\e[33;1mdisabled\e[0m";
|
||||
}
|
||||
}
|
||||
|
||||
for my $extra (sort {$a cmp $b} keys(%extras)) {
|
||||
my $text = $extras{$extra};
|
||||
if ($text =~ m/needed by/ && $text !~ m/enabled/) {
|
||||
printf "\e[31;1;5m%-*s = %s%s\e[0m\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? ")" : "");
|
||||
} else {
|
||||
printf "%-*s = %s%s\n", $maxlen, $extra, $text, ($text =~ m/needed by/ ? "\e[0m)" : "");
|
||||
}
|
||||
}
|
||||
return keys(%extras) if wantarray; # Can be used by manage_extras.
|
||||
}
|
||||
|
||||
sub enable_extras (@) {
|
||||
my (@extras) = @_;
|
||||
for my $extra (@extras) {
|
||||
my $extrapath = "modules/extra/$extra";
|
||||
if (!-e $extrapath) {
|
||||
print STDERR "Cannot enable \e[32;1m$extra\e[0m : No such file or directory in modules/extra\n";
|
||||
next;
|
||||
}
|
||||
my $source = "modules/$extra";
|
||||
if (-e $source) {
|
||||
print STDERR "Cannot enable \e[32;1m$extra\e[0m : destination in modules exists (might already be enabled?)\n";
|
||||
next;
|
||||
}
|
||||
print "Enabling $extra ... \n";
|
||||
symlink "extra/$extra", $source or print STDERR "$source: Cannot link to 'extra/$extra': $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
sub disable_extras (@)
|
||||
{
|
||||
opendir my $dd, "modules/extra/";
|
||||
my @files = readdir($dd);
|
||||
closedir $dd;
|
||||
my (@extras) = @_;
|
||||
EXTRA: for my $extra (@extras) {
|
||||
my $extrapath = "modules/extra/$extra";
|
||||
my $source = "modules/$extra";
|
||||
if (!-e $extrapath) {
|
||||
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Is not an extra\n";
|
||||
next;
|
||||
}
|
||||
if ((! -l $source) || readlink($source) ne "extra/$extra") {
|
||||
print STDERR "Cannot disable \e[32;1m$extra\e[0m : Source is not a link or doesn't refer to the right file. Remove manually if this is in error.\n";
|
||||
next;
|
||||
}
|
||||
# Now remove.
|
||||
print "Disabling $extra ... \n";
|
||||
unlink "modules/$extra" or print STDERR "Cannot disable \e[32;1m$extra\e[0m : $!\n";
|
||||
}
|
||||
}
|
||||
|
||||
my $clearscreen = `clear`;
|
||||
print $clearscreen;
|
||||
while (1)
|
||||
{
|
||||
list_extras; # print the module list
|
||||
print "\nPlease enter the name of the module or type 'q' to quit.: ";
|
||||
my $input = <STDIN>;
|
||||
chop($input); # remove the trailing \n from the user input
|
||||
|
||||
if ($input eq "q") {
|
||||
if (-e "build/CMakeFiles") {
|
||||
system("cmake", "build/.");
|
||||
print "\nNow cd build, then run make to build Anope.\n\n";
|
||||
} else {
|
||||
print "\nBuild directory not found. You should run ./Config now.\n\n"
|
||||
}
|
||||
exit 0;
|
||||
}
|
||||
print $clearscreen;
|
||||
if ($input eq "") {
|
||||
next;
|
||||
}
|
||||
|
||||
if (-e "modules/$input") {
|
||||
disable_extras($input)
|
||||
} else {
|
||||
enable_extras($input)
|
||||
}
|
||||
}
|
||||
+20
-28
@@ -1,30 +1,22 @@
|
||||
# If we are building for Visual Studio OR if the system we are on doesn't have sh (which would be odd on a *nix system...), we'll build a C++ program to create version.h
|
||||
if(MSVC OR NOT SH)
|
||||
# Set version.sh.c to use C++ as well as set it's compile flags
|
||||
set_source_files_properties(version.sh.c PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
# Generate version_sh executable to create version.h from the contents of version.sh, setting it's linker flags as well
|
||||
add_executable(version_sh version.sh.c)
|
||||
set_target_properties(version_sh PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
|
||||
# Generate version.h from the above executable and the version.log file from the main source directory, with dependencies to the given headers and all source files in the main Anope build
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
COMMAND version_sh ${Anope_SOURCE_DIR}/version.log ${CMAKE_CURRENT_SOURCE_DIR}/version.sh ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS version_sh ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${CMAKE_CURRENT_SOURCE_DIR}/pseudo.h ${CMAKE_CURRENT_SOURCE_DIR}/messages.h ${SRC_SRCS}
|
||||
)
|
||||
# Add version_sh to list of files for CPack to ignore
|
||||
get_target_property(version_sh_BINARY version_sh LOCATION)
|
||||
get_filename_component(version_sh_BINARY ${version_sh_BINARY} NAME)
|
||||
add_to_cpack_ignored_files("${version_sh_BINARY}$" TRUE)
|
||||
# For any non-Visual Studio platforms that do have sh, we will run version.h through the version.h shell script
|
||||
else(MSVC OR NOT SH)
|
||||
# Generate version.h from version.sh and the version.log file from the main source directory, with dependencies to the given headers and all source files in the main Anope build
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
COMMAND ${SH} ${CMAKE_CURRENT_SOURCE_DIR}/version.sh ${Anope_SOURCE_DIR}/version.log ${CMAKE_CURRENT_BINARY_DIR}/version.h
|
||||
MAIN_DEPENDENCY ${CMAKE_CURRENT_SOURCE_DIR}/version.sh DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/services.h ${CMAKE_CURRENT_SOURCE_DIR}/pseudo.h ${CMAKE_CURRENT_SOURCE_DIR}/messages.h ${SRC_SRCS}
|
||||
)
|
||||
endif(MSVC OR NOT SH)
|
||||
|
||||
# Add version.h to the list of files for CPack to ignore
|
||||
add_to_cpack_ignored_files("version.h$" TRUE)
|
||||
# Set version.cpp to use C++ as well as set its compile flags
|
||||
set_source_files_properties(version.cpp PROPERTIES LANGUAGE CXX COMPILE_FLAGS "${CXXFLAGS}")
|
||||
# Generate version-bin executable to modify version.h, setting it's linker flags as well
|
||||
add_executable(version-bin version.cpp)
|
||||
set_target_properties(version-bin PROPERTIES LINKER_LANGUAGE CXX LINK_FLAGS "${LDFLAGS}")
|
||||
set(version_BINARY "$<TARGET_FILE:version-bin>")
|
||||
# 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.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
|
||||
COMMAND version-bin ${Anope_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h
|
||||
DEPENDS version-bin ${SRC_SRCS}
|
||||
)
|
||||
# Add version-bin to list of files for CPack to ignore
|
||||
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()
|
||||
|
||||
# Add a custom target to the above file
|
||||
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h)
|
||||
add_custom_target(headers DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h ${CMAKE_CURRENT_BINARY_DIR}/build.h)
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
all: services.h extern.h pseudo.h version.h
|
||||
|
||||
version.h: Makefile version.sh services.h pseudo.h messages.h $(SRCS)
|
||||
sh version.sh ../version.log $@
|
||||
|
||||
services.h: sysconf.h config.h extern.h
|
||||
touch $@
|
||||
|
||||
extern.h: slist.h
|
||||
touch $@
|
||||
|
||||
pseudo.h: commands.h timers.h slist.h
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
(rm -f language.h)
|
||||
|
||||
distclean: clean
|
||||
(rm -f sysconf.h version.h)
|
||||
@@ -0,0 +1,181 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "services.h"
|
||||
#include "anope.h"
|
||||
#include "serialize.h"
|
||||
#include "service.h"
|
||||
|
||||
enum
|
||||
{
|
||||
ACCESS_INVALID = -10000,
|
||||
ACCESS_FOUNDER = 10001
|
||||
};
|
||||
|
||||
/* A privilege, probably configured using a privilege{} block. Most
|
||||
* commands require specific privileges to be executed. The AccessProvider
|
||||
* backing each ChanAccess determines whether that ChanAccess has a given
|
||||
* privilege.
|
||||
*/
|
||||
struct CoreExport Privilege final
|
||||
{
|
||||
Anope::string name;
|
||||
Anope::string desc;
|
||||
/* Rank relative to other privileges */
|
||||
int rank;
|
||||
|
||||
Privilege(const Anope::string &name, const Anope::string &desc, int rank);
|
||||
bool operator==(const Privilege &other) const;
|
||||
};
|
||||
|
||||
class CoreExport PrivilegeManager final
|
||||
{
|
||||
static std::vector<Privilege> Privileges;
|
||||
public:
|
||||
static void AddPrivilege(Privilege p);
|
||||
static void RemovePrivilege(Privilege &p);
|
||||
static Privilege *FindPrivilege(const Anope::string &name);
|
||||
static std::vector<Privilege> &GetPrivileges();
|
||||
static void ClearPrivileges();
|
||||
};
|
||||
|
||||
/* A provider of access. Only used for creating ChanAccesses, as
|
||||
* they contain pure virtual functions.
|
||||
*/
|
||||
class CoreExport AccessProvider
|
||||
: public Service
|
||||
{
|
||||
public:
|
||||
AccessProvider(Module *owner, const Anope::string &name);
|
||||
virtual ~AccessProvider();
|
||||
|
||||
/** Creates a new ChanAccess entry using this provider.
|
||||
* @return The new entry
|
||||
*/
|
||||
virtual ChanAccess *Create() = 0;
|
||||
|
||||
private:
|
||||
static std::list<AccessProvider *> Providers;
|
||||
public:
|
||||
static const std::list<AccessProvider *>& GetProviders();
|
||||
};
|
||||
|
||||
/* Represents one entry of an access list on a channel. */
|
||||
class CoreExport ChanAccess
|
||||
: public Serializable
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(const Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
private:
|
||||
Anope::string mask;
|
||||
/* account this access entry is for, if any */
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
public:
|
||||
typedef std::vector<ChanAccess *> Path;
|
||||
|
||||
/* The provider that created this access entry */
|
||||
AccessProvider *provider;
|
||||
/* Channel this access entry is on */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
Anope::string creator;
|
||||
Anope::string description;
|
||||
time_t last_seen;
|
||||
time_t created;
|
||||
|
||||
ChanAccess(AccessProvider *p);
|
||||
virtual ~ChanAccess();
|
||||
|
||||
void SetMask(const Anope::string &mask, ChannelInfo *ci);
|
||||
const Anope::string &Mask() const;
|
||||
NickCore *GetAccount() const;
|
||||
|
||||
static const unsigned int MAX_DEPTH = 4;
|
||||
|
||||
/** Check if this access entry matches the given user or account
|
||||
* @param u The user
|
||||
* @param nc The account
|
||||
* @param next Next channel to check if any
|
||||
*/
|
||||
virtual bool Matches(const User *u, const NickCore *nc, ChannelInfo *&next) const;
|
||||
|
||||
/** Check if this access entry has the given privilege.
|
||||
* @param name The privilege name
|
||||
*/
|
||||
virtual bool HasPriv(const Anope::string &name) const = 0;
|
||||
|
||||
/** Serialize the access given by this access entry into a human
|
||||
* readable form. chanserv/access will return a number, chanserv/xop
|
||||
* will be AOP, SOP, etc.
|
||||
*/
|
||||
virtual Anope::string AccessSerialize() const = 0;
|
||||
|
||||
/** Unserialize this access entry from the given data. This data
|
||||
* will be fetched from AccessSerialize.
|
||||
*/
|
||||
virtual void AccessUnserialize(const Anope::string &data) = 0;
|
||||
|
||||
/* Comparison operators to other Access entries */
|
||||
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;
|
||||
};
|
||||
|
||||
/* A group of access entries. This is used commonly, for example with ChannelInfo::AccessFor,
|
||||
* to show what access a user has on a channel because users can match multiple access entries.
|
||||
*/
|
||||
class CoreExport AccessGroup final
|
||||
{
|
||||
public:
|
||||
/* access entries + paths */
|
||||
std::vector<ChanAccess::Path> paths;
|
||||
/* Channel these access entries are on */
|
||||
const ChannelInfo *ci;
|
||||
/* Account these entries affect, if any */
|
||||
const NickCore *nc;
|
||||
/* super_admin always gets all privs. founder is a special case where ci->founder == nc */
|
||||
bool super_admin, founder;
|
||||
|
||||
AccessGroup();
|
||||
|
||||
/** Check if this access group has a certain privilege. Eg, it
|
||||
* will check every ChanAccess entry of this group for any that
|
||||
* has the given privilege.
|
||||
* @param priv The privilege
|
||||
* @return true if any entry has the given privilege
|
||||
*/
|
||||
bool HasPriv(const Anope::string &priv) const;
|
||||
|
||||
/** Get the "highest" access entry from this group of entries.
|
||||
* The highest entry is determined by the entry that has the privilege
|
||||
* with the highest rank (see Privilege::rank).
|
||||
* @return The "highest" entry
|
||||
*/
|
||||
const ChanAccess *Highest() const;
|
||||
|
||||
/* Comparison operators to other AccessGroups */
|
||||
bool operator>(const AccessGroup &other) const;
|
||||
bool operator<(const AccessGroup &other) const;
|
||||
bool operator>=(const AccessGroup &other) const;
|
||||
bool operator<=(const AccessGroup &other) const;
|
||||
|
||||
inline bool empty() const { return paths.empty(); }
|
||||
};
|
||||
+227
-181
@@ -1,218 +1,264 @@
|
||||
|
||||
/* NickServ nickname structures. */
|
||||
|
||||
/** Flags set on NickAliases
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
enum NickNameFlag
|
||||
{
|
||||
NS_BEGIN,
|
||||
|
||||
/* Nick may not be registered or used */
|
||||
NS_FORBIDDEN,
|
||||
/* Nick never expires */
|
||||
NS_NO_EXPIRE,
|
||||
/* This nick is being held after a kill by an enforcer client
|
||||
* or is being SVSHeld. Used by ns_release to determin if something
|
||||
* should be allowed to be released
|
||||
*/
|
||||
NS_HELD,
|
||||
/* We are taking over this nick, either by SVSNICK or KILL.
|
||||
* We are waiting for the confirmation of either of these actions to
|
||||
* proceed. This is checked in NickAlias::OnCancel
|
||||
*/
|
||||
NS_COLLIDED,
|
||||
#pragma once
|
||||
|
||||
NS_END
|
||||
};
|
||||
#include "extensible.h"
|
||||
#include "serialize.h"
|
||||
#include "anope.h"
|
||||
#include "memo.h"
|
||||
#include "base.h"
|
||||
|
||||
/** Flags set on NickCores
|
||||
typedef Anope::unordered_map<NickAlias *> nickalias_map;
|
||||
typedef Anope::unordered_map<NickCore *> nickcore_map;
|
||||
typedef std::unordered_map<uint64_t, NickCore *> nickcoreid_map;
|
||||
|
||||
extern CoreExport Serialize::Checker<nickalias_map> NickAliasList;
|
||||
extern CoreExport Serialize::Checker<nickcore_map> NickCoreList;
|
||||
extern CoreExport Serialize::Checker<nickcoreid_map> NickCoreIdList;
|
||||
|
||||
/* A registered nickname.
|
||||
* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*/
|
||||
enum NickCoreFlag
|
||||
class CoreExport NickAlias final
|
||||
: public Serializable
|
||||
, public Extensible
|
||||
{
|
||||
NI_BEGIN,
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(const Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
/* Kill others who take this nick */
|
||||
NI_KILLPROTECT,
|
||||
/* Dont recognize unless IDENTIFIED */
|
||||
NI_SECURE,
|
||||
/* Use PRIVMSG instead of NOTICE */
|
||||
NI_MSG,
|
||||
/* Don't allow user to change memo limit */
|
||||
NI_MEMO_HARDMAX,
|
||||
/* Notify of memos at signon and un-away */
|
||||
NI_MEMO_SIGNON,
|
||||
/* Notify of new memos when sent */
|
||||
NI_MEMO_RECEIVE,
|
||||
/* Don't show in LIST to non-servadmins */
|
||||
NI_PRIVATE,
|
||||
/* Don't show email in INFO */
|
||||
NI_HIDE_EMAIL,
|
||||
/* Don't show last seen address in INFO */
|
||||
NI_HIDE_MASK,
|
||||
/* Don't show last quit message in INFO */
|
||||
NI_HIDE_QUIT,
|
||||
/* Kill in 20 seconds instead of in 60 */
|
||||
NI_KILL_QUICK,
|
||||
/* Kill immediatly */
|
||||
NI_KILL_IMMED,
|
||||
/* User gets email on memo */
|
||||
NI_MEMO_MAIL,
|
||||
/* Don't show services access status */
|
||||
NI_HIDE_STATUS,
|
||||
/* Nickname is suspended */
|
||||
NI_SUSPENDED,
|
||||
/* Autoop nickname in channels */
|
||||
NI_AUTOOP,
|
||||
/* This nickcore is forbidden, which means the nickalias for it is aswell */
|
||||
NI_FORBIDDEN,
|
||||
private:
|
||||
Anope::string vhost_ident, vhost_host, vhost_creator;
|
||||
time_t vhost_created = 0;
|
||||
|
||||
NI_END
|
||||
};
|
||||
public:
|
||||
Anope::string nick;
|
||||
Anope::string last_quit;
|
||||
Anope::string last_realname;
|
||||
/* Last usermask this nick was seen on, eg user@host */
|
||||
Anope::string last_usermask;
|
||||
/* Last uncloaked usermask, requires nickserv/auspex to see */
|
||||
Anope::string last_realhost;
|
||||
time_t registered = Anope::CurTime;
|
||||
time_t last_seen = Anope::CurTime;
|
||||
|
||||
/** XXX: this really needs to die with fire and be merged with metadata into NickCore or something.
|
||||
*/
|
||||
class CoreExport NickRequest
|
||||
{
|
||||
public:
|
||||
NickRequest(const std::string &nickname);
|
||||
/* Account this nick is tied to. Multiple nicks can be tied to a single account. */
|
||||
Serialize::Reference<NickCore> nc;
|
||||
|
||||
~NickRequest();
|
||||
|
||||
NickRequest *next, *prev;
|
||||
char *nick;
|
||||
std::string passcode;
|
||||
std::string password;
|
||||
char *email;
|
||||
time_t requested;
|
||||
time_t lastmail; /* Unsaved */
|
||||
};
|
||||
|
||||
class NickCore;
|
||||
|
||||
class CoreExport NickAlias : public Extensible, public Flags<NickNameFlag>
|
||||
{
|
||||
public:
|
||||
/** Default constructor
|
||||
/** Constructor
|
||||
* @param nickname The nick
|
||||
* @param nickcore The nickcofe for this nick
|
||||
*/
|
||||
NickAlias(const std::string &nickname, NickCore *nickcore);
|
||||
|
||||
/** Default destructor
|
||||
* @param nickcore The nickcore for this nick
|
||||
*/
|
||||
NickAlias(const Anope::string &nickname, NickCore *nickcore);
|
||||
~NickAlias();
|
||||
|
||||
NickAlias *next, *prev;
|
||||
char *nick; /* Nickname */
|
||||
char *last_quit; /* Last quit message */
|
||||
char *last_realname; /* Last realname */
|
||||
char *last_usermask; /* Last usermask */
|
||||
time_t time_registered; /* When the nick was registered */
|
||||
time_t last_seen; /* When it was seen online for the last time */
|
||||
NickCore *nc; /* I'm an alias of this */
|
||||
HostInfo hostinfo;
|
||||
|
||||
/** Release a nick
|
||||
* See the comment in users.cpp
|
||||
/** Set a vhost for the user
|
||||
* @param ident The ident
|
||||
* @param host The host
|
||||
* @param creator Who created the vhost
|
||||
* @param time When the vhost was created
|
||||
*/
|
||||
void Release();
|
||||
void SetVHost(const Anope::string &ident, const Anope::string &host, const Anope::string &creator, time_t created = Anope::CurTime);
|
||||
|
||||
/** This function is called when a user on this nick either disconnects or changes nick.
|
||||
* Note that the user isnt necessarially identified to this nick
|
||||
* See the comment in users.cpp
|
||||
* @param u The user
|
||||
/** Remove a users vhost
|
||||
**/
|
||||
void RemoveVHost();
|
||||
|
||||
/** Check if the user has a vhost
|
||||
* @return true or false
|
||||
*/
|
||||
void OnCancel(User *u);
|
||||
bool HasVHost() const;
|
||||
|
||||
/** Retrieve the vhost ident
|
||||
* @return the ident
|
||||
*/
|
||||
const Anope::string &GetVHostIdent() const;
|
||||
|
||||
/** Retrieve the vhost host
|
||||
* @return the host
|
||||
*/
|
||||
const Anope::string &GetVHostHost() const;
|
||||
|
||||
/** Retrieve the vhost mask
|
||||
* @param the mask
|
||||
*/
|
||||
Anope::string GetVHostMask() const;
|
||||
|
||||
/** Retrieve the vhost creator
|
||||
* @return the creator
|
||||
*/
|
||||
const Anope::string &GetVHostCreator() const;
|
||||
|
||||
/** Retrieve when the vhost was created
|
||||
* @return the time it was created
|
||||
*/
|
||||
time_t GetVHostCreated() const;
|
||||
|
||||
/** Finds a registered nick
|
||||
* @param nick The nick to lookup
|
||||
* @return the nick, if found
|
||||
*/
|
||||
static NickAlias *Find(const Anope::string &nick);
|
||||
static NickAlias *FindId(uint64_t id);
|
||||
};
|
||||
|
||||
class CoreExport NickCore : public Extensible, public Flags<NickCoreFlag>
|
||||
/* A registered account. Each account must have a NickAlias with the same nick as the
|
||||
* account's display.
|
||||
* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
*/
|
||||
class CoreExport NickCore final
|
||||
: public Serializable
|
||||
, public Extensible
|
||||
{
|
||||
public:
|
||||
/** Default constructor
|
||||
* @param display The display nick
|
||||
*/
|
||||
NickCore(const std::string &nickdisplay);
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(const Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
/** Default destructor
|
||||
*/
|
||||
~NickCore();
|
||||
|
||||
NickCore *next, *prev;
|
||||
|
||||
std::list<User *> Users;
|
||||
|
||||
char *display; /* How the nick is displayed */
|
||||
std::string pass; /* Password of the nicks */
|
||||
char *email; /* E-mail associated to the nick */
|
||||
char *greet; /* Greet associated to the nick */
|
||||
uint32 icq; /* ICQ # associated to the nick */
|
||||
char *url; /* URL associated to the nick */
|
||||
uint16 language; /* Language selected by nickname owner (LANG_*) */
|
||||
std::vector<std::string> access; /* Access list, vector of strings */
|
||||
private:
|
||||
/* Channels which reference this core in some way (this is on their access list, akick list, is founder, successor, etc) */
|
||||
Serialize::Checker<std::map<ChannelInfo *, int> > chanaccess;
|
||||
/* Unique identifier for the account. */
|
||||
uint64_t id;
|
||||
public:
|
||||
/* Name of the account. Find(display)->nc == this. */
|
||||
Anope::string display;
|
||||
/* User password in form of hashm:data */
|
||||
Anope::string pass;
|
||||
Anope::string email;
|
||||
/* Locale name of the language of the user. Empty means default language */
|
||||
Anope::string language;
|
||||
/* Last time an email was sent to this user */
|
||||
time_t lastmail = 0;
|
||||
/* The time this account was registered */
|
||||
time_t registered = Anope::CurTime;
|
||||
MemoInfo memos;
|
||||
uint16 channelcount; /* Number of channels currently registered */
|
||||
std::map<Anope::string, Anope::string> last_modes;
|
||||
|
||||
OperType *ot;
|
||||
/* Nicknames registered that are grouped to this account.
|
||||
* for n in aliases, n->nc == this.
|
||||
*/
|
||||
Serialize::Checker<std::vector<NickAlias *> > aliases;
|
||||
|
||||
/* Set if this user is a services operator. o->ot must exist. */
|
||||
Oper *o = nullptr;
|
||||
|
||||
/* Unsaved data */
|
||||
time_t lastmail; /* Last time this nick record got a mail */
|
||||
SList aliases; /* List of aliases */
|
||||
|
||||
/** Check whether this opertype has access to run the given command string.
|
||||
* @param cmdstr The string to check, e.g. botserv/set/private.
|
||||
* @return True if this opertype may run the specified command, false otherwise.
|
||||
*/
|
||||
virtual bool HasCommand(const std::string &cmdstr) const;
|
||||
/** The display nick for this account. */
|
||||
NickAlias *na = nullptr;
|
||||
/* Number of channels registered by this account */
|
||||
uint16_t channelcount = 0;
|
||||
/* Users online now logged into this account */
|
||||
std::list<User *> users;
|
||||
|
||||
/** Constructor
|
||||
* @param display The display nick
|
||||
* @param id The account id
|
||||
*/
|
||||
NickCore(const Anope::string &nickdisplay, uint64_t nickid = 0);
|
||||
~NickCore();
|
||||
|
||||
/** Changes the display for this account
|
||||
* @param na The new display, must be grouped to this account.
|
||||
*/
|
||||
void SetDisplay(NickAlias *na);
|
||||
|
||||
/** Checks whether this account is a services oper or not.
|
||||
* @return True if this account is a services oper, false otherwise.
|
||||
*/
|
||||
virtual bool IsServicesOper() const;
|
||||
|
||||
/** Check whether this opertype has access to the given special permission.
|
||||
* @param privstr The priv to check for, e.g. users/auspex.
|
||||
* @return True if this opertype has the specified priv, false otherwise.
|
||||
*/
|
||||
virtual bool HasPriv(const std::string &privstr) const;
|
||||
/** Retrieves the account id for this user */
|
||||
uint64_t GetId();
|
||||
|
||||
/** Add an entry to the nick's access list
|
||||
*
|
||||
* @param entry The nick!ident@host entry to add to the access list
|
||||
*
|
||||
* Adds a new entry into the access list.
|
||||
/** Finds an account
|
||||
* @param nick The account name to find
|
||||
* @return The account, if it exists
|
||||
*/
|
||||
void AddAccess(const std::string &entry);
|
||||
static NickCore *Find(const Anope::string &nick);
|
||||
static NickCore *FindId(uint64_t id);
|
||||
|
||||
/** Get an entry from the nick's access list by index
|
||||
*
|
||||
* @param entry Index in the access list vector to retrieve
|
||||
* @return The access list entry of the given index if within bounds, an empty string if the vector is empty or the index is out of bounds
|
||||
*
|
||||
* Retrieves an entry from the access list corresponding to the given index.
|
||||
*/
|
||||
std::string GetAccess(unsigned entry);
|
||||
|
||||
/** Find an entry in the nick's access list
|
||||
*
|
||||
* @param entry The nick!ident@host entry to search for
|
||||
* @return True if the entry is found in the access list, false otherwise
|
||||
*
|
||||
* Search for an entry within the access list.
|
||||
*/
|
||||
bool FindAccess(const std::string &entry);
|
||||
|
||||
/** Erase an entry from the nick's access list
|
||||
*
|
||||
* @param entry The nick!ident@host entry to remove
|
||||
*
|
||||
* Removes the specified access list entry from the access list.
|
||||
*/
|
||||
void EraseAccess(const std::string &entry);
|
||||
|
||||
/** Clears the entire nick's access list
|
||||
*
|
||||
* Deletes all the memory allocated in the access list vector and then clears the vector.
|
||||
*/
|
||||
void ClearAccess();
|
||||
void AddChannelReference(ChannelInfo *ci);
|
||||
void RemoveChannelReference(ChannelInfo *ci);
|
||||
void GetChannelReferences(std::deque<ChannelInfo *> &queue);
|
||||
};
|
||||
|
||||
/* A request to check if an account/password is valid. These can exist for
|
||||
* extended periods due to the time some authentication modules take.
|
||||
*/
|
||||
class CoreExport IdentifyRequest
|
||||
{
|
||||
/* Owner of this request, used to cleanup requests if a module is unloaded
|
||||
* while a request us pending */
|
||||
Module *owner;
|
||||
Anope::string account;
|
||||
Anope::string password;
|
||||
Anope::string address;
|
||||
|
||||
std::set<Module *> holds;
|
||||
bool dispatched = false;
|
||||
bool success = false;
|
||||
|
||||
static std::set<IdentifyRequest *> Requests;
|
||||
|
||||
protected:
|
||||
IdentifyRequest(Module *o, const Anope::string &acc, const Anope::string &pass, const Anope::string &ip);
|
||||
virtual ~IdentifyRequest();
|
||||
|
||||
public:
|
||||
/* One of these is called when the request goes through */
|
||||
virtual void OnSuccess() = 0;
|
||||
virtual void OnFail() = 0;
|
||||
|
||||
Module *GetOwner() const { return owner; }
|
||||
const Anope::string &GetAccount() const { return account; }
|
||||
const Anope::string &GetPassword() const { return password; }
|
||||
const Anope::string &GetAddress() const { return address; }
|
||||
|
||||
/* Holds this request. When a request is held it must be Released later
|
||||
* for the request to complete. Multiple modules may hold a request at any time,
|
||||
* but the request is not complete until every module has released it. If you do not
|
||||
* require holding this (eg, your password check is done in this thread and immediately)
|
||||
* then you don't need to hold the request before calling `Success()`.
|
||||
* @param m The module holding this request
|
||||
*/
|
||||
void Hold(Module *m);
|
||||
|
||||
/** Releases a held request
|
||||
* @param m The module releasing the hold
|
||||
*/
|
||||
void Release(Module *m);
|
||||
|
||||
/** Called by modules when this IdentifyRequest has succeeded.
|
||||
* If this request is behind held it must still be Released after calling this.
|
||||
* @param m The module confirming authentication
|
||||
*/
|
||||
void Success(Module *m);
|
||||
|
||||
/** Used to either finalize this request or marks
|
||||
* it as dispatched and begins waiting for the module(s)
|
||||
* that have holds to finish.
|
||||
*/
|
||||
void Dispatch();
|
||||
|
||||
static void ModuleUnload(Module *m);
|
||||
};
|
||||
|
||||
+802
@@ -0,0 +1,802 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#include "hashcomp.h"
|
||||
|
||||
namespace Anope
|
||||
{
|
||||
/**
|
||||
* A wrapper string class around all the other string classes, this class will
|
||||
* allow us to only require one type of string everywhere that can be converted
|
||||
* at any time to a specific type of string.
|
||||
*/
|
||||
class CoreExport string final
|
||||
{
|
||||
private:
|
||||
/**
|
||||
* The actual string is stored in an std::string as it can be converted to
|
||||
* ci::string, or a C-style string at any time.
|
||||
*/
|
||||
std::string _string;
|
||||
public:
|
||||
/**
|
||||
* Extras.
|
||||
*/
|
||||
typedef std::string::iterator iterator;
|
||||
typedef std::string::const_iterator const_iterator;
|
||||
typedef std::string::reverse_iterator reverse_iterator;
|
||||
typedef std::string::const_reverse_iterator const_reverse_iterator;
|
||||
typedef std::string::size_type size_type;
|
||||
typedef std::string::value_type value_type;
|
||||
static const size_type npos = static_cast<size_type>(-1);
|
||||
|
||||
/**
|
||||
* Constructors that can take in any type of string.
|
||||
*/
|
||||
string() : _string("") { }
|
||||
string(char chr) : _string() { _string = chr; }
|
||||
string(size_type n, char chr) : _string(n, chr) { }
|
||||
string(const char *_str) : _string(_str) { }
|
||||
string(const char *_str, size_type n) : _string(_str, n) { }
|
||||
string(const std::string &_str) : _string(_str) { }
|
||||
string(const ci::string &_str) : _string(_str.c_str()) { }
|
||||
string(const string &_str, size_type pos, size_type n = npos) : _string(_str._string, pos, n) { }
|
||||
template <class InputIterator> string(InputIterator first, InputIterator last) : _string(first, last) { }
|
||||
string(const string &) = default;
|
||||
|
||||
/**
|
||||
* Assignment operators, so any type of string can be assigned to this class.
|
||||
*/
|
||||
inline string &operator=(char chr) { this->_string = chr; return *this; }
|
||||
inline string &operator=(const char *_str) { this->_string = _str; return *this; }
|
||||
inline string &operator=(const std::string &_str) { this->_string = _str; return *this; }
|
||||
inline string &operator=(const string &_str) { if (this != &_str) this->_string = _str._string; return *this; }
|
||||
|
||||
/**
|
||||
* Equality operators, to compare to any type of string.
|
||||
*/
|
||||
inline bool operator==(const char *_str) const { return this->_string == _str; }
|
||||
inline bool operator==(const std::string &_str) const { return this->_string == _str; }
|
||||
inline bool operator==(const string &_str) const { return this->_string == _str._string; }
|
||||
|
||||
inline bool equals_cs(const char *_str) const { return this->_string == _str; }
|
||||
inline bool equals_cs(const std::string &_str) const { return this->_string == _str; }
|
||||
inline bool equals_cs(const string &_str) const { return this->_string == _str._string; }
|
||||
|
||||
inline bool equals_ci(const char *_str) const { return ci::string(this->_string.c_str()) == _str; }
|
||||
inline bool equals_ci(const std::string &_str) const { return ci::string(this->_string.c_str()) == _str.c_str(); }
|
||||
inline bool equals_ci(const string &_str) const { return ci::string(this->_string.c_str()) == _str._string.c_str(); }
|
||||
|
||||
/**
|
||||
* Inequality operators, exact opposites of the above.
|
||||
*/
|
||||
inline bool operator!=(const char *_str) const { return !operator==(_str); }
|
||||
inline bool operator!=(const std::string &_str) const { return !operator==(_str); }
|
||||
inline bool operator!=(const string &_str) const { return !operator==(_str); }
|
||||
|
||||
/**
|
||||
* Compound addition operators, overloaded to do concatenation.
|
||||
*/
|
||||
inline string &operator+=(char chr) { this->_string += chr; return *this; }
|
||||
inline string &operator+=(const char *_str) { this->_string += _str; return *this; }
|
||||
inline string &operator+=(const std::string &_str) { this->_string += _str; return *this; }
|
||||
inline string &operator+=(const string &_str) { if (this != &_str) this->_string += _str._string; return *this; }
|
||||
|
||||
/**
|
||||
* Addition operators, overloaded to do concatenation.
|
||||
*/
|
||||
inline const string operator+(char chr) const { return string(*this) += chr; }
|
||||
inline const string operator+(const char *_str) const { return string(*this) += _str; }
|
||||
inline const string operator+(const std::string &_str) const { return string(*this) += _str; }
|
||||
inline const string operator+(const string &_str) const { return string(*this) += _str; }
|
||||
|
||||
friend const string operator+(char chr, const string &str);
|
||||
friend const string operator+(const char *_str, const string &str);
|
||||
friend const string operator+(const std::string &_str, const string &str);
|
||||
|
||||
/**
|
||||
* Less-than operator.
|
||||
*/
|
||||
inline bool operator<(const string &_str) const { return this->_string < _str._string; }
|
||||
|
||||
/**
|
||||
* 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()); }
|
||||
|
||||
/**
|
||||
* Returns if the string is empty or not.
|
||||
*/
|
||||
inline bool empty() const { return this->_string.empty(); }
|
||||
|
||||
/**
|
||||
* Returns the string's length.
|
||||
*/
|
||||
inline size_type length() const { return this->_string.length(); }
|
||||
|
||||
/**
|
||||
* Returns the size of the currently allocated storage space in the string object.
|
||||
* This can be equal or greater than the length of the string.
|
||||
*/
|
||||
inline size_type capacity() const { return this->_string.capacity(); }
|
||||
|
||||
/**
|
||||
* Add a char to the end of the string.
|
||||
*/
|
||||
inline void push_back(char c) { return this->_string.push_back(c); }
|
||||
|
||||
inline string &append(const string &s) { this->_string.append(s.str()); return *this; }
|
||||
inline string &append(const char *s, size_t n) { this->_string.append(s, n); return *this; }
|
||||
|
||||
/**
|
||||
* Resizes the string content to n characters.
|
||||
*/
|
||||
inline void resize(size_type n) { return this->_string.resize(n); }
|
||||
|
||||
/**
|
||||
* Erases characters from the string.
|
||||
*/
|
||||
inline iterator erase(const iterator &i) { return this->_string.erase(i); }
|
||||
inline iterator erase(const iterator &first, const iterator &last) { return this->_string.erase(first, last); }
|
||||
inline void erase(size_type pos = 0, size_type n = std::string::npos) { this->_string.erase(pos, n); }
|
||||
|
||||
/**
|
||||
* Trim leading and trailing white spaces from the string.
|
||||
*/
|
||||
|
||||
inline string <rim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
while (!this->_string.empty() && what.find(this->_string[0]) != Anope::string::npos)
|
||||
this->_string.erase(this->_string.begin());
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline string &rtrim(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
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(const Anope::string &what = " \t\r\n")
|
||||
{
|
||||
this->ltrim(what);
|
||||
this->rtrim(what);
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears the string.
|
||||
*/
|
||||
inline void clear() { this->_string.clear(); }
|
||||
|
||||
/**
|
||||
* Find substrings of the string.
|
||||
*/
|
||||
inline size_type find(const string &_str, size_type pos = 0) const { return this->_string.find(_str._string, pos); }
|
||||
inline size_type find(char chr, size_type pos = 0) const { return this->_string.find(chr, pos); }
|
||||
inline size_type find_ci(const string &_str, size_type pos = 0) const { return ci::string(this->_string.c_str()).find(ci::string(_str._string.c_str()), pos); }
|
||||
inline size_type find_ci(char chr, size_type pos = 0) const { return ci::string(this->_string.c_str()).find(chr, pos); }
|
||||
|
||||
inline size_type rfind(const string &_str, size_type pos = npos) const { return this->_string.rfind(_str._string, pos); }
|
||||
inline size_type rfind(char chr, size_type pos = npos) const { return this->_string.rfind(chr, pos); }
|
||||
inline size_type rfind_ci(const string &_str, size_type pos = npos) const { return ci::string(this->_string.c_str()).rfind(ci::string(_str._string.c_str()), pos); }
|
||||
inline size_type rfind_ci(char chr, size_type pos = npos) const { return ci::string(this->_string.c_str()).rfind(chr, pos); }
|
||||
|
||||
inline size_type find_first_of(const string &_str, size_type pos = 0) const { return this->_string.find_first_of(_str._string, pos); }
|
||||
inline size_type find_first_of_ci(const string &_str, size_type pos = 0) const { return ci::string(this->_string.c_str()).find_first_of(ci::string(_str._string.c_str()), pos); }
|
||||
|
||||
inline size_type find_first_not_of(const string &_str, size_type pos = 0) const { return this->_string.find_first_not_of(_str._string, pos); }
|
||||
inline size_type find_first_not_of_ci(const string &_str, size_type pos = 0) const { return ci::string(this->_string.c_str()).find_first_not_of(ci::string(_str._string.c_str()), pos); }
|
||||
|
||||
inline size_type find_last_of(const string &_str, size_type pos = npos) const { return this->_string.find_last_of(_str._string, pos); }
|
||||
inline size_type find_last_of_ci(const string &_str, size_type pos = npos) const { return ci::string(this->_string.c_str()).find_last_of(ci::string(_str._string.c_str()), pos); }
|
||||
|
||||
inline size_type find_last_not_of(const string &_str, size_type pos = npos) const { return this->_string.find_last_not_of(_str._string, pos); }
|
||||
inline size_type find_last_not_of_ci(const string &_str, size_type pos = npos) const { return ci::string(this->_string.c_str()).find_last_not_of(ci::string(_str._string.c_str()), pos); }
|
||||
|
||||
inline int compare(size_t pos, size_t len, const string &str) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str())); }
|
||||
inline int compare(size_t pos, size_t len, const string &str, size_t subpos, size_type sublen = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, ci::string(str.c_str()), subpos, sublen); }
|
||||
inline int compare(size_t pos, size_t len, const char *s, size_type n = npos) const { return ci::string(this->_string.c_str()).compare(pos, len, s, n); }
|
||||
|
||||
/**
|
||||
* Determine if string consists of only numbers.
|
||||
*/
|
||||
inline bool is_number_only() const { return this->find_first_not_of("0123456789.-") == npos; }
|
||||
inline bool is_pos_number_only() const { return this->find_first_not_of("0123456789.") == npos; }
|
||||
|
||||
/**
|
||||
* In IRC messages we use a substitute (ASCII 0x1A) instead of a space
|
||||
* (ASCII 0x20) so it doesn't get line wrapped when put into a message.
|
||||
* The line wrapper will convert this to a space before it is sent to
|
||||
* clients.
|
||||
*/
|
||||
inline Anope::string nobreak() const { return this->replace_all_cs("\x20", "\x1A"); }
|
||||
|
||||
/**
|
||||
* Replace parts of the string.
|
||||
*/
|
||||
inline string replace(size_type pos, size_type n, const string &_str) { return string(this->_string.replace(pos, n, _str._string)); }
|
||||
inline string replace(size_type pos, size_type n, const string &_str, size_type pos1, size_type n1) { return string(this->_string.replace(pos, n, _str._string, pos1, n1)); }
|
||||
inline string replace(size_type pos, size_type n, size_type n1, char chr) { return string(this->_string.replace(pos, n, n1, chr)); }
|
||||
inline string replace(iterator first, iterator last, const string &_str) { return string(this->_string.replace(first, last, _str._string)); }
|
||||
inline string replace(iterator first, iterator last, size_type n, char chr) { return string(this->_string.replace(first, last, n, chr)); }
|
||||
template <class InputIterator> inline string replace(iterator first, iterator last, InputIterator f, InputIterator l) { return string(this->_string.replace(first, last, f, l)); }
|
||||
inline string replace_all_cs(const string &_orig, const string &_repl) const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
size_type pos = new_string.find(_orig), orig_length = _orig.length(), repl_length = _repl.length();
|
||||
while (pos != npos)
|
||||
{
|
||||
new_string = new_string.substr(0, pos) + _repl + new_string.substr(pos + orig_length);
|
||||
pos = new_string.find(_orig, pos + repl_length);
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
inline string replace_all_ci(const string &_orig, const string &_repl) const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
size_type pos = new_string.find_ci(_orig), orig_length = _orig.length(), repl_length = _repl.length();
|
||||
while (pos != npos)
|
||||
{
|
||||
new_string = new_string.substr(0, pos) + _repl + new_string.substr(pos + orig_length);
|
||||
pos = new_string.find_ci(_orig, pos + repl_length);
|
||||
}
|
||||
return new_string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the string in lowercase.
|
||||
*/
|
||||
inline string lower() const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
for (auto &chr : new_string)
|
||||
chr = Anope::tolower(chr);
|
||||
return new_string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the string in uppercase.
|
||||
*/
|
||||
inline string upper() const
|
||||
{
|
||||
Anope::string new_string = *this;
|
||||
for (auto &chr : new_string)
|
||||
chr = Anope::toupper(chr);
|
||||
return new_string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a substring of the string.
|
||||
*/
|
||||
inline string substr(size_type pos = 0, size_type n = npos) const { return string(this->_string.substr(pos, n)); }
|
||||
|
||||
/**
|
||||
* Iterators to the string.
|
||||
*/
|
||||
inline iterator begin() { return this->_string.begin(); }
|
||||
inline const_iterator begin() const { return this->_string.begin(); }
|
||||
inline iterator end() { return this->_string.end(); }
|
||||
inline const_iterator end() const { return this->_string.end(); }
|
||||
inline reverse_iterator rbegin() { return this->_string.rbegin(); }
|
||||
inline const_reverse_iterator rbegin() const { return this->_string.rbegin(); }
|
||||
inline reverse_iterator rend() { return this->_string.rend(); }
|
||||
inline const_reverse_iterator rend() const { return this->_string.rend(); }
|
||||
|
||||
/**
|
||||
* Subscript operator, to access individual characters of the string.
|
||||
*/
|
||||
inline char &operator[](size_type n) { return this->_string[n]; }
|
||||
inline const char &operator[](size_type n) const { return this->_string[n]; }
|
||||
|
||||
/**
|
||||
* Stream insertion operator, must be friend because they cannot be inside the class.
|
||||
*/
|
||||
friend std::ostream &operator<<(std::ostream &os, const string &_str);
|
||||
friend std::istream &operator>>(std::istream &is, string &_str);
|
||||
};
|
||||
|
||||
inline std::ostream &operator<<(std::ostream &os, const string &_str) { return os << _str._string; }
|
||||
/* This is not standard to make operator>> behave like operator<< in that it will allow extracting a whole line, not just one word */
|
||||
inline std::istream &operator>>(std::istream &is, string &_str) { return std::getline(is, _str._string); }
|
||||
|
||||
inline const string operator+(char chr, const string &str) { string tmp(chr); tmp += str; return tmp; }
|
||||
inline const string operator+(const char *_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
|
||||
inline const string operator+(const std::string &_str, const string &str) { string tmp(_str); tmp += str; return tmp; }
|
||||
|
||||
struct hash_ci final
|
||||
{
|
||||
inline size_t operator()(const string &s) const
|
||||
{
|
||||
return std::hash<std::string>()(s.lower().str());
|
||||
}
|
||||
};
|
||||
|
||||
struct hash_cs final
|
||||
{
|
||||
inline size_t operator()(const string &s) const
|
||||
{
|
||||
return std::hash<std::string>()(s.str());
|
||||
}
|
||||
};
|
||||
|
||||
struct compare final
|
||||
{
|
||||
inline bool operator()(const string &s1, const string &s2) const
|
||||
{
|
||||
return s1.equals_ci(s2);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
using map = std::map<string, T, ci::less>;
|
||||
|
||||
template<typename T>
|
||||
using multimap = std::multimap<string, T, ci::less>;
|
||||
|
||||
template<typename T>
|
||||
using unordered_map = std::unordered_map<string, T, hash_ci, compare>;
|
||||
|
||||
#if !REPRODUCIBLE_BUILD
|
||||
static const char *const compiled = __TIME__ " " __DATE__;
|
||||
#endif
|
||||
|
||||
/** The time Anope started.
|
||||
*/
|
||||
extern CoreExport time_t StartTime;
|
||||
|
||||
/** The value to return from main()
|
||||
*/
|
||||
extern int ReturnValue;
|
||||
|
||||
extern sig_atomic_t Signal;
|
||||
extern CoreExport bool Quitting;
|
||||
extern CoreExport bool Restarting;
|
||||
extern CoreExport Anope::string QuitReason;
|
||||
|
||||
/** The current system time, which is pretty close to being accurate.
|
||||
* Use this unless you need very specific time checks
|
||||
*/
|
||||
extern CoreExport time_t CurTime;
|
||||
extern CoreExport long long CurTimeNs;
|
||||
|
||||
/** The debug level we are running at.
|
||||
*/
|
||||
extern CoreExport int Debug;
|
||||
|
||||
/** Other command line options.
|
||||
*/
|
||||
extern CoreExport bool ReadOnly, NoFork, NoThird, NoPID, NoExpire, ProtocolDebug;
|
||||
|
||||
/** The root of the Anope installation. Usually ~/anope
|
||||
*/
|
||||
extern CoreExport Anope::string ServicesDir;
|
||||
|
||||
/** Anope binary name (eg anope)
|
||||
*/
|
||||
extern CoreExport Anope::string ServicesBin;
|
||||
|
||||
/** Various directory paths. These can be set at runtime by command line args
|
||||
*/
|
||||
extern CoreExport Anope::string ConfigDir;
|
||||
extern CoreExport Anope::string DataDir;
|
||||
extern CoreExport Anope::string ModuleDir;
|
||||
extern CoreExport Anope::string LocaleDir;
|
||||
extern CoreExport Anope::string LogDir;
|
||||
|
||||
/** The uplink we are currently connected to
|
||||
*/
|
||||
extern CoreExport size_t CurrentUplink;
|
||||
|
||||
/** Various methods to determine the Anope version running
|
||||
*/
|
||||
extern CoreExport string Version();
|
||||
extern CoreExport string VersionShort();
|
||||
extern CoreExport string VersionBuildString();
|
||||
extern CoreExport int VersionMajor();
|
||||
extern CoreExport int VersionMinor();
|
||||
extern CoreExport int VersionPatch();
|
||||
|
||||
/** Determines if we are still attached to the terminal, and can print
|
||||
* messages to the user via stderr/stdout.
|
||||
* @return true if still attached
|
||||
*/
|
||||
extern bool AtTerm();
|
||||
|
||||
/** Used to "fork" the process and go into the background during initial startup
|
||||
* while we are AtTerm(). The actual fork is not done here, but earlier, and this
|
||||
* simply notifies the parent via kill() to exit().
|
||||
*/
|
||||
extern void Fork();
|
||||
|
||||
/** Does something with the signal in Anope::Signal
|
||||
*/
|
||||
extern void HandleSignal();
|
||||
|
||||
/** One of the first functions called, does general initialization such as reading
|
||||
* command line args, loading the configuration, doing the initial fork() if necessary,
|
||||
* initializing language support, loading modules, and loading databases.
|
||||
* @throws CoreException if something bad went wrong
|
||||
*/
|
||||
extern bool Init(int ac, char **av);
|
||||
|
||||
/** Calls the save database event
|
||||
*/
|
||||
extern CoreExport void SaveDatabases();
|
||||
|
||||
/** Check whether two strings match.
|
||||
* @param str The string to check against the pattern (e.g. foobar)
|
||||
* @param mask The pattern to check (e.g. foo*bar)
|
||||
* @param case_sensitive Whether or not the match is case sensitive, default false.
|
||||
* @param use_regex Whether or not to try regex. case_sensitive is not used in regex.
|
||||
*/
|
||||
extern CoreExport bool Match(const string &str, const string &mask, bool case_sensitive = false, bool use_regex = false);
|
||||
|
||||
/** Converts a string to hex
|
||||
* @param the data to be converted
|
||||
* @return a anope::string containing the hex value
|
||||
*/
|
||||
extern CoreExport string Hex(const string &data);
|
||||
extern CoreExport string Hex(const char *data, unsigned len);
|
||||
|
||||
/** Converts a string from hex
|
||||
* @param src The data to be converted
|
||||
* @param dest The destination string
|
||||
*/
|
||||
extern CoreExport void Unhex(const string &src, string &dest);
|
||||
extern CoreExport void Unhex(const string &src, char *dest, size_t sz);
|
||||
|
||||
/** Base 64 encode a string
|
||||
* @param src The string to encode
|
||||
* @param target Where the encoded string is placed
|
||||
*/
|
||||
extern CoreExport void B64Encode(const string &src, string &target);
|
||||
|
||||
/** Base 64 decode a string
|
||||
* @param src The base64 encoded string
|
||||
* @param target The plain text result
|
||||
*/
|
||||
extern CoreExport void B64Decode(const string &src, string &target);
|
||||
|
||||
/** Encrypts what is in 'src' to 'dest'
|
||||
* @param src The source string to encrypt
|
||||
* @param dest The destination where the encrypted string is placed
|
||||
*/
|
||||
extern CoreExport bool Encrypt(const Anope::string &src, Anope::string &dest);
|
||||
|
||||
/** Returns a sequence of data formatted as the format argument specifies.
|
||||
** After the format parameter, the function expects at least as many
|
||||
** additional arguments as specified in format.
|
||||
* @param fmt Format of the Message
|
||||
* @param ... any number of parameters
|
||||
* @return a Anope::string
|
||||
*/
|
||||
extern CoreExport string printf(const char *fmt, ...) ATTR_FORMAT(1, 2);
|
||||
|
||||
/** Return the last error code
|
||||
* @return The error code
|
||||
*/
|
||||
extern CoreExport int LastErrorCode();
|
||||
|
||||
/** Return the last error, uses errno/GetLastError() to determine this
|
||||
* @return An error message
|
||||
*/
|
||||
extern CoreExport string LastError();
|
||||
|
||||
/** Determines if a path is a file
|
||||
*/
|
||||
extern CoreExport bool IsFile(const Anope::string &file);
|
||||
|
||||
/** Converts a string into seconds
|
||||
* @param s The string, eg 3d
|
||||
* @return The time represented by the string, eg 259,200
|
||||
*/
|
||||
extern CoreExport time_t DoTime(const Anope::string &s);
|
||||
|
||||
/** Retrieves a human readable string representing the time in seconds
|
||||
* @param seconds The time on seconds, eg 60
|
||||
* @param nc The account to use 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 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 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);
|
||||
|
||||
/** Normalize buffer, stripping control characters and colors
|
||||
* @param A string to be parsed for control and color codes
|
||||
* @return A string stripped of control and color codes
|
||||
*/
|
||||
extern CoreExport Anope::string NormalizeBuffer(const Anope::string &);
|
||||
|
||||
/** Parses a raw message from the uplink and calls its command handler.
|
||||
* @param message Raw message from the uplink
|
||||
*/
|
||||
extern void Process(const Anope::string &message);
|
||||
|
||||
/** Calls the command handler for an already parsed message.
|
||||
* @param source Source of the message.
|
||||
* @param command Command name.
|
||||
* @param params Any extra parameters.
|
||||
* @param tags IRCv3 message tags.
|
||||
*/
|
||||
extern CoreExport void ProcessInternal(MessageSource &src, const Anope::string &command, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> & tags);
|
||||
|
||||
/** Does a blocking dns query and returns the first IP.
|
||||
* @param host host to look up
|
||||
* @param type inet addr type
|
||||
* @return the IP if it was found, else the host
|
||||
*/
|
||||
extern Anope::string Resolve(const Anope::string &host, int type);
|
||||
|
||||
/** Does a blocking dns query and returns all IPs.
|
||||
* @param host host to look up
|
||||
* @param type inet addr type
|
||||
* @return A list of all IPs that the host resolves to
|
||||
*/
|
||||
extern std::vector<Anope::string> ResolveMultiple(const Anope::string &host, int type);
|
||||
|
||||
/** Generate a string of random letters and numbers
|
||||
* @param len The length of the string returned
|
||||
*/
|
||||
extern CoreExport Anope::string Random(size_t len);
|
||||
|
||||
/** Generate a random number. */
|
||||
extern CoreExport int RandomNumber();
|
||||
|
||||
/** Calculates the levenshtein distance between two strings.
|
||||
* @param s1 The first string.
|
||||
* @param s2 The second string.
|
||||
*/
|
||||
extern CoreExport size_t Distance(const Anope::string &s1, const Anope::string &s2);
|
||||
|
||||
/** Update the current time. */
|
||||
extern CoreExport void UpdateTime();
|
||||
|
||||
/** Expands a path fragment that is relative to the base directory.
|
||||
* @param base The base directory that it is relative to.
|
||||
* @param fragment The fragment to expand.
|
||||
*/
|
||||
extern CoreExport Anope::string Expand(const Anope::string &base, const Anope::string &fragment);
|
||||
|
||||
/** Expands a config path. */
|
||||
inline auto ExpandConfig(const Anope::string &path) { return Expand(ConfigDir, path); }
|
||||
|
||||
/** Expands a data path. */
|
||||
inline auto ExpandData(const Anope::string &path) { return Expand(DataDir, path); }
|
||||
|
||||
/** Expands a locale path. */
|
||||
inline auto ExpandLocale(const Anope::string &path) { return Expand(LocaleDir, path); }
|
||||
|
||||
/** Expands a log path. */
|
||||
inline auto ExpandLog(const Anope::string &path) { return Expand(LogDir, path); }
|
||||
|
||||
/** Expands a module path. */
|
||||
inline auto ExpandModule(const Anope::string &path) { return Expand(ModuleDir, path); }
|
||||
|
||||
/** Formats a CTCP message for sending to a client.
|
||||
* @param name The name of the CTCP.
|
||||
* @param body If present then the body of the CTCP.
|
||||
* @return A formatted CTCP ready to send to a client.
|
||||
*/
|
||||
extern CoreExport Anope::string FormatCTCP(const Anope::string &name, const Anope::string &body = "");
|
||||
|
||||
/** Parses a CTCP message received from a client.
|
||||
* @param text The raw message to parse.
|
||||
* @param name The location to store the name of the CTCP.
|
||||
* @param body The location to store body of the CTCP if one is present.
|
||||
* @return True if the message was a well formed CTCP; otherwise, false.
|
||||
*/
|
||||
extern CoreExport bool ParseCTCP(const Anope::string &text, Anope::string &name, Anope::string &body);
|
||||
|
||||
/** Replaces template variables within a string with values from a map.
|
||||
* @param str The string to template from.
|
||||
* @param vars The variables to replace within the string.
|
||||
* @return The specified string with all variables replaced within it.
|
||||
*/
|
||||
extern CoreExport Anope::string Template(const Anope::string &str, const Anope::map<Anope::string> &vars);
|
||||
}
|
||||
|
||||
/** sepstream allows for splitting token separated lists.
|
||||
* Each successive call to sepstream::GetToken() returns
|
||||
* the next token, until none remain, at which point the method returns
|
||||
* an empty string.
|
||||
*/
|
||||
class CoreExport sepstream
|
||||
{
|
||||
private:
|
||||
/** Original string.
|
||||
*/
|
||||
Anope::string tokens;
|
||||
/** Separator value
|
||||
*/
|
||||
char sep;
|
||||
/** Current string position
|
||||
*/
|
||||
size_t pos = 0;
|
||||
/** If set then GetToken() can return an empty string
|
||||
*/
|
||||
bool allow_empty;
|
||||
public:
|
||||
/** Create a sepstream and fill it with the provided data
|
||||
*/
|
||||
sepstream(const Anope::string &source, char separator, bool allowempty = false);
|
||||
|
||||
/** Retrieves the underlying string. */
|
||||
const auto &GetString() const { return tokens; }
|
||||
|
||||
/** Fetch the next token from the stream
|
||||
* @param token The next token from the stream is placed here
|
||||
* @return True if tokens still remain, false if there are none left
|
||||
*/
|
||||
bool GetToken(Anope::string &token);
|
||||
|
||||
/** Gets token number 'num' from the stream
|
||||
* @param token The token is placed here
|
||||
* @param num The token number to fetch
|
||||
* @return True if the token was able to be fetched
|
||||
*/
|
||||
bool GetToken(Anope::string &token, int num);
|
||||
|
||||
/** Gets every token from this stream
|
||||
* @param token Tokens are pushed back here
|
||||
*/
|
||||
template<typename T> void GetTokens(T &token)
|
||||
{
|
||||
token.clear();
|
||||
Anope::string t;
|
||||
while (this->GetToken(t))
|
||||
token.push_back(t);
|
||||
}
|
||||
|
||||
/** Gets token number 'num' from the stream and all remaining tokens.
|
||||
* @param token The token is placed here
|
||||
* @param num The token number to fetch
|
||||
* @return True if the token was able to be fetched
|
||||
*/
|
||||
bool GetTokenRemainder(Anope::string &token, int num);
|
||||
|
||||
/** Determines the number of tokens in this stream.
|
||||
* @return The number of tokens in this stream
|
||||
*/
|
||||
int NumTokens();
|
||||
|
||||
/** Fetch the entire remaining stream, without tokenizing
|
||||
* @return The remaining part of the stream
|
||||
*/
|
||||
Anope::string GetRemaining();
|
||||
|
||||
/** Returns true if the end of the stream has been reached
|
||||
* @return True if the end of the stream has been reached, otherwise false
|
||||
*/
|
||||
bool StreamEnd();
|
||||
};
|
||||
|
||||
/** A derived form of sepstream, which separates on commas
|
||||
*/
|
||||
class commasepstream final
|
||||
: public sepstream
|
||||
{
|
||||
public:
|
||||
/** Initialize with comma separator
|
||||
*/
|
||||
commasepstream(const Anope::string &source, bool allowempty = false) : sepstream(source, ',', allowempty) { }
|
||||
};
|
||||
|
||||
/** A derived form of sepstream, which separates on spaces
|
||||
*/
|
||||
class spacesepstream final
|
||||
: public sepstream
|
||||
{
|
||||
public:
|
||||
/** Initialize with space separator
|
||||
*/
|
||||
spacesepstream(const Anope::string &source) : sepstream(source, ' ') { }
|
||||
};
|
||||
|
||||
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
|
||||
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
|
||||
* a class derived from ModuleException. If a module throws an exception during its constructor, the module will not
|
||||
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
|
||||
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
|
||||
*/
|
||||
class CoreExport CoreException
|
||||
: public std::exception
|
||||
{
|
||||
protected:
|
||||
/** Holds the error message to be displayed
|
||||
*/
|
||||
Anope::string err;
|
||||
/** Source of the exception
|
||||
*/
|
||||
Anope::string source;
|
||||
public:
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
CoreException(const Anope::string &message) : err(message), source("The core") { }
|
||||
/** This constructor can be used to specify an error message before throwing,
|
||||
* and to specify the source of the exception.
|
||||
*/
|
||||
CoreException(const Anope::string &message, const Anope::string &src) : err(message), source(src) { }
|
||||
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
|
||||
* Actually no, it does nothing. Never mind.
|
||||
* @throws Nothing!
|
||||
*/
|
||||
virtual ~CoreException() noexcept = default;
|
||||
/** Returns the reason for the exception.
|
||||
* The module should probably put something informative here as the user will see this upon failure.
|
||||
*/
|
||||
virtual const Anope::string &GetReason() const
|
||||
{
|
||||
return err;
|
||||
}
|
||||
|
||||
virtual const Anope::string &GetSource() const
|
||||
{
|
||||
return source;
|
||||
}
|
||||
};
|
||||
|
||||
class CoreExport ModuleException
|
||||
: public CoreException
|
||||
{
|
||||
public:
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
ModuleException(const Anope::string &message) : CoreException(message, "A Module") { }
|
||||
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
|
||||
* Actually no, it does nothing. Never mind.
|
||||
* @throws Nothing!
|
||||
*/
|
||||
virtual ~ModuleException() noexcept = default;
|
||||
};
|
||||
|
||||
/** Casts to be used instead of dynamic_cast, this uses dynamic_cast
|
||||
* for debug builds and static_cast on release builds
|
||||
* to speed up the program because dynamic_cast relies on RTTI.
|
||||
*/
|
||||
#ifdef DEBUG_BUILD
|
||||
# include <typeinfo>
|
||||
template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
|
||||
{
|
||||
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
|
||||
template<typename T, typename O> inline T anope_dynamic_static_cast(O ptr)
|
||||
{
|
||||
return static_cast<T>(ptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "convert.h"
|
||||
+138
@@ -0,0 +1,138 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "services.h"
|
||||
|
||||
/** The base class that most classes in Anope inherit from
|
||||
*/
|
||||
class CoreExport Base
|
||||
{
|
||||
/* References to this base class */
|
||||
std::set<ReferenceBase *> *references = nullptr;
|
||||
public:
|
||||
virtual ~Base();
|
||||
|
||||
/** Adds a reference to this object. Eg, when a Reference
|
||||
* is created referring to this object this is called. It is used to
|
||||
* cleanup references when this object is destructed.
|
||||
*/
|
||||
void AddReference(ReferenceBase *r);
|
||||
|
||||
void DelReference(ReferenceBase *r);
|
||||
};
|
||||
|
||||
class ReferenceBase
|
||||
{
|
||||
protected:
|
||||
bool invalid = false;
|
||||
public:
|
||||
ReferenceBase() = default;
|
||||
ReferenceBase(const ReferenceBase &other) : invalid(other.invalid) { }
|
||||
virtual ~ReferenceBase() = default;
|
||||
inline void Invalidate() { this->invalid = true; }
|
||||
};
|
||||
|
||||
/** Used to hold pointers to objects that may be deleted. A Reference will
|
||||
* no longer be valid once the object it refers is destructed.
|
||||
*/
|
||||
template<typename T>
|
||||
class Reference
|
||||
: public ReferenceBase
|
||||
{
|
||||
protected:
|
||||
T *ref = nullptr;
|
||||
public:
|
||||
Reference() = default;
|
||||
|
||||
Reference(T *obj) : ref(obj)
|
||||
{
|
||||
if (ref)
|
||||
ref->AddReference(this);
|
||||
}
|
||||
|
||||
Reference(const Reference<T> &other) : ReferenceBase(other), ref(other.ref)
|
||||
{
|
||||
if (operator bool())
|
||||
ref->AddReference(this);
|
||||
}
|
||||
|
||||
virtual ~Reference()
|
||||
{
|
||||
if (operator bool())
|
||||
ref->DelReference(this);
|
||||
}
|
||||
|
||||
inline Reference<T>& operator=(const Reference<T> &other)
|
||||
{
|
||||
if (this != &other)
|
||||
{
|
||||
if (*this)
|
||||
this->ref->DelReference(this);
|
||||
|
||||
this->ref = other.ref;
|
||||
this->invalid = other.invalid;
|
||||
|
||||
if (*this)
|
||||
this->ref->AddReference(this);
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
/* We explicitly call operator bool here in several places to prevent other
|
||||
* operators, such operator T*, from being called instead, which will mess
|
||||
* with any class inheriting from this that overloads this operator.
|
||||
*/
|
||||
virtual operator bool()
|
||||
{
|
||||
if (!this->invalid)
|
||||
return this->ref != NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
inline operator T*()
|
||||
{
|
||||
if (operator bool())
|
||||
return this->ref;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline T *operator->()
|
||||
{
|
||||
if (operator bool())
|
||||
return this->ref;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline T *operator*()
|
||||
{
|
||||
if (operator bool())
|
||||
return this->ref;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/** Note that we can't have an operator< that returns this->ref < other.ref
|
||||
* because this function is used to sort objects in containers (such as set
|
||||
* or map), and if the references themselves can change if the object they
|
||||
* refer to is invalidated or changed, then this screws with the order that
|
||||
* the objects would be in the container without properly adjusting the
|
||||
* container, resulting in weird stuff.
|
||||
*
|
||||
* As such, we don't allow storing references in containers that require
|
||||
* operator<, because they would not be able to compare what the references
|
||||
* actually referred to.
|
||||
*/
|
||||
|
||||
inline bool operator==(const Reference<T> &other)
|
||||
{
|
||||
if (!this->invalid)
|
||||
return this->ref == other;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
+114
-51
@@ -1,77 +1,87 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2010 Robin Burchell <w00t@inspircd.org>
|
||||
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
|
||||
*
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
/** Flags settable on a bot
|
||||
*/
|
||||
enum BotFlag
|
||||
#pragma once
|
||||
|
||||
#include "users.h"
|
||||
#include "anope.h"
|
||||
#include "serialize.h"
|
||||
#include "commands.h"
|
||||
|
||||
|
||||
typedef Anope::map<BotInfo *> botinfo_map;
|
||||
|
||||
extern CoreExport Serialize::Checker<botinfo_map> BotListByNick, BotListByUID;
|
||||
|
||||
/* A service bot (NickServ, ChanServ, a BotServ bot, etc). */
|
||||
class CoreExport BotInfo final
|
||||
: public User
|
||||
, public Serializable
|
||||
{
|
||||
BI_BEGIN,
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(const Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
/* This bot can only be assigned by IRCops */
|
||||
BI_PRIVATE,
|
||||
/* The following flags are used to determin what bot really is what.
|
||||
* Since you *could* have ChanServ really named BotServ or something stupid,
|
||||
* this keeps track of them and allows them to be renamed in the config
|
||||
* at any time, even if they already exist in the database
|
||||
*/
|
||||
BI_CHANSERV,
|
||||
BI_BOTSERV,
|
||||
BI_HOSTSERV,
|
||||
BI_OPERSERV,
|
||||
BI_MEMOSERV,
|
||||
BI_NICKSERV,
|
||||
BI_GLOBAL,
|
||||
|
||||
BI_END
|
||||
};
|
||||
|
||||
struct CommandHash;
|
||||
|
||||
class CoreExport BotInfo : public Extensible, public Flags<BotFlag>
|
||||
{
|
||||
public:
|
||||
BotInfo *next, *prev;
|
||||
|
||||
std::string uid; /* required for UID supporting servers, as opposed to the shitty struct Uid. */
|
||||
std::string nick; /* Nickname of the bot */
|
||||
std::string user; /* Its user name */
|
||||
std::string host; /* Its hostname */
|
||||
std::string real; /* Its real name */
|
||||
time_t created; /* Birth date ;) */
|
||||
int16 chancount; /* Number of channels that use the bot. */
|
||||
/* Dynamic data */
|
||||
time_t lastmsg; /* Last time we said something */
|
||||
CommandHash **cmdTable;
|
||||
private:
|
||||
/* Channels this bot is assigned to */
|
||||
Serialize::Checker<std::set<ChannelInfo *> > channels;
|
||||
public:
|
||||
time_t created;
|
||||
/* Last time this bot said something (via privmsg) */
|
||||
time_t lastmsg;
|
||||
/* Map of actual command names -> service name/permission required */
|
||||
CommandInfo::map commands;
|
||||
/* The server-side alias used to message this bot. */
|
||||
Anope::string alias;
|
||||
/* Modes the bot should have as configured in service:modes */
|
||||
Anope::string botmodes;
|
||||
/* Channels the bot should be in as configured in service:channels */
|
||||
std::vector<Anope::string> botchannels;
|
||||
/* Whether or not this bot is introduced to the network */
|
||||
bool introduced;
|
||||
/* Bot can only be assigned by irc ops */
|
||||
bool oper_only;
|
||||
/* Bot is defined in the configuration file */
|
||||
bool conf;
|
||||
|
||||
/** Create a new bot.
|
||||
* @param nick The nickname to assign to the bot.
|
||||
* @param user The ident to give the bot.
|
||||
* @param host The hostname to give the bot.
|
||||
* @param real The realname to give the bot.
|
||||
* @param bmodes The modes to give the bot.
|
||||
*/
|
||||
BotInfo(const std::string &nick, const std::string &user = "", const std::string &host = "", const std::string &real = "");
|
||||
BotInfo(const Anope::string &nick, const Anope::string &user = "", const Anope::string &host = "", const Anope::string &real = "", const Anope::string &bmodes = "");
|
||||
|
||||
/** Destroy a bot, clearing up appropriately.
|
||||
*/
|
||||
virtual ~BotInfo();
|
||||
|
||||
/** Change the nickname set on a bot.
|
||||
void Serialize(Serialize::Data &data) const;
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
void GenerateUID();
|
||||
|
||||
void OnKill();
|
||||
|
||||
/** Change the nickname for the bot.
|
||||
* @param newnick The nick to change to
|
||||
*/
|
||||
void ChangeNick(const char *newnick);
|
||||
void SetNewNick(const Anope::string &newnick);
|
||||
|
||||
/** Rejoins all channels that this bot is assigned to.
|
||||
* Used on /kill, rename, etc.
|
||||
/** Return the channels this bot is assigned to
|
||||
*/
|
||||
void RejoinAll();
|
||||
const std::set<ChannelInfo *> &GetChannels() const;
|
||||
|
||||
/** Assign this bot to a given channel, removing the existing assigned bot if one exists.
|
||||
* @param u The user assigning the bot, or NULL
|
||||
@@ -84,4 +94,57 @@ class CoreExport BotInfo : public Extensible, public Flags<BotFlag>
|
||||
* @param ci The channel registration to remove the bot from.
|
||||
*/
|
||||
void UnAssign(User *u, ChannelInfo *ci);
|
||||
|
||||
/** Get the number of channels this bot is assigned to
|
||||
*/
|
||||
unsigned GetChannelCount() const;
|
||||
|
||||
/** Join this bot to a channel
|
||||
* @param c The channel
|
||||
* @param status The status the bot should have on the channel
|
||||
*/
|
||||
void Join(Channel *c, ChannelStatus *status = NULL);
|
||||
|
||||
/** Join this bot to a channel
|
||||
* @param chname The channel name
|
||||
* @param status The status the bot should have on the channel
|
||||
*/
|
||||
void Join(const Anope::string &chname, ChannelStatus *status = NULL);
|
||||
|
||||
/** Part this bot from a channel
|
||||
* @param c The channel
|
||||
* @param reason The reason we're parting
|
||||
*/
|
||||
void Part(Channel *c, const Anope::string &reason = "");
|
||||
|
||||
/** Called when a user messages this bot
|
||||
* @param u The user
|
||||
* @param message The users' message
|
||||
* @params tags Message tags
|
||||
*/
|
||||
virtual void OnMessage(User *u, const Anope::string &message, const Anope::map<Anope::string> &tags);
|
||||
|
||||
/** Link a command name to a command in services
|
||||
* @param cname The command name
|
||||
* @param sname The service name
|
||||
* @param permission Permission required to execute the command, if any
|
||||
* @return The commandinfo for the newly created command
|
||||
*/
|
||||
CommandInfo &SetCommand(const Anope::string &cname, const Anope::string &sname, const Anope::string &permission = "");
|
||||
|
||||
/** Get command info for a command
|
||||
* @param cname The command name
|
||||
* @return A struct containing service name and permission
|
||||
*/
|
||||
CommandInfo *GetCommand(const Anope::string &cname);
|
||||
|
||||
/** Get the command that users can use to send a message to this bot. */
|
||||
Anope::string GetQueryCommand(const Anope::string &command = "", const Anope::string &extra = "") const;
|
||||
|
||||
/** Find a bot by nick
|
||||
* @param nick The nick
|
||||
* @param nick_only True to only look by nick, and not by UID
|
||||
* @return The bot, if it exists
|
||||
*/
|
||||
static BotInfo *Find(const Anope::string &nick, bool nick_only = false);
|
||||
};
|
||||
|
||||
+200
-147
@@ -1,110 +1,116 @@
|
||||
/* Channel support
|
||||
*
|
||||
* (C) 2008-2010 Anope Team
|
||||
* (C) 2008-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
struct UserData
|
||||
{
|
||||
UserData()
|
||||
{
|
||||
lastline = NULL;
|
||||
last_use = last_start = time(NULL);
|
||||
lines = times = 0;
|
||||
}
|
||||
#pragma once
|
||||
|
||||
virtual ~UserData() { delete [] lastline; }
|
||||
#include "anope.h"
|
||||
#include "extensible.h"
|
||||
#include "modes.h"
|
||||
#include "serialize.h"
|
||||
|
||||
/* Data validity */
|
||||
time_t last_use;
|
||||
typedef Anope::unordered_map<Channel *> channel_map;
|
||||
|
||||
/* for flood kicker */
|
||||
int16 lines;
|
||||
time_t last_start;
|
||||
extern CoreExport channel_map ChannelList;
|
||||
|
||||
/* for repeat kicker */
|
||||
char *lastline;
|
||||
int16 times;
|
||||
};
|
||||
|
||||
struct UserContainer
|
||||
/* A user container, there is one of these per user per channel. */
|
||||
struct ChanUserContainer final
|
||||
: public Extensible
|
||||
{
|
||||
User *user;
|
||||
UserData ud;
|
||||
Flags<ChannelModeName> *Status;
|
||||
Channel *chan;
|
||||
/* Status the user has in the channel */
|
||||
ChannelStatus status;
|
||||
|
||||
UserContainer(User *u) : user(u) { }
|
||||
virtual ~UserContainer() { }
|
||||
ChanUserContainer(User *u, Channel *c) : user(u), chan(c) { }
|
||||
};
|
||||
|
||||
typedef std::list<UserContainer *> CUserList;
|
||||
|
||||
enum ChannelFlags
|
||||
class CoreExport Channel final
|
||||
: public Base
|
||||
, public Extensible
|
||||
{
|
||||
/* Channel still exists when emptied */
|
||||
CH_PERSIST,
|
||||
/* If set the channel is syncing users (channel was just created) and it should not be deleted */
|
||||
CH_SYNCING
|
||||
};
|
||||
static std::vector<Channel *> deleting;
|
||||
|
||||
class CoreExport Channel : public Extensible, public Flags<ChannelFlags>
|
||||
{
|
||||
private:
|
||||
public:
|
||||
typedef std::multimap<Anope::string, Anope::string> ModeList;
|
||||
private:
|
||||
/** A map of channel modes with their parameters set on this channel
|
||||
*/
|
||||
std::map<ChannelModeName, std::string> Params;
|
||||
ModeList modes;
|
||||
|
||||
/* Modes set on the channel */
|
||||
std::bitset<128> modes;
|
||||
public:
|
||||
/* Channel name */
|
||||
Anope::string name;
|
||||
/* Set if this channel is registered. ci->c == this. Contains information relevant to the registered channel */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
/* When the channel was created */
|
||||
time_t created;
|
||||
/* If the channel has just been created in a netjoin */
|
||||
bool syncing = false;
|
||||
/* Is configured in the conf as a channel bots should be in */
|
||||
bool botchannel = false;
|
||||
|
||||
public:
|
||||
/** Default constructor
|
||||
/* Users in the channel */
|
||||
typedef std::map<User *, ChanUserContainer *> ChanUserList;
|
||||
ChanUserList users;
|
||||
|
||||
/* Current topic of the channel */
|
||||
Anope::string topic;
|
||||
/* Who set the topic */
|
||||
Anope::string topic_setter;
|
||||
/* The timestamp associated with the topic. Not necessarily anywhere close to Anope::CurTime.
|
||||
* This is the time the topic was *originally set*. When we restore the topic we want to change the TS back
|
||||
* to this, but we can only do this on certain IRCds.
|
||||
*/
|
||||
time_t topic_ts = 0;
|
||||
/* The actual time the topic was set, probably close to Anope::CurTime */
|
||||
time_t topic_time = 0;
|
||||
|
||||
time_t server_modetime = 0; /* Time of last server MODE */
|
||||
time_t chanserv_modetime = 0; /* Time of last check_modes() */
|
||||
int16_t server_modecount = 0; /* Number of server MODEs this second */
|
||||
int16_t chanserv_modecount = 0; /* Number of check_mode()'s this sec */
|
||||
bool bouncy_modes = false; /* Did we fail to set modes here? */
|
||||
|
||||
private:
|
||||
/** Constructor
|
||||
* @param name The channel name
|
||||
* @param ts The time the channel was created
|
||||
*/
|
||||
Channel(const std::string &name, time_t ts = time(NULL));
|
||||
Channel(const Anope::string &nname, time_t ts = Anope::CurTime);
|
||||
|
||||
/** Default destructor
|
||||
public:
|
||||
/** Destructor
|
||||
*/
|
||||
~Channel();
|
||||
|
||||
Channel *next, *prev;
|
||||
std::string name; /* Channel name */
|
||||
ChannelInfo *ci; /* Corresponding ChannelInfo */
|
||||
time_t creation_time; /* When channel was created */
|
||||
char *topic;
|
||||
std::string topic_setter;
|
||||
time_t topic_time; /* When topic was set */
|
||||
|
||||
EList *bans;
|
||||
EList *excepts;
|
||||
EList *invites;
|
||||
|
||||
/* List of users in the channel */
|
||||
CUserList users;
|
||||
|
||||
BanData *bd;
|
||||
|
||||
time_t server_modetime; /* Time of last server MODE */
|
||||
time_t chanserv_modetime; /* Time of last check_modes() */
|
||||
int16 server_modecount; /* Number of server MODEs this second */
|
||||
int16 chanserv_modecount; /* Number of check_mode()'s this sec */
|
||||
int16 bouncy_modes; /* Did we fail to set modes here? */
|
||||
int16 topic_sync; /* Is the topic in sync? */
|
||||
/** Call if we need to unset all modes and clear all user status (internally).
|
||||
* Only useful if we get a SJOIN with a TS older than what we have here
|
||||
*/
|
||||
void Reset();
|
||||
|
||||
/** Restore the channel topic, set mlock (key), set stickied bans, etc
|
||||
*/
|
||||
void Sync();
|
||||
|
||||
/** Check if a channels modes are correct.
|
||||
*/
|
||||
void CheckModes();
|
||||
|
||||
/** Check if this channel should be deleted
|
||||
*/
|
||||
bool CheckDelete();
|
||||
|
||||
/** Join a user internally to the channel
|
||||
* @param u The user
|
||||
* @param status The status to give the user, if any
|
||||
* @return The UserContainer for the user
|
||||
*/
|
||||
void JoinUser(User *u);
|
||||
ChanUserContainer *JoinUser(User *u, const ChannelStatus *status);
|
||||
|
||||
/** Remove a user internally from the channel
|
||||
* @param u The user
|
||||
@@ -115,7 +121,7 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlags>
|
||||
* @param u The user
|
||||
* @return A user container if found, else NULL
|
||||
*/
|
||||
UserContainer *FindUser(User *u);
|
||||
ChanUserContainer *FindUser(User *u) const;
|
||||
|
||||
/** Check if a user has a status on a channel
|
||||
* @param u The user
|
||||
@@ -127,138 +133,185 @@ class CoreExport Channel : public Extensible, public Flags<ChannelFlags>
|
||||
/** Check if a user has a status on a channel
|
||||
* Use the overloaded function for ChannelModeStatus* to check for no status
|
||||
* @param u The user
|
||||
* @param Name The Mode name, eg CMODE_OP, CMODE_VOICE
|
||||
* @param name The mode name, eg CMODE_OP, CMODE_VOICE
|
||||
* @return true or false
|
||||
*/
|
||||
bool HasUserStatus(User *u, ChannelModeName Name);
|
||||
|
||||
/** See if the channel has any modes at all
|
||||
* @return true or false
|
||||
*/
|
||||
inline const bool HasModes() const { return modes.count(); }
|
||||
bool HasUserStatus(User *u, const Anope::string &name);
|
||||
|
||||
/** See if a channel has a mode
|
||||
* @param Name The mode name
|
||||
* @return true or false
|
||||
* @param name The mode name
|
||||
* @return The number of modes set
|
||||
* @param param The optional mode param
|
||||
*/
|
||||
bool HasMode(ChannelModeName Name);
|
||||
size_t HasMode(const Anope::string &name, const Anope::string ¶m = "");
|
||||
|
||||
/** Set a mode internally on a channel, this is not sent out to the IRCd
|
||||
* @param setter The setter
|
||||
* @param cm The mode
|
||||
* @param param The param
|
||||
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetModeInternal(ChannelMode *cm, const std::string ¶m = "", bool EnforceMLock = true);
|
||||
void SetModeInternal(MessageSource &source, ChannelMode *cm, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
|
||||
/** Remove a mode internally on a channel, this is not sent out to the IRCd
|
||||
* @param setter The Setter
|
||||
* @param cm The mode
|
||||
* @param param The param
|
||||
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void RemoveModeInternal(ChannelMode *cm, const std::string ¶m = "", bool EnforceMLock = true);
|
||||
void RemoveModeInternal(MessageSource &source, ChannelMode *cm, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
|
||||
/** Set a mode on a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param cm The mode
|
||||
* @param param Optional param arg for the mode
|
||||
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetMode(BotInfo *bi, ChannelMode *cm, const std::string ¶m = "", bool EnforceMLock = true);
|
||||
void SetMode(BotInfo *bi, ChannelMode *cm, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
|
||||
/**
|
||||
* Set a mode on a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param Name The mode name
|
||||
* @param name The mode name
|
||||
* @param param Optional param arg for the mode
|
||||
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetMode(BotInfo *bi, ChannelModeName Name, const std::string ¶m = "", bool EnforceMLock = true);
|
||||
|
||||
/**
|
||||
* Set a mode on a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param Mode The mode
|
||||
* @param param Optional param arg for the mode
|
||||
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetMode(BotInfo *bi, char Mode, const std::string ¶m = "", bool EnforceMLock = true);
|
||||
void SetMode(BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
|
||||
/** Remove a mode from a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param cm The mode
|
||||
* @param param Optional param arg for the mode
|
||||
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void RemoveMode(BotInfo *bi, ChannelMode *cm, const std::string ¶m = "", bool EnforceMLock = true);
|
||||
void RemoveMode(BotInfo *bi, ChannelMode *cm, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
|
||||
/**
|
||||
* Remove a mode from a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param Name The mode name
|
||||
* @param name The mode name
|
||||
* @param param Optional param arg for the mode
|
||||
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void RemoveMode(BotInfo *bi, ChannelModeName Name, const std::string ¶m = "", bool EnforceMLock = true);
|
||||
/**
|
||||
* Remove a mode from a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param Mode The mode
|
||||
* @param param Optional param arg for the mode
|
||||
* @param EnforceMLock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void RemoveMode(BotInfo *bi, char Mode, const std::string ¶m = "", bool EnforceMLock = true);
|
||||
void RemoveMode(BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
|
||||
/** Clear all the modes from the channel
|
||||
* @param bi The client unsetting the modes
|
||||
/** Get a modes parameter for the channel
|
||||
* @param name The mode
|
||||
* @param target a string to put the param into
|
||||
* @return true if the parameter was fetched, false if on error (mode not set) etc.
|
||||
*/
|
||||
void ClearModes(BotInfo *bi = NULL);
|
||||
bool GetParam(const Anope::string &name, Anope::string &target) const;
|
||||
|
||||
/** Clear all the bans from the channel
|
||||
* @param bi The client unsetting the modes
|
||||
*/
|
||||
void ClearBans(BotInfo *bi = NULL);
|
||||
|
||||
/** Clear all the excepts from the channel
|
||||
* @param bi The client unsetting the modes
|
||||
*/
|
||||
void ClearExcepts(BotInfo *bi = NULL);
|
||||
|
||||
/** Clear all the invites from the channel
|
||||
* @param bi The client unsetting the modes
|
||||
*/
|
||||
void ClearInvites(BotInfo *bi = NULL);
|
||||
|
||||
/** Get a param from the channel
|
||||
* @param Name The mode
|
||||
* @param Target a string to put the param into
|
||||
* @return true on success
|
||||
*/
|
||||
const bool GetParam(ChannelModeName Name, std::string &Target);
|
||||
|
||||
/** Check if a mode is set and has a param
|
||||
* @param Name The mode
|
||||
*/
|
||||
const bool HasParam(ChannelModeName Name);
|
||||
/** Set a string of modes on the channel
|
||||
* @param bi The client setting the modes
|
||||
* @param EnforceMLock Should mlock be enforced on this mode change
|
||||
* @param enforce_mlock Should mlock be enforced on this mode change
|
||||
* @param cmodes The modes to set
|
||||
*/
|
||||
void SetModes(BotInfo *bi, bool EnforceMLock, const char *cmodes, ...);
|
||||
void SetModes(BotInfo *bi, bool enforce_mlock, const char *cmodes, ...) ATTR_FORMAT(4, 5);
|
||||
void SetModes(BotInfo *bi, bool enforce_mlock, const Anope::string &cmodes);
|
||||
|
||||
/** Set a string of modes internally on a channel
|
||||
* @param source The setter
|
||||
* @param mode the modes
|
||||
* @param enforce_mlock true to enforce mlock
|
||||
*/
|
||||
void SetModesInternal(MessageSource &source, const Anope::string &modes, const std::vector<Anope::string> ¶ms, time_t ts = 0, bool enforce_mlock = true);
|
||||
|
||||
/** Does the given user match the given list? (CMODE_BAN, CMODE_EXCEPT, etc, a list mode)
|
||||
* @param u The user
|
||||
* @param list The mode of the list to check (eg CMODE_BAN)
|
||||
* @return true if the user matches the list
|
||||
*/
|
||||
bool MatchesList(User *u, const Anope::string &list);
|
||||
|
||||
/** Kick a user from a channel internally
|
||||
* @param source The sender of the kick
|
||||
* @param nick The nick being kicked
|
||||
* @param reason The reason for the kick
|
||||
*/
|
||||
void KickInternal(const std::string &source, const std::string &nick, const std::string &reason);
|
||||
void KickInternal(const MessageSource &source, const Anope::string &nick, const Anope::string &reason);
|
||||
|
||||
/** Kick a user from the channel
|
||||
* @param bi The sender, can be NULL for the service bot for this channel
|
||||
* @param u The user being kicked
|
||||
* @param reason The reason for the kick
|
||||
* @return true if the kick was scucessful, false if a module blocked the kick
|
||||
* @return true if the kick was successful, false if a module blocked the kick
|
||||
*/
|
||||
bool Kick(BotInfo *bi, User *u, const char *reason = NULL, ...);
|
||||
};
|
||||
bool Kick(BotInfo *bi, User *u, const char *reason = NULL, ...) ATTR_FORMAT(4, 5);
|
||||
bool Kick(BotInfo *bi, User *u, const Anope::string &reason);
|
||||
|
||||
/** Get all modes set on this channel, excluding status modes.
|
||||
* @return a map of modes and their optional parameters.
|
||||
*/
|
||||
const ModeList &GetModes() const;
|
||||
|
||||
/** Get a list of modes on a channel
|
||||
* @param name A mode name to get the list of
|
||||
* @return a vector of the list mode entries
|
||||
*/
|
||||
std::vector<Anope::string> GetModeList(const Anope::string &name);
|
||||
|
||||
/** Get a string of the modes set on this channel
|
||||
* @param complete Include mode parameters
|
||||
* @param plus If set to false (with complete), mode parameters will not be given for modes requiring no parameters to be unset
|
||||
* @return A mode string
|
||||
*/
|
||||
Anope::string GetModes(bool complete, bool plus);
|
||||
|
||||
/** Update the topic of the channel internally, and reset it if topiclock etc says to
|
||||
* @param user The user setting the new topic
|
||||
* @param newtopic The new topic
|
||||
* @param ts The time the new topic is being set
|
||||
*/
|
||||
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
|
||||
* @param newtopic The new topic
|
||||
* @param ts The time when the new topic is being set
|
||||
*/
|
||||
void ChangeTopic(const Anope::string &user, const Anope::string &newtopic, time_t ts = Anope::CurTime);
|
||||
|
||||
/** Set the correct modes, or remove the ones granted without permission,
|
||||
* for the specified user.
|
||||
* @param user The user to give/remove modes to/from
|
||||
* @param give_modes if true modes may be given to the user
|
||||
*/
|
||||
void SetCorrectModes(User *u, bool give_modes);
|
||||
|
||||
/** Unbans a user from this channel.
|
||||
* @param u The user to unban
|
||||
* @param mode The mode to unban
|
||||
* @param full Whether or not to match using the user's real host and IP
|
||||
* @return whether or not a ban was removed
|
||||
*/
|
||||
bool Unban(User *u, const Anope::string &mode, bool full = false);
|
||||
|
||||
/** Check whether a user is permitted to be on this channel
|
||||
* @param u The user
|
||||
* @return true if they are allowed, false if they aren't and were kicked
|
||||
*/
|
||||
bool CheckKick(User *user);
|
||||
|
||||
/** Find which bot should send mode/topic/etc changes for this channel
|
||||
* @return The bot
|
||||
*/
|
||||
BotInfo *WhoSends() const;
|
||||
|
||||
/** Finds a channel
|
||||
* @param name The channel to find
|
||||
* @return The channel, if found
|
||||
*/
|
||||
static Channel *Find(const Anope::string &name);
|
||||
|
||||
/** Finds or creates a channel
|
||||
* @param name The channel name
|
||||
* @param created Set to true if the channel was just created
|
||||
* @param ts The time the channel was created
|
||||
*/
|
||||
static Channel *FindOrCreate(const Anope::string &name, bool &created, time_t ts = Anope::CurTime);
|
||||
|
||||
void QueueForDeletion();
|
||||
|
||||
static void DeleteChannels();
|
||||
};
|
||||
|
||||
+174
-14
@@ -1,28 +1,188 @@
|
||||
/* Declarations for command data.
|
||||
*
|
||||
* (C) 2003-2010 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
* 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.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#include "modules.h"
|
||||
#pragma once
|
||||
|
||||
/*************************************************************************/
|
||||
#include "service.h"
|
||||
#include "anope.h"
|
||||
#include "channels.h"
|
||||
#include "textproc.h"
|
||||
|
||||
/* Routines for looking up commands. Command lists are arrays that must be
|
||||
* terminated with a NULL name.
|
||||
struct CommandGroup final
|
||||
{
|
||||
Anope::string name, description;
|
||||
};
|
||||
|
||||
/* Used in BotInfo::commands */
|
||||
struct CommandInfo final
|
||||
{
|
||||
typedef Anope::map<CommandInfo> map;
|
||||
|
||||
/* Service name of the command */
|
||||
Anope::string name;
|
||||
/* Permission required to execute the command */
|
||||
Anope::string permission;
|
||||
/* Group this command is in */
|
||||
Anope::string group;
|
||||
/* whether or not to hide this command in help output */
|
||||
bool hide = false;
|
||||
/* Only used with fantasy */
|
||||
bool prepend_channel = false;
|
||||
};
|
||||
|
||||
/* Where the replies from commands go to. User inherits from this and is the normal
|
||||
* source of a CommandReply
|
||||
*/
|
||||
struct CoreExport CommandReply
|
||||
{
|
||||
virtual ~CommandReply() = default;
|
||||
virtual void SendMessage(BotInfo *source, const Anope::string &msg) = 0;
|
||||
virtual void SendMessage(CommandSource &source, const Anope::string &msg);
|
||||
};
|
||||
|
||||
extern MDE Command *lookup_cmd(Command *list, char *name);
|
||||
extern MDE void mod_help_cmd(char *service, User *u, CommandHash *cmdTable[], const char *cmd);
|
||||
extern MDE void mod_run_cmd(const std::string &service, User *u, CommandHash *cmdTable[], const char *cmd);
|
||||
//extern MDE void do_help_limited(char *service, User * u, Command * c);
|
||||
/* The source for a command */
|
||||
class CoreExport CommandSource final
|
||||
{
|
||||
/* The nick executing the command */
|
||||
Anope::string nick;
|
||||
/* User executing the command, may be NULL */
|
||||
Reference<User> u;
|
||||
public:
|
||||
/* The account executing the command */
|
||||
Reference<NickCore> nc;
|
||||
/* for web clients */
|
||||
Anope::string ip;
|
||||
/* Where the reply should go */
|
||||
CommandReply *reply;
|
||||
/* Channel the command was executed on (fantasy) */
|
||||
Reference<Channel> c = nullptr;
|
||||
/* The service this command is on */
|
||||
Reference<BotInfo> service;
|
||||
/* The actual name of the command being executed */
|
||||
Anope::string command;
|
||||
/* The permission of the command being executed */
|
||||
Anope::string permission;
|
||||
/* The unique identifier of the executing message. */
|
||||
Anope::string msgid;
|
||||
|
||||
/*************************************************************************/
|
||||
CommandSource(const Anope::string &n, User *user, NickCore *core, CommandReply *reply, BotInfo *bi, const Anope::string &m = "");
|
||||
|
||||
const Anope::string &GetNick() const;
|
||||
User *GetUser();
|
||||
NickCore *GetAccount();
|
||||
AccessGroup AccessFor(ChannelInfo *ci);
|
||||
bool IsFounder(ChannelInfo *ci);
|
||||
|
||||
void Reply(const char *message, ...) ATTR_FORMAT(2, 3);
|
||||
void Reply(int count, const char *singular, const char *plural, ...) ATTR_FORMAT(4, 5);
|
||||
void Reply(const Anope::string &message);
|
||||
|
||||
bool HasCommand(const Anope::string &cmd);
|
||||
bool HasPriv(const Anope::string &cmd);
|
||||
bool IsServicesOper();
|
||||
bool IsOper();
|
||||
};
|
||||
|
||||
/** Every services command is a class, inheriting from Command.
|
||||
*/
|
||||
class CoreExport Command
|
||||
: public Service
|
||||
{
|
||||
Anope::string desc;
|
||||
std::vector<std::pair<Anope::string, std::function<bool(CommandSource&)>>> syntax;
|
||||
/* Allow unregistered users to use this command */
|
||||
bool allow_unregistered;
|
||||
/* Command requires that a user is executing it */
|
||||
bool require_user;
|
||||
|
||||
public:
|
||||
/* Maximum parameters accepted by this command */
|
||||
size_t max_params;
|
||||
/* Minimum parameters required to use this command */
|
||||
size_t min_params;
|
||||
|
||||
/* Module which owns us */
|
||||
Module *module;
|
||||
|
||||
protected:
|
||||
/** Create a new command.
|
||||
* @param owner The owner of the command
|
||||
* @param sname The command name
|
||||
* @param min_params The minimum number of parameters the parser will require to execute this command
|
||||
* @param max_params The maximum number of parameters the parser will create, after max_params, all will be combined into the last argument.
|
||||
* NOTE: If max_params is not set (default), there is no limit to the max number of params.
|
||||
*/
|
||||
Command(Module *owner, const Anope::string &sname, size_t min_params, size_t max_params = 0);
|
||||
|
||||
public:
|
||||
virtual ~Command() = default;
|
||||
|
||||
protected:
|
||||
void SetDesc(const Anope::string &d);
|
||||
|
||||
void ClearSyntax();
|
||||
void SetSyntax(const Anope::string &s, const std::function<bool(CommandSource&)> &p = nullptr);
|
||||
void SendSyntax(CommandSource &);
|
||||
|
||||
void AllowUnregistered(bool b);
|
||||
void RequireUser(bool b);
|
||||
|
||||
public:
|
||||
bool AllowUnregistered() const;
|
||||
bool RequireUser() const;
|
||||
|
||||
/** Get the command description
|
||||
* @param source The source wanting the command description
|
||||
* @return The commands description
|
||||
*/
|
||||
virtual const Anope::string GetDesc(CommandSource &source) const;
|
||||
|
||||
/** Execute this command.
|
||||
* @param source The source
|
||||
* @param params Command parameters
|
||||
*/
|
||||
virtual void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) = 0;
|
||||
|
||||
/** Called when help is requested for the client this command is on.
|
||||
* @param source The source
|
||||
*/
|
||||
virtual void OnServHelp(CommandSource &source, HelpWrapper &help);
|
||||
|
||||
/** Requested when the user is requesting help on this command. Help on this command should be sent to the user.
|
||||
* @param source The source
|
||||
* @param subcommand The subcommand the user is requesting help on, or an empty string. (e.g. /ns help set foo bar lol gives a subcommand of "FOO BAR LOL")
|
||||
* @return true if help was provided to the user, false otherwise.
|
||||
*/
|
||||
virtual bool OnHelp(CommandSource &source, const Anope::string &subcommand);
|
||||
|
||||
/** Requested when the user provides bad syntax to this command (not enough params, etc).
|
||||
* @param source The source
|
||||
* @param subcommand The subcommand the user tried to use
|
||||
*/
|
||||
virtual void OnSyntaxError(CommandSource &source, const Anope::string &subcommand);
|
||||
|
||||
/** Runs a command
|
||||
* @param source The source of the command
|
||||
* @param message The full message to run, the command is at the beginning of the message
|
||||
*/
|
||||
static void Run(CommandSource &source, const Anope::string &message);
|
||||
|
||||
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
|
||||
* @param bot If found, is set to the bot the command is on, eg NickServ
|
||||
* @param name If found, is set to the command name, eg REGISTER
|
||||
* @return true if the given command service exists
|
||||
*/
|
||||
static bool FindCommandFromService(const Anope::string &command_service, BotInfo *&bi, Anope::string &name);
|
||||
};
|
||||
|
||||
+158
-24
@@ -1,40 +1,174 @@
|
||||
/* Services configuration.
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2010 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
* 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.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
#pragma once
|
||||
|
||||
/* Note that most of the options which used to be here have been moved to
|
||||
* services.conf. */
|
||||
#include "account.h"
|
||||
#include "regchannel.h"
|
||||
#include "users.h"
|
||||
#include "opertype.h"
|
||||
|
||||
/*************************************************************************/
|
||||
namespace Configuration
|
||||
{
|
||||
class CoreExport Block
|
||||
{
|
||||
friend class Configuration::Conf;
|
||||
|
||||
/******* General configuration *******/
|
||||
public:
|
||||
typedef Anope::map<Anope::string> item_map;
|
||||
typedef Anope::multimap<Block> block_map;
|
||||
|
||||
/* Name of log file (in Services directory) */
|
||||
#define LOG_FILENAME "services.log"
|
||||
private:
|
||||
Anope::string name;
|
||||
item_map items;
|
||||
block_map blocks;
|
||||
int linenum;
|
||||
|
||||
/******************* END OF USER-CONFIGURABLE SECTION ********************/
|
||||
/* Represents a missing tag. */
|
||||
static Block EmptyBlock;
|
||||
|
||||
/* Size of input buffer (note: this is different from BUFSIZ)
|
||||
* This must be big enough to hold at least one full IRC message, or messy
|
||||
* things will happen. */
|
||||
#define BUFSIZE 1024
|
||||
public:
|
||||
Block(const Anope::string &);
|
||||
const Anope::string &GetName() const;
|
||||
int CountBlock(const Anope::string &name) const;
|
||||
const Block &GetBlock(const Anope::string &name, int num = 0) const;
|
||||
Block *GetMutableBlock(const Anope::string &name, int num = 0);
|
||||
|
||||
/* Maximum amount of data from/to the network to buffer (bytes). */
|
||||
#define NET_BUFSIZE 65536
|
||||
template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
|
||||
{
|
||||
return Anope::TryConvert<T>(this->Get<const Anope::string>(tag, def)).value_or(T());
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
bool Set(const Anope::string &tag, const Anope::string &value);
|
||||
const item_map &GetItems() const;
|
||||
};
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
template<> CoreExport const Anope::string Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
template<> CoreExport time_t Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
template<> CoreExport bool Block::Get(const Anope::string &tag, const Anope::string &def) const;
|
||||
|
||||
/** Represents a configuration file
|
||||
*/
|
||||
class File final
|
||||
{
|
||||
Anope::string name;
|
||||
bool executable;
|
||||
FILE *fp = nullptr;
|
||||
public:
|
||||
File(const Anope::string &, bool);
|
||||
~File();
|
||||
const Anope::string &GetName() const;
|
||||
Anope::string GetPath() const;
|
||||
|
||||
bool IsOpen() const;
|
||||
bool Open();
|
||||
void Close();
|
||||
bool End() const;
|
||||
Anope::string Read();
|
||||
};
|
||||
|
||||
struct Uplink;
|
||||
|
||||
class CoreExport Conf final
|
||||
: public Block
|
||||
{
|
||||
private:
|
||||
/** Replaces defined variables within a string. */
|
||||
Anope::string ReplaceVars(const Anope::string &str, const File &file, int linenumber);
|
||||
|
||||
public:
|
||||
/* options:readtimeout */
|
||||
time_t ReadTimeout;
|
||||
/* If we should default to privmsging clients */
|
||||
bool DefPrivmsg;
|
||||
/* Default language */
|
||||
Anope::string DefLanguage;
|
||||
/* options:timeoutcheck */
|
||||
time_t TimeoutCheck;
|
||||
/* options:servicealias */
|
||||
bool ServiceAlias;
|
||||
/* networkinfo:nickchars */
|
||||
Anope::string NickChars;
|
||||
|
||||
/* List of uplink servers to try and connect to */
|
||||
std::vector<Uplink> Uplinks;
|
||||
/* A vector of our logfile options */
|
||||
std::vector<LogInfo> LogInfos;
|
||||
/* Array of ulined servers */
|
||||
std::vector<Anope::string> Ulines;
|
||||
/* List of available opertypes */
|
||||
std::vector<OperType *> MyOperTypes;
|
||||
/* List of pairs of opers and their opertype from the config */
|
||||
std::vector<Oper *> Opers;
|
||||
/* Map of fantasy commands */
|
||||
CommandInfo::map Fantasy;
|
||||
/* Command groups */
|
||||
std::vector<CommandGroup> CommandGroups;
|
||||
/* List of modules to autoload */
|
||||
std::vector<Anope::string> ModulesAutoLoad;
|
||||
|
||||
/* module configuration blocks */
|
||||
std::map<Anope::string, Block *> modules;
|
||||
Anope::map<Anope::string> bots;
|
||||
|
||||
Conf();
|
||||
~Conf();
|
||||
|
||||
void LoadConf(File &file);
|
||||
void Post(Conf *old);
|
||||
|
||||
Block &GetModule(const Module *);
|
||||
Block &GetModule(const Anope::string &name);
|
||||
|
||||
BotInfo *GetClient(const Anope::string &name);
|
||||
|
||||
const Block &GetCommand(CommandSource &);
|
||||
};
|
||||
|
||||
struct Uplink final
|
||||
{
|
||||
Anope::string host;
|
||||
unsigned port;
|
||||
Anope::string password;
|
||||
int protocol;
|
||||
|
||||
Uplink(const Anope::string &_host, int _port, const Anope::string &_password, int _protocol) : host(_host), port(_port), password(_password), protocol(_protocol) { }
|
||||
inline bool operator==(const Uplink &other) const { return host == other.host && port == other.port && password == other.password && protocol == other.protocol; }
|
||||
inline bool operator!=(const Uplink &other) const { return !(*this == other); }
|
||||
Anope::string str() const;
|
||||
};
|
||||
}
|
||||
|
||||
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
|
||||
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
|
||||
* a class derived from ModuleException. If a module throws an exception during its constructor, the module will not
|
||||
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
|
||||
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
|
||||
*/
|
||||
class CoreExport ConfigException final
|
||||
: public CoreException
|
||||
{
|
||||
public:
|
||||
/** Default constructor, just uses the error message 'Config threw an exception'.
|
||||
*/
|
||||
ConfigException() : CoreException("Config threw an exception", "Config Parser") { }
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
ConfigException(const Anope::string &message) : CoreException(message, "Config Parser") { }
|
||||
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
|
||||
* Actually no, it does nothing. Never mind.
|
||||
* @throws Nothing!
|
||||
*/
|
||||
virtual ~ConfigException() noexcept = default;
|
||||
};
|
||||
|
||||
extern Configuration::File ServicesConf;
|
||||
extern CoreExport Configuration::Conf *Config;
|
||||
|
||||
@@ -1,903 +0,0 @@
|
||||
#ifndef _CONFIGREADER_H_
|
||||
#define _CONFIGREADER_H_
|
||||
|
||||
#include <string>
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <deque>
|
||||
|
||||
/** A configuration key and value pair
|
||||
*/
|
||||
typedef std::pair<std::string, std::string> KeyVal;
|
||||
|
||||
/** A list of related configuration keys and values
|
||||
*/
|
||||
typedef std::vector<KeyVal> KeyValList;
|
||||
|
||||
/** An entire config file, built up of KeyValLists
|
||||
*/
|
||||
typedef std::multimap<std::string, KeyValList> ConfigDataHash;
|
||||
|
||||
// Required forward definitions
|
||||
class ServerConfig;
|
||||
|
||||
/** Types of data in the core config
|
||||
*/
|
||||
enum ConfigDataType {
|
||||
DT_NOTHING, // No data
|
||||
DT_INTEGER, // Integer
|
||||
DT_UINTEGER, // Unsigned Integer
|
||||
DT_LUINTEGER, // Long Unsigned Integer
|
||||
DT_CHARPTR, // Char pointer
|
||||
DT_STRING, // std::string
|
||||
DT_BOOLEAN, // Boolean
|
||||
DT_HOSTNAME, // Hostname syntax
|
||||
DT_NOSPACES, // No spaces
|
||||
DT_IPADDRESS, // IP address (v4, v6)
|
||||
DT_TIME, // Time value
|
||||
DT_NORELOAD = 32, // Item can't be reloaded after startup
|
||||
DT_ALLOW_WILD = 64, // Allow wildcards/CIDR in DT_IPADDRESS
|
||||
DT_ALLOW_NEWLINE = 128 // New line characters allowed in DT_CHARPTR
|
||||
};
|
||||
|
||||
/** Holds a config value, either string, integer or boolean.
|
||||
* Callback functions receive one or more of these, either on
|
||||
* their own as a reference, or in a reference to a deque of them.
|
||||
* The callback function can then alter the values of the ValueItem
|
||||
* classes to validate the settings.
|
||||
*/
|
||||
class ValueItem
|
||||
{
|
||||
/** Actual data */
|
||||
std::string v;
|
||||
public:
|
||||
/** Initialize with an int */
|
||||
ValueItem(int);
|
||||
/** Initialize with a bool */
|
||||
ValueItem(bool);
|
||||
/** Initialize with a char pointer */
|
||||
ValueItem(const char *);
|
||||
/** Initialize with an std::string */
|
||||
ValueItem(const std::string &);
|
||||
/** Initialize with a long */
|
||||
ValueItem(long);
|
||||
/** Change value to a char pointer */
|
||||
//void Set(char *);
|
||||
/** Change value to a const char pointer */
|
||||
void Set(const char *);
|
||||
/** Change value to an std::string */
|
||||
void Set(const std::string &);
|
||||
/** Change value to an int */
|
||||
void Set(int);
|
||||
/** Get value as an int */
|
||||
int GetInteger();
|
||||
/** Get value as a string */
|
||||
const char *GetString() const;
|
||||
/** Get value as a string */
|
||||
inline const std::string &GetValue() const { return v; }
|
||||
/** Get value as a bool */
|
||||
bool GetBool();
|
||||
};
|
||||
|
||||
/** The base class of the container 'ValueContainer'
|
||||
* used internally by the core to hold core values.
|
||||
*/
|
||||
class ValueContainerBase
|
||||
{
|
||||
public:
|
||||
/** Constructor */
|
||||
ValueContainerBase() { }
|
||||
/** Destructor */
|
||||
virtual ~ValueContainerBase() { }
|
||||
};
|
||||
|
||||
/** ValueContainer is used to contain pointers to different
|
||||
* core values such as the server name, maximum number of
|
||||
* clients etc.
|
||||
* It is specialized to hold a data type, then pointed at
|
||||
* a value in the ServerConfig class. When the value has been
|
||||
* read and validated, the Set method is called to write the
|
||||
* value safely in a type-safe manner.
|
||||
*/
|
||||
template<typename T> class ValueContainer : public ValueContainerBase
|
||||
{
|
||||
/** Contained item */
|
||||
T val;
|
||||
public:
|
||||
/** Initialize with nothing */
|
||||
ValueContainer() : ValueContainerBase(), val(NULL) { }
|
||||
/** Initialize with a value of type T */
|
||||
ValueContainer(T Val) : ValueContainerBase(), val(Val) { }
|
||||
/** Initialize with a copy */
|
||||
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
|
||||
ValueContainer &operator=(const ValueContainer &Val)
|
||||
{
|
||||
val = Val.val;
|
||||
return *this;
|
||||
}
|
||||
/** Change value to type T of size s */
|
||||
void Set(const T newval, size_t s)
|
||||
{
|
||||
memcpy(val, newval, s);
|
||||
}
|
||||
};
|
||||
|
||||
/** This a specific version of ValueContainer to handle character arrays specially
|
||||
*/
|
||||
template<> class ValueContainer<char **> : public ValueContainerBase
|
||||
{
|
||||
/** Contained item */
|
||||
char **val;
|
||||
public:
|
||||
/** Initialize with nothing */
|
||||
ValueContainer() : ValueContainerBase(), val(NULL) { }
|
||||
/** Initialize with a value of type T */
|
||||
ValueContainer(char **Val) : ValueContainerBase(), val(Val) { }
|
||||
/** Initialize with a copy */
|
||||
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
|
||||
ValueContainer &operator=(const ValueContainer &Val)
|
||||
{
|
||||
val = Val.val;
|
||||
return *this;
|
||||
}
|
||||
/** Change value to type T of size s */
|
||||
void Set(const char *newval, size_t s)
|
||||
{
|
||||
if (*val) delete [] *val;
|
||||
if (!*newval) {
|
||||
*val = NULL;
|
||||
return;
|
||||
}
|
||||
*val = new char[s];
|
||||
strlcpy(*val, newval, s);
|
||||
}
|
||||
};
|
||||
|
||||
/** This a specific version of ValueContainer to handle std::string specially
|
||||
*/
|
||||
template<> class ValueContainer<std::string *> : public ValueContainerBase
|
||||
{
|
||||
/** Contained item */
|
||||
std::string *val;
|
||||
public:
|
||||
/** Initialize with nothing */
|
||||
ValueContainer() : ValueContainerBase(), val(NULL) { }
|
||||
/** Initialize with an std::string */
|
||||
ValueContainer(std::string *Val) : ValueContainerBase(), val(Val) { }
|
||||
/** Initialize with a copy */
|
||||
ValueContainer(const ValueContainer &Val) : ValueContainerBase(), val(Val.val) { }
|
||||
ValueContainer &operator=(const ValueContainer &Val)
|
||||
{
|
||||
val = Val.val;
|
||||
return *this;
|
||||
}
|
||||
/** Change value to given std::string */
|
||||
void Set(const std::string &newval)
|
||||
{
|
||||
*val = newval;
|
||||
}
|
||||
/** Change value to given char pointer */
|
||||
void Set(const char *newval)
|
||||
{
|
||||
*val = newval;
|
||||
}
|
||||
};
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to a bool
|
||||
*/
|
||||
typedef ValueContainer<bool *> ValueContainerBool;
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* an unsigned int
|
||||
*/
|
||||
typedef ValueContainer<unsigned *> ValueContainerUInt;
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* a long unsigned int
|
||||
*/
|
||||
typedef ValueContainer<long unsigned *> ValueContainerLUInt;
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* a char array.
|
||||
*/
|
||||
typedef ValueContainer<char **> ValueContainerChar;
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* an int
|
||||
*/
|
||||
typedef ValueContainer<int *> ValueContainerInt;
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* a time_t
|
||||
*/
|
||||
typedef ValueContainer<time_t *> ValueContainerTime;
|
||||
|
||||
/** A specialization of ValueContainer to hold a pointer to
|
||||
* an std::string
|
||||
*/
|
||||
typedef ValueContainer<std::string *> ValueContainerString;
|
||||
|
||||
/** A set of ValueItems used by multi-value validator functions
|
||||
*/
|
||||
typedef std::deque<ValueItem> ValueList;
|
||||
|
||||
/** A callback for validating a single value
|
||||
*/
|
||||
typedef bool (*Validator)(ServerConfig *, const char *, const char *, ValueItem &);
|
||||
/** A callback for validating multiple value entries
|
||||
*/
|
||||
typedef bool (*MultiValidator)(ServerConfig *, const char *, const char **, ValueList &, int *, bool);
|
||||
/** A callback indicating the end of a group of entries
|
||||
*/
|
||||
typedef bool (*MultiNotify)(ServerConfig *, const char *, bool);
|
||||
|
||||
/** Holds a core configuration item and its callbacks
|
||||
*/
|
||||
struct InitialConfig
|
||||
{
|
||||
/** Tag name */
|
||||
const char *tag;
|
||||
/** Value name */
|
||||
const char *value;
|
||||
/** Default, if not defined */
|
||||
const char *default_value;
|
||||
/** Value containers */
|
||||
ValueContainerBase *val;
|
||||
/** Data types */
|
||||
int datatype;
|
||||
/** Validation function */
|
||||
Validator validation_function;
|
||||
};
|
||||
|
||||
/** Holds a core configuration item and its callbacks
|
||||
* where there may be more than one item
|
||||
*/
|
||||
struct MultiConfig
|
||||
{
|
||||
/** Tag name */
|
||||
const char *tag;
|
||||
/** One or more items within tag */
|
||||
const char *items[17];
|
||||
/** One or more defaults for items within tags */
|
||||
const char *items_default[17];
|
||||
/** One or more data types */
|
||||
int datatype[17];
|
||||
/** Initialization function */
|
||||
MultiNotify init_function;
|
||||
/** Validation function */
|
||||
MultiValidator validation_function;
|
||||
/** Completion function */
|
||||
MultiNotify finish_function;
|
||||
};
|
||||
|
||||
/** This class holds the bulk of the runtime configuration for the ircd.
|
||||
* It allows for reading new config values, accessing configuration files,
|
||||
* and storage of the configuration data needed to run the ircd, such as
|
||||
* the servername, connect classes, /ADMIN data, MOTDs and filenames etc.
|
||||
*/
|
||||
class ServerConfig
|
||||
{
|
||||
private:
|
||||
/** This variable holds the names of all
|
||||
* files included from the main one. This
|
||||
* is used to make sure that no files are
|
||||
* recursively included.
|
||||
*/
|
||||
std::vector<std::string> include_stack;
|
||||
/** Check that there is only one of each configuration item
|
||||
*/
|
||||
bool CheckOnce(const char *);
|
||||
public:
|
||||
std::ostringstream errstr;
|
||||
ConfigDataHash newconfig;
|
||||
/** This holds all the information in the config file,
|
||||
* it's indexed by tag name to a vector of key/values.
|
||||
*/
|
||||
ConfigDataHash config_data;
|
||||
/** Construct a new ServerConfig
|
||||
*/
|
||||
ServerConfig();
|
||||
/** Clears the include stack in preperation for a Read() call.
|
||||
*/
|
||||
void ClearStack();
|
||||
/** Read the entire configuration into memory
|
||||
* and initialize this class. All other methods
|
||||
* should be used only by the core.
|
||||
*/
|
||||
int Read(bool);
|
||||
/** Report a configuration error given in errormessage.
|
||||
* @param bail If this is set to true, the error is sent to the console, and the program exits
|
||||
* @param connection If this is set to a non-null value, and bail is false, the errors are spooled to
|
||||
* this connection as SNOTICEs.
|
||||
* If the parameter is NULL, the messages are spooled to all connections via WriteOpers as SNOTICEs.
|
||||
*/
|
||||
void ReportConfigError(const std::string &, bool);
|
||||
/** Load 'filename' into 'target', with the new config parser everything is parsed into
|
||||
* tag/key/value at load-time rather than at read-value time.
|
||||
*/
|
||||
bool LoadConf(ConfigDataHash &, const char *, std::ostringstream &);
|
||||
/** Load 'filename' into 'target', with the new config parser everything is parsed into
|
||||
* tag/key/value at load-time rather than at read-value time.
|
||||
*/
|
||||
bool LoadConf(ConfigDataHash &, const std::string &, std::ostringstream &);
|
||||
// Both these return true if the value existed or false otherwise
|
||||
/** Writes 'length' chars into 'result' as a string
|
||||
*/
|
||||
bool ConfValue(ConfigDataHash &, const char *, const char *, int, char *, int, bool = false);
|
||||
/** Writes 'length' chars into 'result' as a string
|
||||
*/
|
||||
bool ConfValue(ConfigDataHash &, const char *, const char *, const char *, int, char *, int, bool = false);
|
||||
/** Writes 'length' chars into 'result' as a string
|
||||
*/
|
||||
bool ConfValue(ConfigDataHash &, const std::string &, const std::string &, int, std::string &, bool = false);
|
||||
/** Writes 'length' chars into 'result' as a string
|
||||
*/
|
||||
bool ConfValue(ConfigDataHash &, const std::string &, const std::string &, const std::string &, int, std::string &, bool = false);
|
||||
/** Tries to convert the value to an integer and write it to 'result'
|
||||
*/
|
||||
bool ConfValueInteger(ConfigDataHash &, const char *, const char *, int, int &);
|
||||
/** Tries to convert the value to an integer and write it to 'result'
|
||||
*/
|
||||
bool ConfValueInteger(ConfigDataHash &, const char *, const char *, const char *, int, int &);
|
||||
/** Tries to convert the value to an integer and write it to 'result'
|
||||
*/
|
||||
bool ConfValueInteger(ConfigDataHash &, const std::string &, const std::string &, int, int &);
|
||||
/** Tries to convert the value to an integer and write it to 'result'
|
||||
*/
|
||||
bool ConfValueInteger(ConfigDataHash &, const std::string &, const std::string &, const std::string &, int, int &);
|
||||
/** Returns true if the value exists and has a true value, false otherwise
|
||||
*/
|
||||
bool ConfValueBool(ConfigDataHash &, const char *, const char *, int);
|
||||
/** Returns true if the value exists and has a true value, false otherwise
|
||||
*/
|
||||
bool ConfValueBool(ConfigDataHash &, const char *, const char *, const char *, int);
|
||||
/** Returns true if the value exists and has a true value, false otherwise
|
||||
*/
|
||||
bool ConfValueBool(ConfigDataHash &, const std::string &, const std::string &, int);
|
||||
/** Returns true if the value exists and has a true value, false otherwise
|
||||
*/
|
||||
bool ConfValueBool(ConfigDataHash &, const std::string &, const std::string &, const std::string &, int);
|
||||
/** Returns the number of occurences of tag in the config file
|
||||
*/
|
||||
int ConfValueEnum(ConfigDataHash &, const char *);
|
||||
/** Returns the number of occurences of tag in the config file
|
||||
*/
|
||||
int ConfValueEnum(ConfigDataHash &, const std::string &);
|
||||
/** Returns the numbers of vars inside the index'th 'tag in the config file
|
||||
*/
|
||||
int ConfVarEnum(ConfigDataHash &, const char *, int);
|
||||
/** Returns the numbers of vars inside the index'th 'tag in the config file
|
||||
*/
|
||||
int ConfVarEnum(ConfigDataHash &, const std::string &, int);
|
||||
void ValidateHostname(const char *, const std::string &, const std::string &);
|
||||
void ValidateIP(const char *p, const std::string &, const std::string &, bool);
|
||||
void ValidateNoSpaces(const char *, const std::string &, const std::string &);
|
||||
|
||||
|
||||
|
||||
/** Below here is a list of variables which contain the config files values
|
||||
*/
|
||||
/* IRCd module in use */
|
||||
char *IRCDModule;
|
||||
|
||||
/* Host to connect to **/
|
||||
char *LocalHost;
|
||||
/* List of uplink servers to try and connect to */
|
||||
std::list<Uplink *> Uplinks;
|
||||
|
||||
/* Our server name */
|
||||
char *ServerName;
|
||||
/* Our servers description */
|
||||
char *ServerDesc;
|
||||
/* The username/ident of services clients */
|
||||
char *ServiceUser;
|
||||
/* The hostname if services clients */
|
||||
char *ServiceHost;
|
||||
|
||||
/* Help channel, ops here get usermode +h **/
|
||||
char *HelpChannel;
|
||||
/* Log channel */
|
||||
char *LogChannel;
|
||||
/* Name of the network were on */
|
||||
char *NetworkName;
|
||||
/* The max legnth of nicks */
|
||||
unsigned NickLen;
|
||||
/* Max length of idents */
|
||||
unsigned UserLen;
|
||||
/* Max lenght of hostnames */
|
||||
unsigned HostLen;
|
||||
|
||||
/* Max length of passwords */
|
||||
unsigned PassLen;
|
||||
|
||||
/* NickServ Name */
|
||||
char *s_NickServ;
|
||||
/* ChanServ Name */
|
||||
char *s_ChanServ;
|
||||
/* MemoServ Name */
|
||||
char *s_MemoServ;
|
||||
/* BotServ Name */
|
||||
char *s_BotServ;
|
||||
/* OperServ name */
|
||||
char *s_OperServ;
|
||||
/* Global name */
|
||||
char *s_GlobalNoticer;
|
||||
/* NickServs realname */
|
||||
char *desc_NickServ;
|
||||
/* ChanServ realname */
|
||||
char *desc_ChanServ;
|
||||
/* MemoServ relname */
|
||||
char *desc_MemoServ;
|
||||
/* BotServ realname */
|
||||
char *desc_BotServ;
|
||||
/* OperServ realname */
|
||||
char *desc_OperServ;
|
||||
/* Global realname */
|
||||
char *desc_GlobalNoticer;
|
||||
|
||||
/* HostServ Name */
|
||||
char *s_HostServ;
|
||||
/* HostServ realname */
|
||||
char *desc_HostServ;
|
||||
|
||||
/* Filename for the PID file */
|
||||
char *PIDFilename;
|
||||
/* MOTD filename */
|
||||
char *MOTDFilename;
|
||||
|
||||
/* True if its ok to not be able to save backs */
|
||||
bool NoBackupOkay;
|
||||
/* Do password checking when new people register */
|
||||
bool StrictPasswords;
|
||||
/* How many times you're allowed to give a bad password before being killed */
|
||||
unsigned BadPassLimit;
|
||||
/* How long before bad passwords are forgotten */
|
||||
time_t BadPassTimeout;
|
||||
/* Delay between automatic database updates */
|
||||
time_t UpdateTimeout;
|
||||
/* Delay between checks for expired nicks and channels */
|
||||
time_t ExpireTimeout;
|
||||
/* How long to wait for something from the uplink, this is passed to select() */
|
||||
time_t ReadTimeout;
|
||||
/* How often to send program errors */
|
||||
time_t WarningTimeout;
|
||||
/* How long to process things such as timers to see if there is anything to calll */
|
||||
time_t TimeoutCheck;
|
||||
/* Num of days logfiles are kept */
|
||||
int KeepLogs;
|
||||
/* Number of days backups are kept */
|
||||
int KeepBackups;
|
||||
/* Forbidding requires a reason */
|
||||
bool ForceForbidReason;
|
||||
/* Services should use privmsgs instead of notices */
|
||||
bool UsePrivmsg;
|
||||
/* Services only respond to full PRIVMSG client@services.server.name messages */
|
||||
bool UseStrictPrivMsg;
|
||||
/* Dump a core file if we crash */
|
||||
bool DumpCore;
|
||||
/* Log users connecting/existing/changing nicks */
|
||||
bool LogUsers;
|
||||
/* Number of seconds between consecutive uses of the REGISTER command
|
||||
* Not to be confused with NSRegDelay */
|
||||
unsigned NickRegDelay;
|
||||
/* Max number if news items allowed in the list */
|
||||
unsigned NewsCount;
|
||||
/* Default mlock modes */
|
||||
std::string MLock;
|
||||
/* Default botmodes on channels, defaults to ao */
|
||||
std::string BotModes;
|
||||
/* How many times to try and reconnect to the uplink before giving up */
|
||||
unsigned MaxRetries;
|
||||
/* How long to wait between connection attempts */
|
||||
int RetryWait;
|
||||
|
||||
/* Services can use email */
|
||||
bool UseMail;
|
||||
/* Path to the sendmail executable */
|
||||
char *SendMailPath;
|
||||
/* Address to send from */
|
||||
char *SendFrom;
|
||||
/* Only opers can have services send mail */
|
||||
bool RestrictMail;
|
||||
/* Delay between sending mail */
|
||||
time_t MailDelay;
|
||||
/* Don't quote the To: address */
|
||||
bool DontQuoteAddresses;
|
||||
|
||||
/* Prefix of guest nicks when a user gets forced off of a nick */
|
||||
char *NSGuestNickPrefix;
|
||||
/* Allow users to set kill immed on */
|
||||
bool NSAllowKillImmed;
|
||||
/* Don't allow nicks to use /ns group to regroup nicks */
|
||||
bool NSNoGroupChange;
|
||||
/* Default flags for newly registered nicks */
|
||||
Flags<NickCoreFlag> NSDefFlags;
|
||||
/* Default language used by services */
|
||||
unsigned NSDefLanguage;
|
||||
/* Users must be connected this long before they can register
|
||||
* Not to be confused with NickRegDelay */
|
||||
time_t NSRegDelay;
|
||||
/* Time before the registering mail will be resent */
|
||||
time_t NSResendDelay;
|
||||
/* How long before nicks expir */
|
||||
time_t NSExpire;
|
||||
/* Time before NickRequests expire */
|
||||
time_t NSRExpire;
|
||||
/* Force email when registering */
|
||||
bool NSForceEmail;
|
||||
/* Max number of nicks in a group */
|
||||
int NSMaxAliases;
|
||||
/* Max number of allowed strings on the access list */
|
||||
unsigned NSAccessMax;
|
||||
/* Enforcer client user name */
|
||||
char *NSEnforcerUser;
|
||||
/* Enforcer client hostname */
|
||||
char *NSEnforcerHost;
|
||||
/* How long before recovered nicks are released */
|
||||
time_t NSReleaseTimeout;
|
||||
/* /nickserv list is oper only */
|
||||
bool NSListOpersOnly;
|
||||
/* Max number of entries that can be returned from the list command */
|
||||
unsigned NSListMax;
|
||||
/* Only allow usermode +a etc on real services admins */
|
||||
bool NSSecureAdmins;
|
||||
/* Services opers must be /operd on the ircd aswell */
|
||||
bool NSStrictPrivileges;
|
||||
/* Use email to verify new users registering */
|
||||
bool NSEmailReg;
|
||||
/* Set the proper channel modes on users when they identify */
|
||||
bool NSModeOnID;
|
||||
/* Add the users hostnask their access list when they register */
|
||||
bool NSAddAccessOnReg;
|
||||
|
||||
/* Default flags for newly registered channels */
|
||||
Flags<ChannelInfoFlag> CSDefFlags;
|
||||
/* Max number of channels a user can own */
|
||||
unsigned CSMaxReg;
|
||||
/* Time before a channel expires */
|
||||
time_t CSExpire;
|
||||
/* Default ban type to use for channels */
|
||||
int CSDefBantype;
|
||||
/* Max number of entries allowed on channel access lists */
|
||||
unsigned CSAccessMax;
|
||||
/* Max number of entries allowed on autokick lists */
|
||||
unsigned CSAutokickMax;
|
||||
/* Default autokick reason */
|
||||
char *CSAutokickReason;
|
||||
/* Time ChanServ should stay in the channel to hold it to keep users from getting in */
|
||||
time_t CSInhabit;
|
||||
/* ChanServ's LIST command is oper only */
|
||||
bool CSListOpersOnly;
|
||||
/* Max number of entries allowed to be returned from the LIST command */
|
||||
unsigned CSListMax;
|
||||
/* true to make ChanServ oper only */
|
||||
bool CSOpersOnly;
|
||||
|
||||
/* Max number of memos allowed */
|
||||
unsigned MSMaxMemos;
|
||||
/* Time you must wait between sending memos */
|
||||
time_t MSSendDelay;
|
||||
/* Notify all of the aliases of the core the memo was sent to */
|
||||
bool MSNotifyAll;
|
||||
/* Who can use memos reciepts */
|
||||
unsigned MSMemoReceipt;
|
||||
|
||||
/* Defai;t BotServ flags */
|
||||
Flags<BotServFlag> BSDefFlags;
|
||||
/* How long before botserv forgets a user. This is used for flood kickers etc */
|
||||
time_t BSKeepData;
|
||||
/* Min number of users to have in the channel before the service bot joins */
|
||||
unsigned BSMinUsers;
|
||||
/* Max number of words allowed on the badwordslist */
|
||||
unsigned BSBadWordsMax;
|
||||
/* BotServ bot only joins if it would normally allowed to, abides by bans etc */
|
||||
bool BSSmartJoin;
|
||||
/* Dont tell users what badword they used */
|
||||
bool BSGentleBWReason;
|
||||
/* Case sensitive badwords matching */
|
||||
bool BSCaseSensitive;
|
||||
/* Char to use for the fantasy char, eg ! */
|
||||
char *BSFantasyCharacter;
|
||||
|
||||
/* Only show /stats o to opers */
|
||||
bool HideStatsO;
|
||||
/* Send out a global when services shut down or restart */
|
||||
bool GlobalOnCycle;
|
||||
/* Don't include the opers name in globals */
|
||||
bool AnonymousGlobal;
|
||||
/* Dont allow users to register nicks with oper names in them */
|
||||
bool RestrictOperNicks;
|
||||
/* Message to send when shutting down */
|
||||
char *GlobalOnCycleMessage;
|
||||
/* Message to send when starting up */
|
||||
char *GlobalOnCycleUP;
|
||||
/* Super admin is allowed */
|
||||
bool SuperAdmin;
|
||||
/* Log things said through ACT/SAY */
|
||||
bool LogBot;
|
||||
/* Log when new user max is reached */
|
||||
bool LogMaxUsers;
|
||||
/* Default expiry time for akills */
|
||||
time_t AutokillExpiry;
|
||||
/* Default expiry time for chan kills */
|
||||
time_t ChankillExpiry;
|
||||
/* Default expiry time for SGLine Expire */
|
||||
time_t SGLineExpiry;
|
||||
/* Default expiry time for SQLines */
|
||||
time_t SQLineExpiry;
|
||||
/* Default expiry time for SZLine */
|
||||
time_t SZLineExpiry;
|
||||
/* Actually akill the user when the akill is added */
|
||||
bool AkillOnAdd;
|
||||
/* Kill users on SGline */
|
||||
bool KillonSGline;
|
||||
/* Kill users on SQline */
|
||||
bool KillonSQline;
|
||||
/* Send a WALLOPS/GLOBOPS when a user opers */
|
||||
bool WallOper;
|
||||
/* Send a WALLOPS/GLOBOPS when a nonoper tries to use OperServ */
|
||||
bool WallBadOS;
|
||||
/* Send a WALLOPS/GLOBOPS when someone uses the GLOBAL command */
|
||||
bool WallOSGlobal;
|
||||
/* Send a WALLOPS/GLOBOPS when someone uses the MODE command */
|
||||
bool WallOSMode;
|
||||
/* Send a WALLOPS/GLOBOPS when someone uses the CLEARMODES command */
|
||||
bool WallOSClearmodes;
|
||||
/* Send a WALLOPS/GLOBOPS when someone uses the KICK command */
|
||||
bool WallOSKick;
|
||||
/* Send a WALLOPS/GLOBOPS when someone uses the AKILL command */
|
||||
bool WallOSAkill;
|
||||
/* Send a WALLOPS/GLOBOPS when someone uses the SGLINE command */
|
||||
bool WallOSSGLine;
|
||||
/* Send a WALLOPS/GLOBOPS when someone uses the SQLINE command */
|
||||
bool WallOSSQLine;
|
||||
/* Send a WALLOPS/GLOBOPS when someone uses the SZLINE command */
|
||||
bool WallOSSZLine;
|
||||
/* Send a WALLOPS/GLOBOPS when someone uses the NOOP command */
|
||||
bool WallOSNoOp;
|
||||
/* Send a WALLOPS/GLOBOPS when when someone uses the JUPE command */
|
||||
bool WallOSJupe;
|
||||
/* Send a WALLOPS/GLOBOPS when an akill expires */
|
||||
bool WallAkillExpire;
|
||||
/* Send a WALLOPS/GLOBOPS when SGLines expire */
|
||||
bool WallSGLineExpire;
|
||||
/* Send a WALLOPS/GLOBOPS when SQLines expire */
|
||||
bool WallSQLineExpire;
|
||||
/* Send a WALLOPS/GLOBOPS when SZLines expire */
|
||||
bool WallSZLineExpire;
|
||||
/* Send a WALLOPS/GLOBOPS when exceptions expire */
|
||||
bool WallExceptionExpire;
|
||||
/* Send a WALLOPS/GLOBOPS when DROP is used */
|
||||
bool WallDrop;
|
||||
/* Send a WALLOPS/GLOBOPS when FORBID is used */
|
||||
bool WallForbid;
|
||||
/* Send a WALLOPS/GLOBOPS when GETPASS is used */
|
||||
bool WallGetpass;
|
||||
/* Send a WALLOPS/GLOBOPS when SETPASS is used */
|
||||
bool WallSetpass;
|
||||
/* Add the akillers nick to the akill reason */
|
||||
bool AddAkiller;
|
||||
|
||||
/* Limit sessions */
|
||||
bool LimitSessions;
|
||||
/* The default session limit */
|
||||
unsigned DefSessionLimit;
|
||||
/* How long before exceptions expire */
|
||||
time_t ExceptionExpiry;
|
||||
/* How many times to kill before adding an KILL */
|
||||
int MaxSessionKill;
|
||||
/* Max limit that can be used for exceptions */
|
||||
unsigned MaxSessionLimit;
|
||||
/* How long session akills should last */
|
||||
time_t SessionAutoKillExpiry;
|
||||
/* Reason to use for session kills */
|
||||
char *SessionLimitExceeded;
|
||||
/* Optional second reason */
|
||||
char *SessionLimitDetailsLoc;
|
||||
/* OperServ requires you to be an operator */
|
||||
bool OSOpersOnly;
|
||||
|
||||
/* List of modules to autoload */
|
||||
std::list<std::string> ModulesAutoLoad;
|
||||
/* Encryption modules */
|
||||
std::list<std::string> EncModuleList;
|
||||
/* Database modules */
|
||||
std::list<std::string> DBModuleList;
|
||||
/* HostServ Core Modules */
|
||||
std::list<std::string> HostServCoreModules;
|
||||
/* MemoServ Core Modules */
|
||||
std::list<std::string> MemoServCoreModules;
|
||||
/* BotServ Core Modules */
|
||||
std::list<std::string> BotServCoreModules;
|
||||
/* OperServ Core Modules */
|
||||
std::list<std::string> OperServCoreModules;
|
||||
/* NickServ Core Modules */
|
||||
std::list<std::string> NickServCoreModules;
|
||||
/* ChanServ Core Modules */
|
||||
std::list<std::string> ChanServCoreModules;
|
||||
|
||||
/* Default defcon level */
|
||||
int DefConLevel;
|
||||
/* Timeout before defcon is reset */
|
||||
time_t DefConTimeOut;
|
||||
/* Session limiit to use when using defcon */
|
||||
int DefConSessionLimit;
|
||||
/* How long to add akills for defcon */
|
||||
time_t DefConAKILL;
|
||||
/* Chan modes for defcon */
|
||||
char *DefConChanModes;
|
||||
/* Should we global on defcon */
|
||||
bool GlobalOnDefcon;
|
||||
/* Should we send DefconMessage aswell? */
|
||||
bool GlobalOnDefconMore;
|
||||
/* Message to send when defcon is off */
|
||||
char *DefConOffMessage;
|
||||
/* Message to send when defcon is on*/
|
||||
char *DefconMessage;
|
||||
/* Reason to akill clients for defcon */
|
||||
char *DefConAkillReason;
|
||||
|
||||
/* User keys to use for generating random hashes for pass codes etc */
|
||||
long unsigned int UserKey1;
|
||||
long unsigned int UserKey2;
|
||||
long unsigned int UserKey3;
|
||||
|
||||
/* Numeric */
|
||||
char *Numeric;
|
||||
/* Array of ulined servers */
|
||||
char **Ulines;
|
||||
/* Number of ulines */
|
||||
int NumUlines;
|
||||
|
||||
/* List of available opertypes */
|
||||
std::list<OperType *> MyOperTypes;
|
||||
/* List of pairs of opers and their opertype from the config */
|
||||
std::list<std::pair<std::string, std::string> > Opers;
|
||||
};
|
||||
|
||||
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
|
||||
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
|
||||
* a class derived from ModuleException. If a module throws an exception during its constructor, the module will not
|
||||
* be loaded. If this happens, the error message returned by ModuleException::GetReason will be displayed to the user
|
||||
* attempting to load the module, or dumped to the console if the ircd is currently loading for the first time.
|
||||
*/
|
||||
class ConfigException : public CoreException
|
||||
{
|
||||
public:
|
||||
/** Default constructor, just uses the error mesage 'Config threw an exception'.
|
||||
*/
|
||||
ConfigException() : CoreException("Config threw an exception", "Config Parser") {}
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
ConfigException(const std::string &message) : CoreException(message, "Config Parser") {}
|
||||
/** This destructor solves world hunger, cancels the world debt, and causes the world to end.
|
||||
* Actually no, it does nothing. Never mind.
|
||||
* @throws Nothing!
|
||||
*/
|
||||
virtual ~ConfigException() throw() { }
|
||||
};
|
||||
|
||||
#define CONF_NO_ERROR 0x000000
|
||||
#define CONF_NOT_A_NUMBER 0x000010
|
||||
#define CONF_INT_NEGATIVE 0x000080
|
||||
#define CONF_VALUE_NOT_FOUND 0x000100
|
||||
#define CONF_FILE_NOT_FOUND 0x000200
|
||||
|
||||
/** Allows reading of values from configuration files
|
||||
* This class allows a module to read from either the main configuration file (inspircd.conf) or from
|
||||
* a module-specified configuration file. It may either be instantiated with one parameter or none.
|
||||
* Constructing the class using one parameter allows you to specify a path to your own configuration
|
||||
* file, otherwise, inspircd.conf is read.
|
||||
*/
|
||||
class CoreExport ConfigReader
|
||||
{
|
||||
protected:
|
||||
/** The contents of the configuration file
|
||||
* This protected member should never be accessed by a module (and cannot be accessed unless the
|
||||
* core is changed). It will contain a pointer to the configuration file data with unneeded data
|
||||
* (such as comments) stripped from it.
|
||||
*/
|
||||
ConfigDataHash *data;
|
||||
/** Used to store errors
|
||||
*/
|
||||
std::ostringstream *errorlog;
|
||||
/** If we're using our own config data hash or not
|
||||
*/
|
||||
bool privatehash;
|
||||
/** True if an error occured reading the config file
|
||||
*/
|
||||
bool readerror;
|
||||
/** Error code
|
||||
*/
|
||||
long error;
|
||||
public:
|
||||
/** Default constructor.
|
||||
* This constructor initialises the ConfigReader class to read services.conf.
|
||||
*/
|
||||
ConfigReader();
|
||||
/** Overloaded constructor.
|
||||
* This constructor initialises the ConfigReader class to read a user-specified config file
|
||||
*/
|
||||
ConfigReader(const std::string &);
|
||||
/** Default destructor.
|
||||
* This method destroys the ConfigReader class.
|
||||
*/
|
||||
~ConfigReader();
|
||||
/** Retrieves a value from the config file.
|
||||
* This method retrieves a value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve.
|
||||
*/
|
||||
std::string ReadValue(const std::string &, const std::string &, int, bool = false);
|
||||
/** Retrieves a value from the config file.
|
||||
* This method retrieves a value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. If the
|
||||
* tag is not found the default value is returned instead.
|
||||
*/
|
||||
std::string ReadValue(const std::string &, const std::string &, const std::string &, int, bool = false);
|
||||
/** Retrieves a boolean value from the config file.
|
||||
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
|
||||
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
|
||||
*/
|
||||
bool ReadFlag(const std::string &, const std::string &, int);
|
||||
/** Retrieves a boolean value from the config file.
|
||||
* This method retrieves a boolean value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. The values "1", "yes"
|
||||
* and "true" in the config file count as true to ReadFlag, and any other value counts as false.
|
||||
* If the tag is not found, the default value is used instead.
|
||||
*/
|
||||
bool ReadFlag(const std::string &, const std::string &, const std::string &, int);
|
||||
/** Retrieves an integer value from the config file.
|
||||
* This method retrieves an integer value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
|
||||
* values in the tag will cause the objects error value to be set, and any call to GetError() will
|
||||
* return CONF_INVALID_NUMBER to be returned. need_positive is set if the number must be non-negative.
|
||||
* If a negative number is placed into a tag which is specified positive, 0 will be returned and GetError()
|
||||
* will return CONF_INT_NEGATIVE. Note that need_positive is not suitable to get an unsigned int - you
|
||||
* should cast the result to achieve that effect.
|
||||
*/
|
||||
int ReadInteger(const std::string &, const std::string &, int, bool);
|
||||
/** Retrieves an integer value from the config file.
|
||||
* This method retrieves an integer value from the config file. Where multiple copies of the tag
|
||||
* exist in the config file, index indicates which of the values to retrieve. Any invalid integer
|
||||
* values in the tag will cause the objects error value to be set, and any call to GetError() will
|
||||
* return CONF_INVALID_NUMBER to be returned. needs_unsigned is set if the number must be unsigned.
|
||||
* If a signed number is placed into a tag which is specified unsigned, 0 will be returned and GetError()
|
||||
* will return CONF_NOT_UNSIGNED. If the tag is not found, the default value is used instead.
|
||||
*/
|
||||
int ReadInteger(const std::string &, const std::string &, const std::string &, int, bool);
|
||||
/** Returns the last error to occur.
|
||||
* Valid errors can be found by looking in modules.h. Any nonzero value indicates an error condition.
|
||||
* A call to GetError() resets the error flag back to 0.
|
||||
*/
|
||||
long GetError();
|
||||
/** Counts the number of times a given tag appears in the config file.
|
||||
* This method counts the number of times a tag appears in a config file, for use where
|
||||
* there are several tags of the same kind, e.g. with opers and connect types. It can be
|
||||
* used with the index value of ConfigReader::ReadValue to loop through all copies of a
|
||||
* multiple instance tag.
|
||||
*/
|
||||
int Enumerate(const std::string &);
|
||||
/** Returns true if a config file is valid.
|
||||
* This method is partially implemented and will only return false if the config
|
||||
* file does not exist or could not be opened.
|
||||
*/
|
||||
bool Verify();
|
||||
/** Dumps the list of errors in a config file to an output location. If bail is true,
|
||||
* then the program will abort. If bail is false and user points to a valid user
|
||||
* record, the error report will be spooled to the given user by means of NOTICE.
|
||||
* if bool is false AND user is false, the error report will be spooled to all opers
|
||||
* by means of a NOTICE to all opers.
|
||||
*/
|
||||
void DumpErrors(bool);
|
||||
/** Returns the number of items within a tag.
|
||||
* For example if the tag was <test tag="blah" data="foo"> then this
|
||||
* function would return 2. Spaces and newlines both qualify as valid seperators
|
||||
* between values.
|
||||
*/
|
||||
int EnumerateValues(const std::string &, int);
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace Anope
|
||||
{
|
||||
/** Attempts to convert a string to any type.
|
||||
* @param in The value to convert.
|
||||
* @param leftover If non-nullptr then the location to store leftover data.
|
||||
*/
|
||||
template<typename T>
|
||||
inline std::optional<T> TryConvert(const Anope::string &in, Anope::string *leftover = nullptr)
|
||||
{
|
||||
std::istringstream tmp(in.str());
|
||||
T out;
|
||||
if (!(tmp >> out))
|
||||
return std::nullopt;
|
||||
|
||||
if (leftover)
|
||||
{
|
||||
leftover->clear();
|
||||
std::getline(tmp, leftover->str());
|
||||
}
|
||||
else
|
||||
{
|
||||
char extra;
|
||||
if (tmp >> extra)
|
||||
return std::nullopt;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
/** Converts a string to any type.
|
||||
* @param in The value to convert.
|
||||
* @param def The default to use if the conversion failed.
|
||||
* @param leftover If non-nullptr then the location to store leftover data.
|
||||
*/
|
||||
template<typename T>
|
||||
inline T Convert(const Anope::string &in, T def, Anope::string *leftover = nullptr)
|
||||
{
|
||||
return TryConvert<T>(in, leftover).value_or(def);
|
||||
}
|
||||
|
||||
/** Attempts to convert any type to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
template <class T>
|
||||
inline std::optional<Anope::string> TryString(const T &in)
|
||||
{
|
||||
std::ostringstream tmp;
|
||||
if (!(tmp << in))
|
||||
return std::nullopt;
|
||||
return tmp.str();
|
||||
}
|
||||
|
||||
/** No-op function that returns the string that was passed to it.
|
||||
* @param in The string to return.
|
||||
*/
|
||||
inline const string &ToString(const string &in)
|
||||
{
|
||||
return in;
|
||||
}
|
||||
|
||||
/** Converts a std::string to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(const std::string &in)
|
||||
{
|
||||
return in;
|
||||
}
|
||||
|
||||
/** Converts a char array to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(const char *in)
|
||||
{
|
||||
return string(in);
|
||||
}
|
||||
|
||||
/** Converts a char to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(char in)
|
||||
{
|
||||
return string(1, static_cast<string::value_type>(in));
|
||||
}
|
||||
|
||||
/** Converts an unsigned char to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(unsigned char in)
|
||||
{
|
||||
return string(1, static_cast<string::value_type>(in));
|
||||
}
|
||||
|
||||
/** Converts a bool to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
inline string ToString(bool in)
|
||||
{
|
||||
return (in ? "1" : "0");
|
||||
}
|
||||
|
||||
/** Converts a type that std::to_string is implemented for to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
template<typename Stringable>
|
||||
inline std::enable_if_t<std::is_arithmetic_v<Stringable>, string> ToString(const Stringable &in)
|
||||
{
|
||||
return std::to_string(in);
|
||||
}
|
||||
|
||||
/** Converts any type to a string.
|
||||
* @param in The value to convert.
|
||||
*/
|
||||
template <class T>
|
||||
inline std::enable_if_t<!std::is_arithmetic_v<T>, string> ToString(const T &in)
|
||||
{
|
||||
return TryString(in).value_or(Anope::string());
|
||||
}
|
||||
}
|
||||
+47
-32
@@ -1,40 +1,55 @@
|
||||
/* Set default values for any constants that should be in include files but
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2010 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*/
|
||||
|
||||
/*************************************************************************/
|
||||
#pragma once
|
||||
|
||||
#ifndef NAME_MAX
|
||||
# define NAME_MAX 255
|
||||
#endif
|
||||
|
||||
#ifndef BUFSIZ
|
||||
# define BUFSIZ 256
|
||||
#else
|
||||
# if BUFSIZ < 256
|
||||
# define BUFSIZ 256
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Length of an array: */
|
||||
#define lenof(a) (sizeof(a) / sizeof(*(a)))
|
||||
|
||||
/* Telling compilers about printf()-like functions: */
|
||||
#ifdef __GNUC__
|
||||
# define FORMAT(type,fmt,start) __attribute__((format(type,fmt,start)))
|
||||
#else
|
||||
# define FORMAT(type,fmt,start)
|
||||
#endif
|
||||
|
||||
/*************************************************************************/
|
||||
class AccessGroup;
|
||||
class AutoKick;
|
||||
class BotInfo;
|
||||
class CallBack;
|
||||
class ChanAccess;
|
||||
class Channel;
|
||||
class ChannelInfo;
|
||||
class ChannelStatus;
|
||||
struct ChanUserContainer;
|
||||
class ClientSocket;
|
||||
class Command;
|
||||
class CommandSource;
|
||||
namespace Configuration { class Conf; }
|
||||
class ConnectionSocket;
|
||||
namespace DNS { struct Query; }
|
||||
class Entry;
|
||||
class IdentifyRequest;
|
||||
class InfoFormatter;
|
||||
class IRCDProto;
|
||||
class ListenSocket;
|
||||
class Log;
|
||||
class Memo;
|
||||
class MessageSource;
|
||||
class Module;
|
||||
class NickAlias;
|
||||
class NickCore;
|
||||
class OperType;
|
||||
class ReferenceBase;
|
||||
class Regex;
|
||||
class Serializable;
|
||||
class Server;
|
||||
class Socket;
|
||||
class Thread;
|
||||
class User;
|
||||
class XLine;
|
||||
class XLineManager;
|
||||
struct BadWord;
|
||||
struct Exception;
|
||||
struct MemoInfo;
|
||||
struct ModeLock;
|
||||
struct Oper;
|
||||
namespace SASL { struct Message; }
|
||||
|
||||
+245
-211
@@ -1,232 +1,266 @@
|
||||
/*
|
||||
*
|
||||
* Copyright (C) 2008-2010 Anope Team <team@anope.org>
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
/** Dummy base class we use to cast everything to/from
|
||||
*/
|
||||
class ExtensibleItemBase
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
#include "serialize.h"
|
||||
#include "service.h"
|
||||
#include "logger.h"
|
||||
|
||||
class Extensible;
|
||||
|
||||
class CoreExport ExtensibleBase
|
||||
: public Service
|
||||
{
|
||||
public:
|
||||
ExtensibleItemBase() { }
|
||||
virtual ~ExtensibleItemBase() { }
|
||||
};
|
||||
protected:
|
||||
std::map<Extensible *, void *> items;
|
||||
|
||||
/** Class used to represent an extensible item that doesn't hold a pointer
|
||||
*/
|
||||
template<typename T> class ExtensibleItemRegular : public ExtensibleItemBase
|
||||
{
|
||||
protected:
|
||||
T Item;
|
||||
ExtensibleBase(Module *m, const Anope::string &n);
|
||||
~ExtensibleBase();
|
||||
|
||||
public:
|
||||
ExtensibleItemRegular(T item) : Item(item) { }
|
||||
virtual ~ExtensibleItemRegular() { }
|
||||
T GetItem() const { return Item; }
|
||||
};
|
||||
public:
|
||||
virtual void Unset(Extensible *obj) = 0;
|
||||
|
||||
/** Class used to represent an extensible item that holds a pointer
|
||||
*/
|
||||
template<typename T> class ExtensibleItemPointer : public ExtensibleItemBase
|
||||
{
|
||||
protected:
|
||||
T *Item;
|
||||
|
||||
public:
|
||||
ExtensibleItemPointer(T *item) : Item(item) { }
|
||||
virtual ~ExtensibleItemPointer() { delete Item; }
|
||||
T *GetItem() const { return Item; }
|
||||
};
|
||||
|
||||
/** Class used to represent an extensible item that holds a pointer to an arrray
|
||||
*/
|
||||
template<typename T> class ExtensibleItemPointerArray : public ExtensibleItemBase
|
||||
{
|
||||
protected:
|
||||
T *Item;
|
||||
|
||||
public:
|
||||
ExtensibleItemPointerArray(T *item) : Item(item) { }
|
||||
virtual ~ExtensibleItemPointerArray() { delete [] Item; }
|
||||
T *GetItem() const { return Item; }
|
||||
/* called when an object we are keep track of is serializing */
|
||||
virtual void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &) const { }
|
||||
virtual void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &) { }
|
||||
};
|
||||
|
||||
class CoreExport Extensible
|
||||
{
|
||||
private:
|
||||
std::map<std::string, ExtensibleItemBase *> Extension_Items;
|
||||
public:
|
||||
std::set<ExtensibleBase *> extension_items;
|
||||
|
||||
public:
|
||||
/** Default constructor, does nothing
|
||||
*/
|
||||
Extensible() { }
|
||||
virtual ~Extensible();
|
||||
|
||||
/** Default destructor, deletes all of the extensible items in this object
|
||||
* then clears the map
|
||||
*/
|
||||
virtual ~Extensible()
|
||||
{
|
||||
for (std::map<std::string, ExtensibleItemBase *>::iterator it = Extension_Items.begin(); it != Extension_Items.end(); ++it)
|
||||
{
|
||||
delete it->second;
|
||||
}
|
||||
Extension_Items.clear();
|
||||
}
|
||||
void UnsetExtensibles();
|
||||
|
||||
/** Extend an Extensible class.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
* @param p This parameter is a pointer to an ExtensibleItem or ExtensibleItemBase derived class
|
||||
*
|
||||
* You must provide a key to store the data as via the parameter 'key'.
|
||||
* The data will be inserted into the map. If the data already exists, you may not insert it
|
||||
* twice, Extensible::Extend will return false in this case.
|
||||
*
|
||||
* @return Returns true on success, false if otherwise
|
||||
*/
|
||||
bool Extend(const std::string &key, ExtensibleItemBase *p)
|
||||
{
|
||||
bool Ret = this->Extension_Items.insert(std::make_pair(key, p)).second;
|
||||
if (!Ret)
|
||||
delete p;
|
||||
return Ret;
|
||||
}
|
||||
template<typename T> T *GetExt(const Anope::string &name) const;
|
||||
bool HasExt(const Anope::string &name) const;
|
||||
|
||||
/** Extend an Extensible class.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
*
|
||||
* You must provide a key to store the data as via the parameter 'key', this single-parameter
|
||||
* version takes no 'data' parameter, this is used purely for boolean values.
|
||||
* The key will be inserted into the map with a NULL 'data' pointer. If the key already exists
|
||||
* then you may not insert it twice, Extensible::Extend will return false in this case.
|
||||
*
|
||||
* @return Returns true on success, false if otherwise
|
||||
*/
|
||||
bool Extend(const std::string &key)
|
||||
{
|
||||
/* This will only add an item if it doesnt already exist,
|
||||
* the return value is a std::pair of an iterator to the
|
||||
* element, and a bool saying if it was actually inserted.
|
||||
*/
|
||||
return this->Extend(key, new ExtensibleItemRegular<char *>(NULL));
|
||||
}
|
||||
|
||||
/** Shrink an Extensible class.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
*
|
||||
* You must provide a key name. The given key name will be removed from the classes data. If
|
||||
* you provide a nonexistent key (case is important) then the function will return false.
|
||||
* @return Returns true on success.
|
||||
*/
|
||||
bool Shrink(const std::string &key)
|
||||
{
|
||||
std::map<std::string, ExtensibleItemBase *>::iterator it = this->Extension_Items.find(key);
|
||||
if (it != this->Extension_Items.end())
|
||||
{
|
||||
delete it->second;
|
||||
/* map::size_type map::erase( const key_type& key );
|
||||
* returns the number of elements removed, std::map
|
||||
* is single-associative so this should only be 0 or 1
|
||||
*/
|
||||
return this->Extension_Items.erase(key);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Get an extension item that is not a pointer.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
* @param p If you provide a non-existent key, this value will be 0. Otherwise a copy to the item you requested will be placed in this templated parameter.
|
||||
* @return Returns true if the item was found and false if it was nor, regardless of wether 'p' is NULL. This allows you to store NULL values in Extensible.
|
||||
*/
|
||||
template<typename T> bool GetExtRegular(const std::string &key, T &p)
|
||||
{
|
||||
std::map<std::string, ExtensibleItemBase *>::iterator it = this->Extension_Items.find(key);
|
||||
|
||||
if (it != this->Extension_Items.end())
|
||||
{
|
||||
p = dynamic_cast<ExtensibleItemRegular<T> *>(it->second)->GetItem();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Get an extension item that is a pointer.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
* * @param p If you provide a non-existent key, this value will be NULL. Otherwise a pointer to the item you requested will be placed in this templated parameter.
|
||||
* @return Returns true if the item was found and false if it was nor, regardless of wether 'p' is NULL. This allows you to store NULL values in Extensible.
|
||||
*/
|
||||
template<typename T> bool GetExtPointer(const std::string &key, T *&p)
|
||||
{
|
||||
std::map<std::string, ExtensibleItemBase *>::iterator it = this->Extension_Items.find(key);
|
||||
|
||||
if (it != this->Extension_Items.end())
|
||||
{
|
||||
p = dynamic_cast<ExtensibleItemPointer<T> *>(it->second)->GetItem();
|
||||
return true;
|
||||
}
|
||||
|
||||
p = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Get an extension item that is a pointer to an array
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
* @param p If you provide a non-existent key, this value will be NULL. Otherwise a pointer to the item you requested will be placed in this templated parameter.
|
||||
* @return Returns true if the item was found and false if it was nor, regardless of wether 'p' is NULL. This allows you to store NULL values in Extensible.
|
||||
*/
|
||||
template<typename T> bool GetExtArray(const std::string &key, T *&p)
|
||||
{
|
||||
std::map<std::string, ExtensibleItemBase *>::iterator it = this->Extension_Items.find(key);
|
||||
|
||||
if (it != this->Extension_Items.end())
|
||||
{
|
||||
p = dynamic_cast<ExtensibleItemPointerArray<T> *>(it->second)->GetItem();
|
||||
return true;
|
||||
}
|
||||
|
||||
p = NULL;
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Get an extension item.
|
||||
*
|
||||
* @param key The key parameter is an arbitary string which identifies the extension data
|
||||
* @return Returns true if the item was found and false if it was not.
|
||||
*
|
||||
* This single-parameter version only checks if the key exists, it does nothing with
|
||||
* the 'data' field and is probably only useful in conjunction with the single-parameter
|
||||
* version of Extend().
|
||||
*/
|
||||
bool GetExt(const std::string &key)
|
||||
{
|
||||
return (this->Extension_Items.find(key) != this->Extension_Items.end());
|
||||
}
|
||||
|
||||
/** Get a list of all extension items names.
|
||||
* @param list A deque of strings to receive the list
|
||||
* @return This function writes a list of all extension items stored
|
||||
* in this object by name into the given deque and returns void.
|
||||
*/
|
||||
void GetExtList(std::deque<std::string> &list)
|
||||
{
|
||||
for (std::map<std::string, ExtensibleItemBase *>::iterator i = Extension_Items.begin(); i != Extension_Items.end(); ++i)
|
||||
{
|
||||
list.push_back(i->first);
|
||||
}
|
||||
}
|
||||
template<typename T> T *Extend(const Anope::string &name, const T &what);
|
||||
template<typename T> T *Extend(const Anope::string &name);
|
||||
template<typename T> T *Require(const Anope::string &name);
|
||||
template<typename T> void Shrink(const Anope::string &name);
|
||||
|
||||
static void ExtensibleSerialize(const Extensible *, const Serializable *, Serialize::Data &data);
|
||||
static void ExtensibleUnserialize(Extensible *, Serializable *, Serialize::Data &data);
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class BaseExtensibleItem
|
||||
: public ExtensibleBase
|
||||
{
|
||||
protected:
|
||||
virtual T *Create(Extensible *) = 0;
|
||||
|
||||
public:
|
||||
BaseExtensibleItem(Module *m, const Anope::string &n) : ExtensibleBase(m, n) { }
|
||||
|
||||
~BaseExtensibleItem()
|
||||
{
|
||||
while (!items.empty())
|
||||
{
|
||||
std::map<Extensible *, void *>::iterator it = items.begin();
|
||||
Extensible *obj = it->first;
|
||||
T *value = static_cast<T *>(it->second);
|
||||
|
||||
obj->extension_items.erase(this);
|
||||
items.erase(it);
|
||||
delete value;
|
||||
}
|
||||
}
|
||||
|
||||
T *Set(Extensible *obj, const T &value)
|
||||
{
|
||||
T *t = Set(obj);
|
||||
if (t)
|
||||
*t = value;
|
||||
return t;
|
||||
}
|
||||
|
||||
T *Set(Extensible *obj)
|
||||
{
|
||||
T *t = Create(obj);
|
||||
Unset(obj);
|
||||
items[obj] = t;
|
||||
obj->extension_items.insert(this);
|
||||
return t;
|
||||
}
|
||||
|
||||
void Unset(Extensible *obj) override
|
||||
{
|
||||
T *value = Get(obj);
|
||||
items.erase(obj);
|
||||
obj->extension_items.erase(this);
|
||||
delete value;
|
||||
}
|
||||
|
||||
T *Get(const Extensible *obj) const
|
||||
{
|
||||
std::map<Extensible *, void *>::const_iterator it = items.find(const_cast<Extensible *>(obj));
|
||||
if (it != items.end())
|
||||
return static_cast<T *>(it->second);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool HasExt(const Extensible *obj) const
|
||||
{
|
||||
return items.find(const_cast<Extensible *>(obj)) != items.end();
|
||||
}
|
||||
|
||||
T *Require(Extensible *obj)
|
||||
{
|
||||
T *t = Get(obj);
|
||||
if (t)
|
||||
return t;
|
||||
|
||||
return Set(obj);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class ExtensibleItem
|
||||
: public BaseExtensibleItem<T>
|
||||
{
|
||||
protected:
|
||||
T *Create(Extensible *obj) override
|
||||
{
|
||||
return new T(obj);
|
||||
}
|
||||
public:
|
||||
ExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class PrimitiveExtensibleItem
|
||||
: public BaseExtensibleItem<T>
|
||||
{
|
||||
protected:
|
||||
T *Create(Extensible *obj) override
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
public:
|
||||
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<T>(m, n) { }
|
||||
};
|
||||
|
||||
template<>
|
||||
class PrimitiveExtensibleItem<bool> : public BaseExtensibleItem<bool>
|
||||
{
|
||||
protected:
|
||||
bool *Create(Extensible *) override
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
public:
|
||||
PrimitiveExtensibleItem(Module *m, const Anope::string &n) : BaseExtensibleItem<bool>(m, n) { }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class SerializableExtensibleItem
|
||||
: public PrimitiveExtensibleItem<T>
|
||||
{
|
||||
public:
|
||||
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<T>(m, n) { }
|
||||
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
|
||||
{
|
||||
T *t = this->Get(e);
|
||||
data.Store(this->name, *t);
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
{
|
||||
T t;
|
||||
if (data[this->name] >> t)
|
||||
this->Set(e, t);
|
||||
else
|
||||
this->Unset(e);
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
class SerializableExtensibleItem<bool> : public PrimitiveExtensibleItem<bool>
|
||||
{
|
||||
public:
|
||||
SerializableExtensibleItem(Module *m, const Anope::string &n) : PrimitiveExtensibleItem<bool>(m, n) { }
|
||||
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
|
||||
{
|
||||
data.Store(this->name, this->HasExt(e));
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
{
|
||||
bool b = false;
|
||||
data[this->name] >> b;
|
||||
if (b)
|
||||
this->Set(e);
|
||||
else
|
||||
this->Unset(e);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
struct ExtensibleRef final
|
||||
: ServiceReference<BaseExtensibleItem<T> >
|
||||
{
|
||||
ExtensibleRef(const Anope::string &n) : ServiceReference<BaseExtensibleItem<T> >("Extensible", n) { }
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
T *Extensible::GetExt(const Anope::string &name) const
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
return ref->Get(this);
|
||||
|
||||
Log(LOG_DEBUG) << "GetExt for nonexistent type " << name << " on " << static_cast<const void *>(this);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T *Extensible::Extend(const Anope::string &name, const T &what)
|
||||
{
|
||||
T *t = Extend<T>(name);
|
||||
if (t)
|
||||
*t = what;
|
||||
return t;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T *Extensible::Extend(const Anope::string &name)
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
return ref->Set(this);
|
||||
|
||||
Log(LOG_DEBUG) << "Extend for nonexistent type " << name << " on " << static_cast<void *>(this);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
T *Extensible::Require(const Anope::string &name)
|
||||
{
|
||||
if (HasExt(name))
|
||||
return GetExt<T>(name);
|
||||
else
|
||||
return Extend<T>(name);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void Extensible::Shrink(const Anope::string &name)
|
||||
{
|
||||
ExtensibleRef<T> ref(name);
|
||||
if (ref)
|
||||
ref->Unset(this);
|
||||
else
|
||||
Log(LOG_DEBUG) << "Shrink for nonexistent type " << name << " on " << static_cast<void *>(this);
|
||||
}
|
||||
|
||||
@@ -1,591 +0,0 @@
|
||||
/* Prototypes and external variable declarations.
|
||||
*
|
||||
* (C) 2003-2010 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for furhter details.
|
||||
*
|
||||
* Based on the original code of Epona by Lara.
|
||||
* Based on the original code of Services by Andy Church.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef EXTERN_H
|
||||
#define EXTERN_H
|
||||
|
||||
#define E extern CoreExport
|
||||
#define EI extern DllExport
|
||||
|
||||
#include "slist.h"
|
||||
#include "hashcomp.h"
|
||||
|
||||
E void ModuleRunTimeDirCleanUp();
|
||||
|
||||
|
||||
E char *uplink;
|
||||
|
||||
/* IRC Variables */
|
||||
|
||||
E IRCDVar *ircd;
|
||||
E int UseTSMODE; /* hack to get around bahamut clones that don't send TSMODE */
|
||||
E IRCDProto *ircdproto;
|
||||
|
||||
/**** actions.c ****/
|
||||
|
||||
E void kill_user(const std::string &source, const std::string &user, const std::string &reason);
|
||||
E bool bad_password(User *u);
|
||||
E void sqline(const std::string &mask, const std::string &reason);
|
||||
E void common_unban(ChannelInfo *ci, const std::string &nick);
|
||||
|
||||
/**** botserv.c ****/
|
||||
|
||||
E BotInfo *botlists[256];
|
||||
E int nbots;
|
||||
E void get_botserv_stats(long *nrec, long *memuse);
|
||||
E void bs_init();
|
||||
E void botserv(User *u, char *buf);
|
||||
E void botmsgs(User *u, BotInfo *bi, char *buf);
|
||||
E void botchanmsgs(User *u, ChannelInfo *ci, char *buf);
|
||||
E BotInfo *findbot(const std::string &nick);
|
||||
|
||||
/** Finds a pseudoclient, given a UID. Useful for TS6 protocol modules.
|
||||
* @param uid The UID to search for
|
||||
* @return The pseudoclient structure, or NULL if one could not be found
|
||||
*/
|
||||
E void bot_join(ChannelInfo *ci);
|
||||
E char *normalizeBuffer(const char *);
|
||||
E void insert_bot(BotInfo * bi);
|
||||
|
||||
E void bot_raw_ban(User * requester, ChannelInfo * ci, char *nick, const char *reason);
|
||||
E void bot_raw_kick(User * requester, ChannelInfo * ci, char *nick, const char *reason);
|
||||
E void bot_raw_mode(User * requester, ChannelInfo * ci, const char *mode, char *nick);
|
||||
|
||||
/**** channels.c ****/
|
||||
|
||||
E Channel *chanlist[1024];
|
||||
|
||||
E void get_channel_stats(long *nrec, long *memuse);
|
||||
E Channel *findchan(const char *chan);
|
||||
E Channel *firstchan();
|
||||
E Channel *nextchan();
|
||||
|
||||
E void ChanSetInternalModes(Channel *c, int ac, const char **av);
|
||||
|
||||
E User *nc_on_chan(Channel * c, NickCore * nc);
|
||||
|
||||
E char *chan_get_modes(Channel * chan, int complete, int plus);
|
||||
|
||||
E int get_access_level(ChannelInfo * ci, NickAlias * na);
|
||||
E const char *get_xop_level(int level);
|
||||
|
||||
E void do_cmode(const char *source, int ac, const char **av);
|
||||
E void do_join(const char *source, int ac, const char **av);
|
||||
E void do_kick(const std::string &source, int ac, const char **av);
|
||||
E void do_part(const char *source, int ac, const char **av);
|
||||
E void do_topic(const char *source, int ac, const char **av);
|
||||
E void MassChannelModes(BotInfo *bi, const std::string &modes);
|
||||
|
||||
E void chan_set_correct_modes(User * user, Channel * c, int give_modes);
|
||||
E void restore_unsynced_topics();
|
||||
|
||||
E Entry *entry_create(char *mask);
|
||||
E Entry *entry_add(EList *list, const char *mask);
|
||||
E void entry_delete(EList *list, Entry *e);
|
||||
E EList *list_create();
|
||||
E int entry_match(Entry *e, const ci::string &nick, const ci::string &user, const ci::string &host, uint32 ip);
|
||||
E int entry_match_mask(Entry *e, const char *mask, uint32 ip);
|
||||
E Entry *elist_match(EList *list, const char *nick, const char *user, const char *host, uint32 ip);
|
||||
E Entry *elist_match_mask(EList *list, const char *mask, uint32 ip);
|
||||
E Entry *elist_match_user(EList *list, User *u);
|
||||
E Entry *elist_find_mask(EList *list, const char *mask);
|
||||
E long get_memuse(EList *list);
|
||||
|
||||
|
||||
#define whosends(ci) ((!(ci) || !((ci)->botflags.HasFlag(BS_SYMBIOSIS)) || !(ci)->bi || !(ci)->c || (ci)->c->users.size() < Config.BSMinUsers) ? findbot(Config.s_ChanServ) : (ci)->bi)
|
||||
|
||||
/**** chanserv.c ****/
|
||||
|
||||
E ChannelInfo *chanlists[256];
|
||||
E LevelInfo levelinfo[];
|
||||
|
||||
E void get_chanserv_stats(long *nrec, long *memuse);
|
||||
|
||||
E void alpha_insert_chan(ChannelInfo * ci);
|
||||
E void reset_levels(ChannelInfo * ci);
|
||||
E void cs_init();
|
||||
E void chanserv(User * u, char *buf);
|
||||
E void expire_chans();
|
||||
E void cs_remove_nick(const NickCore * nc);
|
||||
|
||||
E void check_modes(Channel * c);
|
||||
E int check_valid_admin(User * user, Channel * chan, int servermode);
|
||||
E int check_valid_op(User * user, Channel * chan, int servermode);
|
||||
E int check_should_op(User * user, char *chan);
|
||||
E int check_should_voice(User * user, char *chan);
|
||||
E int check_should_halfop(User * user, char *chan);
|
||||
E int check_should_owner(User * user, char *chan);
|
||||
E int check_should_protect(User * user, char *chan);
|
||||
E void record_topic(const char *chan);
|
||||
E void restore_topic(const char *chan);
|
||||
E int check_topiclock(Channel * c, time_t topic_time);
|
||||
|
||||
E ChannelInfo *cs_findchan(const std::string &chan);
|
||||
E int check_access(User * user, ChannelInfo * ci, int what);
|
||||
E bool IsFounder(User *user, ChannelInfo *ci);
|
||||
E bool IsRealFounder(User *user, ChannelInfo *ci);
|
||||
E int get_access(User *user, ChannelInfo *ci);
|
||||
E void update_cs_lastseen(User * user, ChannelInfo * ci);
|
||||
E int get_idealban(ChannelInfo * ci, User * u, char *ret, int retlen);
|
||||
E AutoKick *is_stuck(ChannelInfo * ci, const char *mask);
|
||||
E void stick_mask(ChannelInfo * ci, AutoKick * akick);
|
||||
E void stick_all(ChannelInfo * ci);
|
||||
|
||||
E int levelinfo_maxwidth;
|
||||
E char *get_mlock_modes(ChannelInfo * ci, int complete);
|
||||
|
||||
/**** compat.c ****/
|
||||
|
||||
#if !HAVE_STRICMP && !HAVE_STRCASECMP
|
||||
E int stricmp(const char *s1, const char *s2);
|
||||
E int strnicmp(const char *s1, const char *s2, size_t len);
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
char *sockstrerror(int error);
|
||||
#endif
|
||||
|
||||
/**** config.c ****/
|
||||
|
||||
E std::string services_conf;
|
||||
E ServerConfig Config;
|
||||
E int read_config(int reload);
|
||||
|
||||
/* hostserv.c */
|
||||
E void do_on_id(User *u);
|
||||
E void hostserv(User *u, char *buf);
|
||||
E void HostServSyncVhosts(NickAlias *na);
|
||||
|
||||
/**** encrypt.c ****/
|
||||
E int enc_encrypt(const std::string &src, std::string &dest);
|
||||
E int enc_encrypt_in_place(std::string &buf);
|
||||
E int enc_decrypt(const std::string &src, std::string &dest);
|
||||
E int enc_check_password(std::string &plaintext, std::string &password);
|
||||
|
||||
/**** hostserv.c ****/
|
||||
E void get_hostserv_stats(long *nrec, long *memuse);
|
||||
E void hostserv_init();
|
||||
|
||||
/**** init.c ****/
|
||||
|
||||
E void introduce_user(const std::string &user);
|
||||
E bool GetCommandLineArgument(const std::string &name, char shortname = 0);
|
||||
E bool GetCommandLineArgument(const std::string &name, char shortname, std::string ¶m);
|
||||
E int init_primary(int ac, char **av);
|
||||
E int init_secondary(int ac, char **av);
|
||||
E Uplink *uplink_server;
|
||||
|
||||
/**** ircd.c ****/
|
||||
E void pmodule_ircd_proto(IRCDProto *);
|
||||
E void pmodule_ircd_var(IRCDVar * ircdvar);
|
||||
E void pmodule_ircd_version(const char *version);
|
||||
E void pmodule_ircd_useTSMode(int use);
|
||||
|
||||
/**** language.c ****/
|
||||
|
||||
E char **langtexts[NUM_LANGS];
|
||||
E char *langnames[NUM_LANGS];
|
||||
E int langlist[NUM_LANGS];
|
||||
|
||||
E void lang_init();
|
||||
E int strftime_lang(char *buf, int size, User * u, int format, struct tm *tm);
|
||||
E void syntax_error(char *service, User * u, const char *command, int msgnum);
|
||||
E const char *getstring(NickAlias *na, int index);
|
||||
E const char *getstring(NickCore *nc, int index);
|
||||
E const char *getstring(User *nc, int index);
|
||||
E const char *getstring(int index);
|
||||
|
||||
|
||||
/**** log.c ****/
|
||||
|
||||
E int open_log();
|
||||
E void close_log();
|
||||
E void log_perror(const char *fmt, ...) FORMAT(printf,1,2);
|
||||
E void fatal(const char *fmt, ...) FORMAT(printf,1,2);
|
||||
E void fatal_perror(const char *fmt, ...) FORMAT(printf,1,2);
|
||||
|
||||
/**** mail.c ****/
|
||||
|
||||
E MailInfo *MailBegin(User *u, NickCore *nc, char *subject, char *service);
|
||||
E MailInfo *MailRegBegin(User *u, NickRequest *nr, char *subject, char *service);
|
||||
E MailInfo *MailMemoBegin(NickCore * nc);
|
||||
E void MailEnd(MailInfo *mail);
|
||||
E void MailReset(User *u, NickCore *nc);
|
||||
E int MailValidate(const char *email);
|
||||
|
||||
/**** main.c ****/
|
||||
|
||||
E const char version_number[];
|
||||
E const char version_number_dotted[];
|
||||
E const char version_build[];
|
||||
E char *version_protocol;
|
||||
E const char version_flags[];
|
||||
|
||||
E std::string services_dir;
|
||||
E std::string log_filename;
|
||||
E int debug;
|
||||
E int readonly;
|
||||
E bool LogChan;
|
||||
E int nofork;
|
||||
E int forceload;
|
||||
E int nothird;
|
||||
E int noexpire;
|
||||
E int protocoldebug;
|
||||
|
||||
E int is44;
|
||||
E int quitting;
|
||||
E int shutting_down;
|
||||
E const char *quitmsg;
|
||||
E int save_data;
|
||||
E int got_alarm;
|
||||
E time_t start_time;
|
||||
|
||||
E Socket *UplinkSock;
|
||||
|
||||
E void save_databases();
|
||||
E void expire_all();
|
||||
E void sighandler(int signum);
|
||||
E void do_restart_services();
|
||||
|
||||
/**** memory.c ****/
|
||||
|
||||
E void *smalloc(long size);
|
||||
E void *scalloc(long elsize, long els);
|
||||
E void *srealloc(void *oldptr, long newsize);
|
||||
E char *sstrdup(const char *s);
|
||||
|
||||
|
||||
/**** memoserv.c ****/
|
||||
|
||||
E void ms_init();
|
||||
E void memoserv(User * u, char *buf);
|
||||
E void check_memos(User * u);
|
||||
E MemoInfo *getmemoinfo(const char *name, int *ischan, int *isforbid);
|
||||
E void memo_send(User * u, const char *name, const char *text, int z);
|
||||
E int delmemo(MemoInfo * mi, int num);
|
||||
|
||||
/**** messages.c ****/
|
||||
|
||||
E int m_nickcoll(const char *user);
|
||||
E int m_away(const char *source, const char *msg);
|
||||
E int m_kill(const std::string &nick, const char *msg);
|
||||
E int m_motd(const char *source);
|
||||
E int m_privmsg(const char *source, const std::string &receiver, const char *msg);
|
||||
E int m_stats(const char *source, int ac, const char **av);
|
||||
E int m_whois(const char *source, const char *who);
|
||||
E int m_time(const char *source, int ac, const char **av);
|
||||
E int m_version(const char *source, int ac, const char **av);
|
||||
|
||||
|
||||
/**** misc.c ****/
|
||||
|
||||
E int toupper(char);
|
||||
E int tolower(char);
|
||||
E char *strscpy(char *d, const char *s, size_t len);
|
||||
#ifndef HAVE_STRLCPY
|
||||
E size_t strlcpy(char *, const char *, size_t);
|
||||
#endif
|
||||
#ifndef HAVE_STRLCAT
|
||||
E size_t strlcat(char *, const char *, size_t);
|
||||
#endif
|
||||
E const char *stristr(const char *s1, const char *s2);
|
||||
E char *strnrepl(char *s, int32 size, const char *old, const char *nstr);
|
||||
E const char *merge_args(int argc, char **argv);
|
||||
E const char *merge_args(int argc, const char **argv);
|
||||
|
||||
E time_t dotime(const char *s);
|
||||
E const char *duration(NickCore *nc, char *buf, int bufsize, time_t seconds);
|
||||
E const char *expire_left(NickCore *nc, char *buf, int len, time_t expires);
|
||||
E int doValidHost(const char *host, int type);
|
||||
|
||||
typedef int (*range_callback_t) (User * u, int num, va_list args);
|
||||
E int process_numlist(const char *numstr, int *count_ret,
|
||||
range_callback_t callback, User * u, ...);
|
||||
|
||||
E int isValidHost(const char *host, int type);
|
||||
E int isvalidchar(const char c);
|
||||
|
||||
E char *myStrGetToken(const char *str, const char dilim, int token_number);
|
||||
E char *myStrGetOnlyToken(const char *str, const char dilim,
|
||||
int token_number);
|
||||
E char *myStrSubString(const char *src, int start, int end);
|
||||
E char *myStrGetTokenRemainder(const char *str, const char dilim,
|
||||
int token_number);
|
||||
E char *stripModePrefix(const char *str);
|
||||
E int myNumToken(const char *str, const char dilim);
|
||||
E void doCleanBuffer(char *str);
|
||||
E void EnforceQlinedNick(const std::string &nick, const char *killer);
|
||||
E int nickIsServices(const char *nick, int bot);
|
||||
|
||||
E void add_entropy_userkeys();
|
||||
E void rand_init();
|
||||
E unsigned char getrandom8();
|
||||
E uint16 getrandom16();
|
||||
E uint32 getrandom32();
|
||||
|
||||
E char *str_signed(unsigned char *str);
|
||||
|
||||
E void ntoa(struct in_addr addr, char *ipaddr, int len);
|
||||
|
||||
E std::list<std::string> BuildStringList(const std::string &);
|
||||
E std::list<ci::string> BuildStringList(const ci::string &);
|
||||
E std::vector<std::string> BuildStringVector(const std::string &);
|
||||
|
||||
E void binary_to_hex(unsigned char *bin, char *hex, int length);
|
||||
|
||||
E uint32 cidr_to_netmask(uint16 cidr);
|
||||
E uint16 netmask_to_cidr(uint32 mask);
|
||||
|
||||
E int str_is_wildcard(const char *str);
|
||||
E int str_is_pure_wildcard(const char *str);
|
||||
|
||||
E uint32 str_is_ip(char *str);
|
||||
E int str_is_cidr(char *str, uint32 * ip, uint32 * mask, char **host);
|
||||
|
||||
/**** modes.cpp ****/
|
||||
/* Number of generic modes we support */
|
||||
E unsigned GenericChannelModes, GenericUserModes;
|
||||
E std::bitset<128> DefMLockOn;
|
||||
E std::bitset<128> DefMLockOff;
|
||||
E std::map<ChannelModeName, std::string> DefMLockParams;
|
||||
/* Modes to set on bots when they join the channel */
|
||||
E std::list<ChannelModeStatus *> BotModes;
|
||||
E void SetDefaultMLock();
|
||||
|
||||
/**** modules.c ****/
|
||||
E void modules_unload_all(bool unload_proto); /* Read warnings near function source */
|
||||
|
||||
/**** nickserv.c ****/
|
||||
|
||||
E NickAlias *nalists[1024];
|
||||
E NickCore *nclists[1024];
|
||||
E NickRequest *nrlists[1024];
|
||||
E NickRequest *findrequestnick(const char *nick);
|
||||
E void insert_requestnick(NickRequest * nr);
|
||||
E void alpha_insert_alias(NickAlias * na);
|
||||
E void insert_core(NickCore * nc);
|
||||
E void get_aliases_stats(long *nrec, long *memuse);
|
||||
E void get_core_stats(long *nrec, long *memuse);
|
||||
E void change_core_display(NickCore * nc);
|
||||
E void change_core_display(NickCore * nc, const char *newdisplay);
|
||||
E int do_setmodes(User * u);
|
||||
|
||||
E void ns_init();
|
||||
E void nickserv(User * u, char *buf);
|
||||
E int validate_user(User * u);
|
||||
E void expire_nicks();
|
||||
E void expire_requests();
|
||||
E NickAlias *findnick(const char *nick);
|
||||
E NickAlias *findnick(const std::string &nick);
|
||||
E NickCore *findcore(const char *nick);
|
||||
E bool is_on_access(User *u, NickCore *nc);
|
||||
|
||||
/**** operserv.c ****/
|
||||
|
||||
E SList akills, sglines, sqlines, szlines;
|
||||
|
||||
E int DefConModesSet;
|
||||
E Flags<ChannelModeName> DefConModesOn;
|
||||
E Flags<ChannelModeName> DefConModesOff;
|
||||
E std::map<ChannelModeName, std::string> DefConModesOnParams;
|
||||
E bool SetDefConParam(ChannelModeName, std::string &);
|
||||
E bool GetDefConParam(ChannelModeName, std::string *);
|
||||
E void UnsetDefConParam(ChannelModeName);
|
||||
|
||||
E void operserv(User *u, char *buf);
|
||||
E void os_init();
|
||||
|
||||
E int add_akill(User *u, const char *mask, const char *by, const time_t expires, const char *reason);
|
||||
E int check_akill(const char *nick, const char *username, const char *host, const char *vhost, const char *ip);
|
||||
E void expire_akills();
|
||||
E void oper_global(char *nick, const char *fmt, ...);
|
||||
|
||||
E int add_sgline(User *u, const char *mask, const char *by, time_t expires, const char *reason);
|
||||
E int check_sgline(const char *nick, const char *realname);
|
||||
E void expire_sglines();
|
||||
|
||||
E int add_sqline(User *u, const char *mask, const char *by, time_t expires, const char *reason);
|
||||
E int check_sqline(const char *nick, int nick_change);
|
||||
E void expire_sqlines();
|
||||
E int check_chan_sqline(const char *chan);
|
||||
|
||||
E int add_szline(User * u, const char *mask, const char *by,
|
||||
time_t expires, const char *reason);
|
||||
E void expire_szlines();
|
||||
E int check_szline(const char *nick, char *ip);
|
||||
|
||||
E Server *server_global(Server * s, char *msg);
|
||||
|
||||
E std::vector<NewsItem *> News;
|
||||
|
||||
E bool CheckDefCon(DefconLevel Level);
|
||||
E bool CheckDefCon(int level, DefconLevel Level);
|
||||
E void AddDefCon(int level, DefconLevel Level);
|
||||
E void DelDefCon(int level, DefconLevel Level);
|
||||
E std::vector<std::bitset<32> > DefCon;
|
||||
|
||||
/**** process.c ****/
|
||||
|
||||
E int allow_ignore;
|
||||
E IgnoreData *ignore;
|
||||
|
||||
E void add_ignore(const char *nick, time_t delta);
|
||||
E IgnoreData *get_ignore(const char *nick);
|
||||
E int delete_ignore(const char *nick);
|
||||
E int clear_ignores();
|
||||
|
||||
E int split_buf(char *buf, const char ***argv, int colon_special);
|
||||
E void process(const std::string &buf);
|
||||
|
||||
/**** send.c ****/
|
||||
|
||||
E void send_cmd(const char *source, const char *fmt, ...) FORMAT(printf,2,3);
|
||||
E void send_cmd(const std::string &source, const char *fmt, ...) FORMAT(printf,2,3);
|
||||
|
||||
E void notice_server(char *source, Server * s, const char *fmt, ...)
|
||||
FORMAT(printf,3,4);
|
||||
|
||||
E void notice_list(const char *source, const char *dest, char **text); // MARK_DEPRECATED;
|
||||
E void notice_lang(const std::string &source, User *dest, int message, ...); // MARK_DEPRECATED;
|
||||
E void notice_help(const char *source, User *dest, int message, ...); // MARK_DEPRECATED;
|
||||
|
||||
|
||||
/**** servers.c ****/
|
||||
|
||||
E Server *servlist;
|
||||
E Server *me_server;
|
||||
E Server *serv_uplink;
|
||||
E Flags<CapabType> Capab;
|
||||
E CapabInfo Capab_Info[];
|
||||
|
||||
E Server *first_server(ServerFlag flag);
|
||||
E Server *next_server(ServerFlag flag);
|
||||
|
||||
E void CapabParse(int ac, const char **av);
|
||||
E int is_ulined(const char *server);
|
||||
E int is_sync(Server *server);
|
||||
|
||||
E Server *new_server(Server * uplink, const char *name, const char *desc, ServerFlag flag, const std::string &suid);
|
||||
|
||||
E Server *findserver(Server *s, const char *name);
|
||||
|
||||
E void do_server(const char *source, const char *servername, const char *hops, const char *descript, const std::string &numeric);
|
||||
E void do_squit(const char *source, int ac, const char **av);
|
||||
E int anope_check_sync(const char *name);
|
||||
|
||||
E void finish_sync(Server *serv, int sync_links);
|
||||
|
||||
E void ts6_uid_init();
|
||||
E void ts6_uid_increment(unsigned int slot);
|
||||
E const char *ts6_uid_retrieve();
|
||||
|
||||
E const char *ts6_sid_retrieve();
|
||||
|
||||
/**** sessions.c ****/
|
||||
|
||||
E Exception *exceptions;
|
||||
E int16 nexceptions;
|
||||
|
||||
E Session *sessionlist[1024];
|
||||
E int32 nsessions;
|
||||
|
||||
E void get_session_stats(long *nrec, long *memuse);
|
||||
E void get_exception_stats(long *nrec, long *memuse);
|
||||
|
||||
E int add_session(const char *nick, const char *host, char *hostip);
|
||||
E void del_session(const char *host);
|
||||
|
||||
E void expire_exceptions();
|
||||
|
||||
E Session *findsession(const char *host);
|
||||
|
||||
E Exception *find_host_exception(const char *host);
|
||||
E Exception *find_hostip_exception(const char *host, const char *hostip);
|
||||
E int exception_add(User * u, const char *mask, const int limit,
|
||||
const char *reason, const char *who,
|
||||
const time_t expires);
|
||||
|
||||
/**** slist.c ****/
|
||||
E int slist_add(SList *slist, void *item);
|
||||
E void slist_clear(SList *slist, int free);
|
||||
E int slist_delete(SList *slist, int index);
|
||||
E int slist_delete_range(SList *slist, const char *range, slist_delcheckcb_t cb, ...);
|
||||
E int slist_enum(SList *slist, const char *range, slist_enumcb_t cb, ...);
|
||||
E int slist_full(SList *slist);
|
||||
E int slist_indexof(SList *slist, void *item);
|
||||
E void slist_init(SList *slist);
|
||||
E void slist_pack(SList *slist);
|
||||
E int slist_remove(SList *slist, void *item);
|
||||
E int slist_setcapacity(SList *slist, int16 capacity);
|
||||
|
||||
/**** sockets.cpp ****/
|
||||
E SocketEngine socketEngine;
|
||||
E int32 TotalRead;
|
||||
E int32 TotalWritten;
|
||||
|
||||
/**** users.c ****/
|
||||
|
||||
E User *userlist[1024];
|
||||
|
||||
E int32 opcnt;
|
||||
E uint32 maxusercnt, usercnt;
|
||||
E time_t maxusertime;
|
||||
|
||||
E void get_user_stats(long *nusers, long *memuse);
|
||||
E User *finduser(const std::string &nick);
|
||||
E User *firstuser();
|
||||
E User *nextuser();
|
||||
|
||||
E User *find_byuid(const std::string &uid);
|
||||
E User *first_uid();
|
||||
E User *next_uid();
|
||||
E Server *findserver_uid(Server * s, const char *name);
|
||||
E char *TS6SID;
|
||||
E char *TS6UPLINK;
|
||||
|
||||
E User *do_nick(const char *source, const char *nick, const char *username, const char *host,
|
||||
const char *server, const char *realname, time_t ts, uint32 ip, const char *vhost, const char *uid);
|
||||
|
||||
E void do_umode(const char *source, int ac, const char **av);
|
||||
E void do_quit(const char *source, int ac, const char **av);
|
||||
E void do_kill(const std::string &source, const std::string &reason);
|
||||
|
||||
E int is_oper(User * user);
|
||||
E int is_protected(User * user);
|
||||
|
||||
E int is_excepted(ChannelInfo * ci, User * user);
|
||||
E int is_excepted_mask(ChannelInfo * ci, const char *mask);
|
||||
|
||||
E int match_usermask(const char *mask, User * user);
|
||||
E char *create_mask(User * u);
|
||||
|
||||
E void UserSetInternalModes(User *user, int ac, const char **av);
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
E const char *base64enc(long i);
|
||||
E long base64dec(const char *b64);
|
||||
E long base64dects(const char *ts);
|
||||
E int b64_encode(const char *src, size_t srclength, char *target, size_t targsize);
|
||||
E int b64_decode(const char *src, char *target, size_t targsize);
|
||||
E const char *encode_ip(unsigned char *ip);
|
||||
E int decode_ip(const char *buf);
|
||||
|
||||
E char *host_resolve(char *host);
|
||||
|
||||
#ifdef _WIN32
|
||||
E char *GetWindowsVersion() ;
|
||||
E int SupportedWindowsVersion();
|
||||
#endif
|
||||
|
||||
#endif /* EXTERN_H */
|
||||
+72
-354
@@ -1,135 +1,78 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2010 InspIRCd Development Team
|
||||
* Copyright (C) 2009-2010 Anope Team <team@anope.org>
|
||||
*
|
||||
* (C) 2002-2011 InspIRCd Development Team
|
||||
* (C) 2009-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*
|
||||
* These classes have been copied from InspIRCd and modified
|
||||
* for use in Anope.
|
||||
*
|
||||
* $Id$
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _HASHCOMP_H_
|
||||
#define _HASHCOMP_H_
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <locale>
|
||||
#include <unordered_map>
|
||||
|
||||
/*******************************************************
|
||||
* This file contains classes and templates that deal
|
||||
* with the comparison and hashing of 'irc strings'.
|
||||
* An 'irc string' is a string which compares in a
|
||||
* case insensitive manner, and as per RFC 1459 will
|
||||
* treat [ identical to {, ] identical to }, and \
|
||||
* as identical to |.
|
||||
*
|
||||
* Our hashing functions are designed to accept
|
||||
* std::string and compare/hash them as type irc::string
|
||||
* by converting them internally. This makes them
|
||||
* backwards compatible with other code which is not
|
||||
* aware of irc::string.
|
||||
*******************************************************/
|
||||
#include "services.h"
|
||||
|
||||
#ifndef LOWERMAP
|
||||
#define LOWERMAP
|
||||
|
||||
/** A mapping of uppercase to lowercase, including scandinavian
|
||||
* 'oddities' as specified by RFC1459, e.g. { -> [, and | -> \
|
||||
*/
|
||||
unsigned const char rfc_case_insensitive_map[256] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 0-19 */
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, /* 20-39 */
|
||||
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, /* 40-59 */
|
||||
60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, /* 60-79 */
|
||||
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 94, 95, 96, 97, 98, 99, /* 80-99 */
|
||||
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, /* 100-119 */
|
||||
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, /* 120-139 */
|
||||
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, /* 140-159 */
|
||||
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, /* 160-179 */
|
||||
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, /* 180-199 */
|
||||
200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, /* 200-219 */
|
||||
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, /* 220-239 */
|
||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 /* 240-255 */
|
||||
};
|
||||
|
||||
/** Case insensitive map, ASCII rules.
|
||||
* That is;
|
||||
* [ != {, but A == a.
|
||||
*/
|
||||
unsigned const char ascii_case_insensitive_map[256] = {
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 0-19 */
|
||||
20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, /* 20-39 */
|
||||
40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, /* 40-59 */
|
||||
60, 61, 62, 63, 64, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, /* 60-79 */
|
||||
112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 91, 92, 93, 94, 95, 96, 97, 98, 99, /* 80-99 */
|
||||
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, /* 100-119 */
|
||||
120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, /* 120-139 */
|
||||
140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, /* 140-159 */
|
||||
160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, /* 160-179 */
|
||||
180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, /* 180-199 */
|
||||
200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, /* 200-219 */
|
||||
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, /* 220-239 */
|
||||
240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255 /* 240-255 */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/** The irc namespace contains a number of helper classes.
|
||||
*/
|
||||
namespace irc
|
||||
namespace Anope
|
||||
{
|
||||
/** The irc_char_traits class is used for RFC-style comparison of strings.
|
||||
* This class is used to implement irc::string, a case-insensitive, RFC-
|
||||
* comparing string class.
|
||||
*/
|
||||
struct irc_char_traits : std::char_traits<char>
|
||||
class string;
|
||||
|
||||
/* Casemap in use by Anope. ci::string's comparison functions use this (and thus Anope::string) */
|
||||
extern std::locale casemap;
|
||||
|
||||
extern CoreExport void CaseMapRebuild();
|
||||
extern CoreExport unsigned char tolower(unsigned char);
|
||||
extern CoreExport unsigned char toupper(unsigned char);
|
||||
|
||||
/* ASCII case insensitive ctype. */
|
||||
template<typename char_type>
|
||||
class ascii_ctype
|
||||
: public std::ctype<char_type>
|
||||
{
|
||||
/** Check if two chars match.
|
||||
* @param c1st First character
|
||||
* @param c2nd Second character
|
||||
* @return true if the characters are equal
|
||||
*/
|
||||
static bool eq(char c1st, char c2nd);
|
||||
public:
|
||||
char_type do_toupper(char_type c) const override
|
||||
{
|
||||
if (c >= 'a' && c <= 'z')
|
||||
return c - 32;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
|
||||
/** Check if two chars do NOT match.
|
||||
* @param c1st First character
|
||||
* @param c2nd Second character
|
||||
* @return true if the characters are unequal
|
||||
*/
|
||||
static bool ne(char c1st, char c2nd);
|
||||
|
||||
/** Check if one char is less than another.
|
||||
* @param c1st First character
|
||||
* @param c2nd Second character
|
||||
* @return true if c1st is less than c2nd
|
||||
*/
|
||||
static bool lt(char c1st, char c2nd);
|
||||
|
||||
/** Compare two strings of size n.
|
||||
* @param str1 First string
|
||||
* @param str2 Second string
|
||||
* @param n Length to compare to
|
||||
* @return similar to strcmp, zero for equal, less than zero for str1
|
||||
* being less and greater than zero for str1 being greater than str2.
|
||||
*/
|
||||
static int compare(const char *str1, const char *str2, size_t n);
|
||||
|
||||
/** Find a char within a string up to position n.
|
||||
* @param s1 String to find in
|
||||
* @param n Position to search up to
|
||||
* @param c Character to search for
|
||||
* @return Pointer to the first occurance of c in s1
|
||||
*/
|
||||
static const char *find(const char *s1, int n, char c);
|
||||
char_type do_tolower(char_type c) const override
|
||||
{
|
||||
if (c >= 'A' && c <= 'Z')
|
||||
return c + 32;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
};
|
||||
|
||||
/** This typedef declares irc::string based upon irc_char_traits.
|
||||
*/
|
||||
typedef std::basic_string<char, irc_char_traits, std::allocator<char> > string;
|
||||
/* rfc1459 case insensitive ctype, { = [, } = ], and | = \ */
|
||||
template<typename char_type>
|
||||
class rfc1459_ctype final
|
||||
: public ascii_ctype<char_type>
|
||||
{
|
||||
public:
|
||||
char_type do_toupper(char_type c) const override
|
||||
{
|
||||
if (c == '{' || c == '}' || c == '|')
|
||||
return c - 32;
|
||||
else
|
||||
return ascii_ctype<char_type>::do_toupper(c);
|
||||
}
|
||||
|
||||
char_type do_tolower(char_type c) const override
|
||||
{
|
||||
if (c == '[' || c == ']' || c == '\\')
|
||||
return c + 32;
|
||||
else
|
||||
return ascii_ctype<char_type>::do_tolower(c);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/** The ci namespace contains a number of helper classes.
|
||||
/** The ci namespace contains a number of helper classes relevant to case insensitive strings.
|
||||
*/
|
||||
namespace ci
|
||||
{
|
||||
@@ -137,7 +80,8 @@ namespace ci
|
||||
* This class is used to implement ci::string, a case-insensitive, ASCII-
|
||||
* comparing string class.
|
||||
*/
|
||||
struct CoreExport ci_char_traits : std::char_traits<char>
|
||||
struct CoreExport ci_char_traits final
|
||||
: std::char_traits<char>
|
||||
{
|
||||
/** Check if two chars match.
|
||||
* @param c1st First character
|
||||
@@ -173,7 +117,7 @@ namespace ci
|
||||
* @param s1 String to find in
|
||||
* @param n Position to search up to
|
||||
* @param c Character to search for
|
||||
* @return Pointer to the first occurance of c in s1
|
||||
* @return Pointer to the first occurrence of c in s1
|
||||
*/
|
||||
static const char *find(const char *s1, int n, char c);
|
||||
};
|
||||
@@ -181,58 +125,16 @@ namespace ci
|
||||
/** This typedef declares ci::string based upon ci_char_traits.
|
||||
*/
|
||||
typedef std::basic_string<char, ci_char_traits, std::allocator<char> > string;
|
||||
}
|
||||
|
||||
/* Define operators for using >> and << with irc::string to an ostream on an istream. */
|
||||
/* This was endless fun. No. Really. */
|
||||
/* It was also the first core change Ommeh made, if anyone cares */
|
||||
|
||||
/** Operator << for irc::string
|
||||
*/
|
||||
inline std::ostream &operator<<(std::ostream &os, const irc::string &str) { return os << std::string(str.c_str()); }
|
||||
|
||||
/** Operator >> for irc::string
|
||||
*/
|
||||
inline std::istream &operator>>(std::istream &is, irc::string &str)
|
||||
{
|
||||
std::string tmp;
|
||||
is >> tmp;
|
||||
str = tmp.c_str();
|
||||
return is;
|
||||
}
|
||||
|
||||
/** Operator << for ci::string
|
||||
*/
|
||||
inline std::ostream &operator<<(std::ostream &os, const ci::string &str) { return os << std::string(str.c_str()); }
|
||||
|
||||
/** Operator >> for ci::string
|
||||
*/
|
||||
inline std::istream &operator>>(std::istream &is, ci::string &str)
|
||||
{
|
||||
std::string tmp;
|
||||
is >> tmp;
|
||||
str = tmp.c_str();
|
||||
return is;
|
||||
}
|
||||
|
||||
/* Define operators for + and == with irc::string to std::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator +
|
||||
*/
|
||||
inline std::string operator+(std::string &leftval, irc::string &rightval)
|
||||
{
|
||||
return leftval + std::string(rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators for + and == with irc::string to std::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator +
|
||||
*/
|
||||
inline irc::string operator+(irc::string &leftval, std::string &rightval)
|
||||
{
|
||||
return leftval + irc::string(rightval.c_str());
|
||||
struct CoreExport less final
|
||||
{
|
||||
/** Compare two Anope::strings as ci::strings and find which one is less
|
||||
* @param s1 The first string
|
||||
* @param s2 The second string
|
||||
* @return true if s1 < s2, else false
|
||||
*/
|
||||
bool operator()(const Anope::string &s1, const Anope::string &s2) const;
|
||||
};
|
||||
}
|
||||
|
||||
/* Define operators for + and == with ci::string to std::string for easy assignment
|
||||
@@ -255,46 +157,6 @@ inline ci::string operator+(ci::string &leftval, std::string &rightval)
|
||||
return leftval + ci::string(rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators for + and == with irc::string to ci::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator +
|
||||
*/
|
||||
inline irc::string operator+(irc::string &leftval, ci::string &rightval)
|
||||
{
|
||||
return leftval + irc::string(rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators for + and == with irc::string to ci::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator +
|
||||
*/
|
||||
inline ci::string operator+(ci::string &leftval, irc::string &rightval)
|
||||
{
|
||||
return leftval + ci::string(rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators for + and == with irc::string to std::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator ==
|
||||
*/
|
||||
inline bool operator==(const std::string &leftval, const irc::string &rightval)
|
||||
{
|
||||
return leftval.c_str() == rightval;
|
||||
}
|
||||
|
||||
/* Define operators for + and == with irc::string to std::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator ==
|
||||
*/
|
||||
inline bool operator==(const irc::string &leftval, const std::string &rightval)
|
||||
{
|
||||
return leftval == rightval.c_str();
|
||||
}
|
||||
|
||||
/* Define operators for + and == with ci::string to std::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
@@ -315,40 +177,6 @@ inline bool operator==(const ci::string &leftval, const std::string &rightval)
|
||||
return leftval == rightval.c_str();
|
||||
}
|
||||
|
||||
/* Define operators for + and == with irc::string to ci::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator ==
|
||||
*/
|
||||
inline bool operator==(const ci::string &leftval, const irc::string &rightval)
|
||||
{
|
||||
return leftval.c_str() == rightval;
|
||||
}
|
||||
|
||||
/* Define operators for + and == with irc::string to ci::string for easy assignment
|
||||
* and comparison
|
||||
*
|
||||
* Operator ==
|
||||
*/
|
||||
inline bool operator==(const irc::string &leftval, const ci::string &rightval)
|
||||
{
|
||||
return leftval == rightval.c_str();
|
||||
}
|
||||
|
||||
/* Define operators != for irc::string to std::string for easy comparison
|
||||
*/
|
||||
inline bool operator!=(const irc::string &leftval, const std::string &rightval)
|
||||
{
|
||||
return !(leftval == rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators != for std::string to irc::string for easy comparison
|
||||
*/
|
||||
inline bool operator!=(const std::string &leftval, const irc::string &rightval)
|
||||
{
|
||||
return !(leftval.c_str() == rightval);
|
||||
}
|
||||
|
||||
/* Define operators != for ci::string to std::string for easy comparison
|
||||
*/
|
||||
inline bool operator!=(const ci::string &leftval, const std::string &rightval)
|
||||
@@ -356,119 +184,9 @@ inline bool operator!=(const ci::string &leftval, const std::string &rightval)
|
||||
return !(leftval == rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators != for ci::string to irc::string for easy comparison
|
||||
/* Define operators != for std::string to ci::string for easy comparison
|
||||
*/
|
||||
inline bool operator!=(const std::string &leftval, const ci::string &rightval)
|
||||
{
|
||||
return !(leftval.c_str() == rightval);
|
||||
}
|
||||
|
||||
/* Define operators != for irc::string to ci::string for easy comparison
|
||||
*/
|
||||
inline bool operator!=(const irc::string &leftval, const ci::string &rightval)
|
||||
{
|
||||
return !(leftval == rightval.c_str());
|
||||
}
|
||||
|
||||
/* Define operators != for irc::string to ci::string for easy comparison
|
||||
*/
|
||||
inline bool operator!=(const ci::string &leftval, const irc::string &rightval)
|
||||
{
|
||||
return !(leftval.c_str() == rightval);
|
||||
}
|
||||
|
||||
/** Assign an irc::string to a std::string.
|
||||
*/
|
||||
//inline std::string assign(const irc::string &other) { return other.c_str(); }
|
||||
|
||||
/** Assign a std::string to an irc::string.
|
||||
*/
|
||||
//inline irc::string assign(const std::string &other) { return other.c_str(); }
|
||||
|
||||
/** Assign an ci::string to a std::string.
|
||||
*/
|
||||
//inline std::string assign(const ci::string &other) { return other.c_str(); }
|
||||
|
||||
/** Assign a std::string to an ci::string.
|
||||
*/
|
||||
//inline ci::string assign(const std::string &other) { return other.c_str(); }
|
||||
|
||||
/** Assign an irc::string to a ci::string.
|
||||
*/
|
||||
//inline ci::string assign(const irc::string &other) { return other.c_str(); }
|
||||
|
||||
/** Assign a ci::string to an irc::string.
|
||||
*/
|
||||
//inline irc::string assign(const ci::string &other) { return other.c_str(); }
|
||||
|
||||
/** sepstream allows for splitting token seperated lists.
|
||||
* Each successive call to sepstream::GetToken() returns
|
||||
* the next token, until none remain, at which point the method returns
|
||||
* an empty string.
|
||||
*/
|
||||
class CoreExport sepstream
|
||||
{
|
||||
private:
|
||||
/** Original string.
|
||||
*/
|
||||
std::string tokens;
|
||||
/** Last position of a seperator token
|
||||
*/
|
||||
std::string::iterator last_starting_position;
|
||||
/** Current string position
|
||||
*/
|
||||
std::string::iterator n;
|
||||
/** Seperator value
|
||||
*/
|
||||
char sep;
|
||||
public:
|
||||
/** Create a sepstream and fill it with the provided data
|
||||
*/
|
||||
sepstream(const std::string &source, char seperator);
|
||||
sepstream(const ci::string &source, char seperator);
|
||||
sepstream(const char *source, char seperator);
|
||||
virtual ~sepstream() { }
|
||||
|
||||
/** Fetch the next token from the stream
|
||||
* @param token The next token from the stream is placed here
|
||||
* @return True if tokens still remain, false if there are none left
|
||||
*/
|
||||
virtual bool GetToken(std::string &token);
|
||||
virtual bool GetToken(ci::string &token);
|
||||
|
||||
/** Fetch the entire remaining stream, without tokenizing
|
||||
* @return The remaining part of the stream
|
||||
*/
|
||||
virtual const std::string GetRemaining();
|
||||
|
||||
/** Returns true if the end of the stream has been reached
|
||||
* @return True if the end of the stream has been reached, otherwise false
|
||||
*/
|
||||
virtual bool StreamEnd();
|
||||
};
|
||||
|
||||
/** A derived form of sepstream, which seperates on commas
|
||||
*/
|
||||
class commasepstream : public sepstream
|
||||
{
|
||||
public:
|
||||
/** Initialize with comma seperator
|
||||
*/
|
||||
commasepstream(const std::string &source) : sepstream(source, ',') { }
|
||||
commasepstream(const ci::string &source) : sepstream(source, ',') { }
|
||||
commasepstream(const char *source) : sepstream(source, ',') { }
|
||||
};
|
||||
|
||||
/** A derived form of sepstream, which seperates on spaces
|
||||
*/
|
||||
class spacesepstream : public sepstream
|
||||
{
|
||||
public:
|
||||
/** Initialize with space seperator
|
||||
*/
|
||||
spacesepstream(const std::string &source) : sepstream(source, ' ') { }
|
||||
spacesepstream(const ci::string &source) : sepstream(source, ' ') { }
|
||||
spacesepstream(const char *source) : sepstream(source, ' ') { }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
|
||||
namespace Language
|
||||
{
|
||||
|
||||
/* Languages we support as configured in anope.conf. They are
|
||||
* added to this list if we detect a language exists in the correct
|
||||
* location for each language.
|
||||
*/
|
||||
extern CoreExport std::vector<Anope::string> Languages;
|
||||
|
||||
/* Domains to search when looking for translations other than the
|
||||
* default "anope domain. This is used by modules who add their own
|
||||
* language files (and thus domains) to Anope. If a module is loaded
|
||||
* and we detect a language file exists for at least one of the supported
|
||||
* languages for the module, then we add the module's domain (its name)
|
||||
* here.
|
||||
*
|
||||
* When strings are translated they are checked against all domains.
|
||||
*/
|
||||
extern std::vector<Anope::string> Domains;
|
||||
|
||||
/** Initialize the language system. Finds valid language files and
|
||||
* populates the Languages list.
|
||||
*/
|
||||
extern void InitLanguages();
|
||||
|
||||
/** Translates a string to the default language.
|
||||
* @param string A string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(const char *string);
|
||||
|
||||
/** Translates a string to the language of the given user.
|
||||
* @param u The user to translate the string for
|
||||
* @param string A string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(User *u, const char *string);
|
||||
|
||||
/** Translates a string to the language of the given account.
|
||||
* @param nc The account to translate the string for
|
||||
* @param string A string to translate
|
||||
* @return The translated string if count, else the original string
|
||||
*/
|
||||
extern CoreExport const char *Translate(const NickCore *nc, const char *string);
|
||||
|
||||
/** Translates a string to the given language.
|
||||
* @param lang The language to translate to
|
||||
* @param string The string to translate
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(const char *lang, const char *string);
|
||||
|
||||
/** Translates a plural string to the default language.
|
||||
* @param count The number of items the string is counting.
|
||||
* @param singular The string to translate if there is one of \p count
|
||||
* @param plural The string to translate if there is multiple of \p count
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(int count, const char *singular, const char *plural);
|
||||
|
||||
/** Translates a plural string to the language of the given user.
|
||||
* @param u The user to translate the string for
|
||||
* @param count The number of items the string is counting.
|
||||
* @param singular The string to translate if there is one of \p count
|
||||
* @param plural The string to translate if there is multiple of \p count
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(User *u, int count, const char *singular, const char *plural);
|
||||
|
||||
/** Translates a plural string to the language of the given account.
|
||||
* @param nc The account to translate the string for
|
||||
* @param count The number of items the string is counting.
|
||||
* @param singular The string to translate if there is one of \p count
|
||||
* @param plural The string to translate if there is multiple of \p count
|
||||
* @return The translated string if count, else the original string
|
||||
*/
|
||||
extern CoreExport const char *Translate(const NickCore *nc, int count, const char *singular, const char *plural);
|
||||
|
||||
/** Translates a plural string to the given language.
|
||||
* @param lang The language to translate to
|
||||
* @param count The number of items the string is counting.
|
||||
* @param singular The string to translate if there is one of \p count
|
||||
* @param plural The string to translate if there is multiple of \p count
|
||||
* @return The translated string if found, else the original string.
|
||||
*/
|
||||
extern CoreExport const char *Translate(const char *lang, int count, const char *singular, const char *plural);
|
||||
|
||||
} // namespace Language
|
||||
|
||||
/* Commonly used language strings */
|
||||
#define CONFIRM_DROP _("Please confirm that you want to drop \002%s\002 with \002%s\032%s\032%s\002")
|
||||
#define SERVICE_UNAVAILABLE _("Sorry, %s is temporarily unavailable.")
|
||||
#define MORE_INFO _("\002%s\002 for more information.")
|
||||
#define BAD_USERHOST_MASK _("Mask must be in the form \037user\037@\037host\037.")
|
||||
#define BAD_EXPIRY_TIME _("Invalid expiry time.")
|
||||
#define USERHOST_MASK_TOO_WIDE _("%s coverage is too wide; Please use a more specific mask.")
|
||||
#define READ_ONLY_MODE _("Services are temporarily in read-only mode.")
|
||||
#define PASSWORD_INCORRECT _("Password incorrect.")
|
||||
#define ACCESS_DENIED _("Access denied.")
|
||||
#define MORE_OBSCURE_PASSWORD _("Please try again with a more obscure password. Passwords should not be " \
|
||||
"something that could be easily guessed (e.g. your real name or your nick) and " \
|
||||
"cannot contain the space or tab characters.")
|
||||
#define PASSWORD_TOO_SHORT _("Your password is too short. It must be longer than %u characters.")
|
||||
#define PASSWORD_TOO_LONG _("Your password is too long. It must be shorter than %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.")
|
||||
#define NICK_X_NOT_ON_CHAN _("\002%s\002 is not currently on channel %s.")
|
||||
#define NICK_X_SUSPENDED _("Nick %s is currently suspended.")
|
||||
#define CHAN_X_SUSPENDED _("Channel %s is currently suspended.")
|
||||
#define CHAN_X_NOT_REGISTERED _("Channel \002%s\002 isn't registered.")
|
||||
#define CHAN_X_NOT_IN_USE _("Channel \002%s\002 doesn't exist.")
|
||||
#define NICK_IDENTIFY_REQUIRED _("You must be logged into an account to use that command.")
|
||||
#define MAIL_X_INVALID _("\002%s\002 is not a valid email address.")
|
||||
#define UNKNOWN _("<unknown>")
|
||||
#define NO_EXPIRE _("does not expire")
|
||||
#define LIST_INCORRECT_RANGE _("Incorrect range specified. The correct syntax is \002#\037from\037-\037to\037\002.")
|
||||
#define NICK_IS_SECURE _("This nickname is registered and protected. If it is your " \
|
||||
"nick, type \002%s\032\037password\037\002. Otherwise, " \
|
||||
"please choose a different nick.")
|
||||
#define FORCENICKCHANGE_NOW _("This nickname has been registered; you may not use it.")
|
||||
#define NICK_CANNOT_BE_REGISTERED _("Nickname \002%s\002 may not be registered.")
|
||||
#define NICK_ALREADY_REGISTERED _("Nickname \002%s\002 is already registered!")
|
||||
#define NICK_SET_DISPLAY_CHANGED _("The new display is now \002%s\002.")
|
||||
#define NICK_CONFIRM_INVALID _("Invalid passcode has been entered, please check the email again, and retry.")
|
||||
#define CHAN_NOT_ALLOWED_TO_JOIN _("You are not permitted to be on this channel.")
|
||||
#define CHAN_X_INVALID _("Channel %s is not a valid channel.")
|
||||
#define CHAN_REACHED_CHANNEL_LIMIT _("Sorry, you have already reached your limit of \002%d\002 channels.")
|
||||
#define CHAN_EXCEEDED_CHANNEL_LIMIT _("Sorry, you have already exceeded your limit of \002%d\002 channels.")
|
||||
#define CHAN_SYMBOL_REQUIRED _("Please use the symbol of \002#\002 when attempting to register.")
|
||||
#define CHAN_SETTING_CHANGED _("%s for %s set to %s.")
|
||||
#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 about channel \002%s\002:")
|
||||
#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. " \
|
||||
"Type \002%s\032%s\032%zu\002 to read it.")
|
||||
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s. " \
|
||||
"Type \002%s\032%zu\002 to read it.")
|
||||
#define MEMO_HAVE_NO_MEMOS _("You have no memos.")
|
||||
#define MEMO_X_HAS_NO_MEMOS _("%s has no memos.")
|
||||
#define MEMO_HAVE_NO_NEW_MEMOS _("You have no new memos.")
|
||||
#define MEMO_X_HAS_NO_NEW_MEMOS _("%s has no new memos.")
|
||||
#define BOT_DOES_NOT_EXIST _("Bot \002%s\002 does not exist.")
|
||||
#define BOT_NOT_ASSIGNED _("You must assign a bot to the channel before using this command.")
|
||||
#define BOT_NOT_ON_CHANNEL _("Bot is not on channel \002%s\002.")
|
||||
#define HOST_SET_ERROR _("A vhost must be in the format of a valid hostname.")
|
||||
#define HOST_SET_IDENT_ERROR _("A vident must be in the format of a valid ident.")
|
||||
#define HOST_SET_TOOLONG _("Error! The vhost is too long, please use a hostname shorter than %zu characters.")
|
||||
#define HOST_SET_IDENTTOOLONG _("Error! The vident is too long, please use an ident shorter than %zu characters.")
|
||||
#define HOST_NOT_ASSIGNED _("Please contact an Operator to get a vhost assigned to this nick.")
|
||||
#define HOST_NO_VIDENT _("Your IRCd does not support vidents. If this is incorrect please report this as a possible bug.")
|
||||
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "services.h"
|
||||
#include "anope.h"
|
||||
|
||||
/** A class to process numbered lists (passed to most DEL/LIST/VIEW commands).
|
||||
* The function HandleNumber is called for every number in the list. Note that
|
||||
* if descending is true it gets called in descending order. This is so deleting
|
||||
* the index passed to the function from an array will not cause the other indexes
|
||||
* passed to the function to be incorrect. This keeps us from having to have an
|
||||
* 'in use' flag on everything.
|
||||
*/
|
||||
class CoreExport NumberList
|
||||
{
|
||||
private:
|
||||
bool is_valid = true;
|
||||
|
||||
std::set<unsigned> numbers;
|
||||
|
||||
bool desc;
|
||||
public:
|
||||
/** Processes a numbered list
|
||||
* @param list The list
|
||||
* @param descending True to make HandleNumber get called with numbers in descending order
|
||||
*/
|
||||
NumberList(const Anope::string &list, bool descending);
|
||||
|
||||
/** Destructor, does nothing
|
||||
*/
|
||||
virtual ~NumberList() = default;
|
||||
|
||||
/** Should be called after the constructors are done running. This calls the callbacks.
|
||||
*/
|
||||
void Process();
|
||||
|
||||
/** Called with a number from the list
|
||||
* @param number The number
|
||||
*/
|
||||
virtual void HandleNumber(unsigned number);
|
||||
|
||||
/** Called when there is an error with the numbered list
|
||||
* Return false to immediately stop processing the list and return
|
||||
* This is all done before we start calling HandleNumber, so no numbers will have been processed yet
|
||||
* @param list The list
|
||||
* @return false to stop processing
|
||||
*/
|
||||
virtual bool InvalidRange(const Anope::string &list);
|
||||
};
|
||||
|
||||
/** This class handles formatting LIST/VIEW replies.
|
||||
*/
|
||||
class CoreExport ListFormatter final
|
||||
{
|
||||
public:
|
||||
typedef std::map<Anope::string, Anope::string> ListEntry;
|
||||
private:
|
||||
NickCore *nc;
|
||||
std::vector<Anope::string> columns;
|
||||
std::vector<ListEntry> entries;
|
||||
public:
|
||||
ListFormatter(NickCore *nc);
|
||||
ListFormatter &AddColumn(const Anope::string &name);
|
||||
void AddEntry(const ListEntry &entry);
|
||||
bool IsEmpty() const;
|
||||
void Process(std::vector<Anope::string> &);
|
||||
};
|
||||
|
||||
/** This class handles formatting INFO replies
|
||||
*/
|
||||
class CoreExport InfoFormatter final
|
||||
{
|
||||
NickCore *nc;
|
||||
std::vector<std::pair<Anope::string, Anope::string> > replies;
|
||||
unsigned longest = 0;
|
||||
public:
|
||||
InfoFormatter(NickCore *nc);
|
||||
void Process(std::vector<Anope::string> &);
|
||||
Anope::string &operator[](const Anope::string &key);
|
||||
void AddOption(const Anope::string &opt);
|
||||
};
|
||||
@@ -0,0 +1,141 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
#include "defs.h"
|
||||
|
||||
enum LogType
|
||||
{
|
||||
/* Used whenever an administrator uses an administrative command */
|
||||
LOG_ADMIN,
|
||||
/* Used whenever an administrator overrides something, such as adding
|
||||
* access to a channel where they don't have permission to.
|
||||
*/
|
||||
LOG_OVERRIDE,
|
||||
/* Any other command usage */
|
||||
LOG_COMMAND,
|
||||
LOG_SERVER,
|
||||
LOG_CHANNEL,
|
||||
LOG_USER,
|
||||
LOG_MODULE,
|
||||
LOG_NORMAL,
|
||||
LOG_TERMINAL,
|
||||
LOG_RAWIO,
|
||||
LOG_DEBUG,
|
||||
LOG_DEBUG_2,
|
||||
LOG_DEBUG_3,
|
||||
LOG_DEBUG_4
|
||||
};
|
||||
|
||||
struct LogFile final
|
||||
{
|
||||
Anope::string filename;
|
||||
std::ofstream stream;
|
||||
|
||||
LogFile(const Anope::string &name);
|
||||
~LogFile();
|
||||
const Anope::string &GetName() const;
|
||||
};
|
||||
|
||||
/* Represents a single log message */
|
||||
class CoreExport Log final
|
||||
{
|
||||
public:
|
||||
/* Bot that should log this message */
|
||||
BotInfo *bi = nullptr;
|
||||
/* For commands, the user executing the command, but might not always exist */
|
||||
User *u = nullptr;
|
||||
/* For commands, the account executing the command, but will not always exist */
|
||||
NickCore *nc = nullptr;
|
||||
/* For commands, the command being executed */
|
||||
Command *c = nullptr;
|
||||
/* For commands, the command source */
|
||||
CommandSource *source = nullptr;
|
||||
/* Used for LOG_CHANNEL */
|
||||
Channel *chan = nullptr;
|
||||
/* For commands, the channel the command was executed on, will not always exist */
|
||||
const ChannelInfo *ci = nullptr;
|
||||
/* For LOG_SERVER */
|
||||
Server *s = nullptr;
|
||||
/* For LOG_MODULE */
|
||||
Module *m = nullptr;
|
||||
LogType type;
|
||||
Anope::string category;
|
||||
|
||||
std::stringstream buf;
|
||||
|
||||
Log(LogType type = LOG_NORMAL, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
/* LOG_COMMAND/OVERRIDE/ADMIN */
|
||||
Log(LogType type, CommandSource &source, Command *c, ChannelInfo *ci = NULL);
|
||||
|
||||
/* LOG_CHANNEL */
|
||||
Log(User *u, Channel *c, const Anope::string &category = "");
|
||||
|
||||
/* LOG_USER */
|
||||
Log(User *u, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
/* LOG_SERVER */
|
||||
Log(Server *s, const Anope::string &category = "", BotInfo *bi = NULL);
|
||||
|
||||
Log(BotInfo *b, 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)
|
||||
{
|
||||
this->buf << val;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
/* Configured in the configuration file, actually does the message logging */
|
||||
class CoreExport LogInfo final
|
||||
{
|
||||
public:
|
||||
BotInfo *bot = nullptr;
|
||||
std::vector<Anope::string> targets;
|
||||
std::vector<LogFile *> logfiles;
|
||||
int last_day = 0;
|
||||
std::vector<Anope::string> sources;
|
||||
int log_age;
|
||||
std::vector<Anope::string> admin;
|
||||
std::vector<Anope::string> override;
|
||||
std::vector<Anope::string> commands;
|
||||
std::vector<Anope::string> servers;
|
||||
std::vector<Anope::string> users;
|
||||
std::vector<Anope::string> channels;
|
||||
std::vector<Anope::string> normal;
|
||||
bool raw_io;
|
||||
bool debug;
|
||||
|
||||
LogInfo(int logage, bool rawio, bool debug);
|
||||
|
||||
~LogInfo();
|
||||
|
||||
void OpenLogFiles();
|
||||
|
||||
bool HasType(LogType ltype, const Anope::string &type) const;
|
||||
|
||||
/* Logs the message l if configured to */
|
||||
void ProcessMessage(const Log *l);
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2025 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "anope.h"
|
||||
#include "threadengine.h"
|
||||
#include "serialize.h"
|
||||
|
||||
namespace Mail
|
||||
{
|
||||
extern CoreExport bool Send(User *from, NickCore *to, BotInfo *service, const Anope::string &subject, const Anope::string &message);
|
||||
extern CoreExport bool Send(NickCore *to, const Anope::string &subject, const Anope::string &message);
|
||||
extern CoreExport bool Validate(const Anope::string &email);
|
||||
|
||||
/* A email message being sent */
|
||||
class Message final
|
||||
: public Thread
|
||||
{
|
||||
private:
|
||||
Anope::string error;
|
||||
Anope::string sendmail_path;
|
||||
Anope::string send_from;
|
||||
Anope::string mail_to;
|
||||
Anope::string addr;
|
||||
Anope::string subject;
|
||||
Anope::string message;
|
||||
Anope::string content_type;
|
||||
bool dont_quote_addresses;
|
||||
|
||||
public:
|
||||
/** Construct this message. Once constructed call Thread::Start to launch the mail sending.
|
||||
* @param sf Config->SendFrom
|
||||
* @param mailto Name of person being mailed (u->nick, nc->display, etc)
|
||||
* @param addr Destination address to mail
|
||||
* @param subject Message subject
|
||||
* @param message The actual message
|
||||
*/
|
||||
Message(const Anope::string &sf, const Anope::string &mailto, const Anope::string &addr, const Anope::string &subject, const Anope::string &message);
|
||||
|
||||
~Message();
|
||||
|
||||
/* Called from within the thread to actually send the mail */
|
||||
void Run() override;
|
||||
};
|
||||
|
||||
} // namespace Mail
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user