mirror of
https://github.com/anope/anope.git
synced 2026-06-12 20:34:48 +02:00
Compare commits
712 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| da799bd6f1 | |||
| 4dada51e08 | |||
| 1275fd01a7 | |||
| 5b8018eb80 | |||
| b2026fe739 | |||
| 3390d82ebe | |||
| 4762e306f9 | |||
| fd759f7bd3 | |||
| 003ddde09d | |||
| c021d7134e | |||
| a792088a62 | |||
| 03e2ebe2d2 | |||
| 0238f0a9e3 | |||
| c2dfb9a447 | |||
| bd8435a061 | |||
| 2cd67c9f36 | |||
| 45ab094d63 | |||
| 54389f474b | |||
| ac2b38b1b6 | |||
| df551bee03 | |||
| 59bb9d3d06 | |||
| 3b2d798e76 | |||
| ff6d6bdb3c | |||
| 411b3ce65a | |||
| ad19603818 | |||
| 535ff9b839 | |||
| 51916a50d2 | |||
| 42e58952cc | |||
| ba9f4e93c2 | |||
| 679a313ae2 | |||
| 390975e6c4 | |||
| d631885495 | |||
| 8e337c6592 | |||
| 9d89d8233d | |||
| 6f27418381 | |||
| 1932081c27 | |||
| f73159159f | |||
| eccb338cdd | |||
| 4021c0bb68 | |||
| 7dfb40cb58 | |||
| 0fbd3095c4 | |||
| 6d426ec386 | |||
| 1b33a51695 | |||
| 168a1173ed | |||
| 59c777d4ff | |||
| 43f88524e2 | |||
| 04de41ad7f | |||
| dd13846cad | |||
| 6864bc6171 | |||
| 003cb55409 | |||
| d15b8ee949 | |||
| 70de2b7de2 | |||
| e5c5689985 | |||
| 928d4260dc | |||
| 5e8561a7f1 | |||
| 4dd3075ddf | |||
| dbef7a7c64 | |||
| cd0f00a819 | |||
| b2d40d4189 | |||
| e6e812c43c | |||
| 2dbd41d244 | |||
| 02aeb254ee | |||
| 1245b43ade | |||
| 5a3f9f3f87 | |||
| 2c6f4d7c27 | |||
| 64f8449bf4 | |||
| 0e1f6b403b | |||
| 206192abdc | |||
| 32d3ddc0e4 | |||
| 4410e5ccce | |||
| d5f2232140 | |||
| 6d754b7d73 | |||
| 4d2870fa45 | |||
| 5948c2ea53 | |||
| ace7d99797 | |||
| 52595b90fa | |||
| b39f002d1b | |||
| 5df95d9f86 | |||
| a56d9a4096 | |||
| ce7bb15c18 | |||
| 6873630f2e | |||
| 44a4d62654 | |||
| 97389cd105 | |||
| 80c0adf7c8 | |||
| 6a539277b9 | |||
| 9930fa01ac | |||
| 40929a0490 | |||
| 783be31f64 | |||
| 0f5f2aef2e | |||
| 6cc997c4e9 | |||
| eda6d8cc0f | |||
| 3440b38a21 | |||
| fca421aa2a | |||
| 035905d321 | |||
| d1cd57d98e | |||
| 48daeeac1d | |||
| 9bcf46f8ea | |||
| 0b6c7ce5d6 | |||
| a0d21b207b | |||
| 3cc5b5143f | |||
| da738126a4 | |||
| 0bb1bc5c67 | |||
| 72010cd1a9 | |||
| c48b3af3d4 | |||
| 85c129701b | |||
| a9e5a79e91 | |||
| adc1343d6c | |||
| 8aa1102c7a | |||
| 1a89d32926 | |||
| ad06853edf | |||
| 66ae20e0f2 | |||
| 2850e3c65c | |||
| 80b8856254 | |||
| 21c8164539 | |||
| a4abd27ffd | |||
| b912b403f0 | |||
| 59e9d47667 | |||
| 1108e54250 | |||
| 8b37cdb5d5 | |||
| c5bff3a099 | |||
| 61b0c82884 | |||
| c4c159d197 | |||
| 04a32be1e1 | |||
| fe4b8ee669 | |||
| 34b451f36c | |||
| 16aff210fd | |||
| 5702fb9145 | |||
| 783ba3fd74 | |||
| f1ddd7cd02 | |||
| c424c4d24d | |||
| 2d88383d9e | |||
| c73a6c621f | |||
| 96a503b4d9 | |||
| 0632abd111 | |||
| 1043e2189c | |||
| 85f0d56c39 | |||
| cebc3f757b | |||
| 447a59d6f5 | |||
| 75aa633d87 | |||
| 7833a96dde | |||
| d326f869a3 | |||
| b724617a8d | |||
| 76f0c78ece | |||
| 13491bd960 | |||
| bade5ea109 | |||
| 682a6a6ad4 | |||
| 50030e07fa | |||
| 7b2f0f5790 | |||
| 23e72fc934 | |||
| e182519e4d | |||
| 4317b5557e | |||
| f97448f48a | |||
| cb334fbae1 | |||
| d3bb930a5e | |||
| 0fc1eb3133 | |||
| 0ac9d70d63 | |||
| a3d61e3d18 | |||
| cac10aaa41 | |||
| be5a0e8108 | |||
| 3da8244de5 | |||
| 8722daa6e7 | |||
| a0e98acea8 | |||
| c5a2f40666 | |||
| 1daafff79d | |||
| 3dd20975aa | |||
| 368d8e8b1c | |||
| 7c5d2c09fa | |||
| 41e702d853 | |||
| 19f83eaa34 | |||
| b1212f9e89 | |||
| 3e9f516d55 | |||
| 744b8bc4dc | |||
| e9a0a214b0 | |||
| 46c5570b1d | |||
| 151795a1df | |||
| 50f17ea8e1 | |||
| 2609ff44c6 | |||
| ca30bb2370 | |||
| f36b311f84 | |||
| fec85376e7 | |||
| 0bf14650fa | |||
| 49f93b7670 | |||
| ce0982cc4a | |||
| b4150841ec | |||
| eec428b0c7 | |||
| b706a6259e | |||
| 2cf8f003ce | |||
| 07f57b1108 | |||
| 5d648f9f1c | |||
| 46e6b0adde | |||
| 977780d8ef | |||
| 459f3d07c9 | |||
| b76b407b33 | |||
| 8b089ab1a7 | |||
| fbec4d04a5 | |||
| 34582a40ef | |||
| 4b15ca0232 | |||
| 997302f861 | |||
| b3b6e9f862 | |||
| d23bfb0113 | |||
| 0b7b4aa42d | |||
| fab8589e1e | |||
| 937404e311 | |||
| c5ad774ce5 | |||
| 1321f4f071 | |||
| 4319b6428f | |||
| e1f6d0ca16 | |||
| bb9074cbd5 | |||
| 72f5e3580f | |||
| 4b854d3935 | |||
| 0b2b00b37d | |||
| 196a3c32c2 | |||
| 8955c53088 | |||
| 88c71fba64 | |||
| 21f61981ca | |||
| 5752c07a56 | |||
| 010beb52b1 | |||
| c955941413 | |||
| 2e2515b9f0 | |||
| f0b26c9b44 | |||
| f953f7f006 | |||
| 84baf15620 | |||
| 89f61ac91b | |||
| b091184c60 | |||
| 6b1a491694 | |||
| 66d3293ae6 | |||
| a4691f9d4d | |||
| 51c7a15c45 | |||
| 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 | |||
| 151f9c2bcc | |||
| 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 |
@@ -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
|
||||
@@ -1,33 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Report a non-security issue with Anope.
|
||||
---
|
||||
|
||||
<!--
|
||||
Please fill in the template below. It will help us process your bug report a lot faster. If you have multiple bugs to report then please open one issue for each bug.
|
||||
-->
|
||||
|
||||
**Description**
|
||||
|
||||
|
||||
|
||||
**Steps to reproduce the issue:**
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
**Describe the results you received:**
|
||||
|
||||
|
||||
|
||||
**Describe the results you expected:**
|
||||
|
||||
|
||||
|
||||
**Additional information you deem important (e.g. issue happens only occasionally):**
|
||||
|
||||
|
||||
|
||||
**Output of `services --version`:**
|
||||
|
||||
@@ -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
|
||||
@@ -1,15 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Request that a new feature is added to Anope.
|
||||
---
|
||||
|
||||
<!--
|
||||
Please fill in the template below. It will help us process your feature request a lot faster. If you have multiple features to request then please open one issue for each feature.
|
||||
-->
|
||||
|
||||
**Description**
|
||||
|
||||
|
||||
|
||||
**Why this would be useful**
|
||||
|
||||
@@ -1 +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.
|
||||
|
||||
@@ -24,3 +24,16 @@ 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).
|
||||
|
||||
+1
-1
@@ -14,6 +14,6 @@ Version | Supported
|
||||
|
||||
## 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.anope.org #anope-devel and PM them the details.
|
||||
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.
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
CXX: ${{ matrix.compiler }}
|
||||
CXXFLAGS: -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
||||
@@ -5,12 +5,12 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
CXX: ${{ matrix.compiler }}
|
||||
CXXFLAGS: -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
||||
@@ -10,32 +10,54 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
|
||||
runs-on: windows-2019
|
||||
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
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup NSIS
|
||||
run: |-
|
||||
choco install nsis
|
||||
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v1.3
|
||||
uses: microsoft/setup-msbuild@v2
|
||||
|
||||
- name: Setup Conan
|
||||
uses: turtlebrowser/get-conan@v1.2
|
||||
with:
|
||||
version: 1.64.0
|
||||
version: 1.66.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=${{ github.event_name == 'release' && 'Release' || 'Debug' }}" -G "Visual Studio 16 2019" ..
|
||||
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:3 /P:Configuration=${{ github.event_name == 'release' && 'Release' || 'Debug' }} /P:Platform=x64 /VERBOSITY:MINIMAL
|
||||
msbuild PACKAGE.vcxproj /M:5 /P:Configuration=${{ env.BUILD_TYPE }} /P:Platform=x64 /VERBOSITY:MINIMAL
|
||||
|
||||
- name: Upload installer
|
||||
if: "${{ github.event_name == 'release' }}"
|
||||
|
||||
@@ -12,5 +12,7 @@ modules/sqlite.cpp
|
||||
modules/ssl_gnutls.cpp
|
||||
modules/ssl_openssl.cpp
|
||||
modules/stats
|
||||
modules/xmlrpc.cpp
|
||||
run/
|
||||
*.mo
|
||||
*.pot
|
||||
|
||||
@@ -12,39 +12,49 @@ 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> <robbeh@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 Voß <jens@pyrobook.(none)>
|
||||
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> Peter Powell <petpow@saberuk.com>
|
||||
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>
|
||||
|
||||
+13
-34
@@ -1,5 +1,5 @@
|
||||
# This usage of CMake requires at least version 3.8
|
||||
cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
|
||||
# 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)
|
||||
@@ -31,12 +31,8 @@ if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang$")
|
||||
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()
|
||||
set(LIBRARIES "${LINE}")
|
||||
endif()
|
||||
# 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
|
||||
@@ -106,13 +102,6 @@ if(NOT MSVC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# 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()
|
||||
|
||||
# Include the checking functions used later in this CMakeLists.txt
|
||||
include(CheckFunctionExists)
|
||||
include(CheckTypeSize)
|
||||
@@ -153,11 +142,6 @@ include_directories(
|
||||
${Anope_SOURCE_DIR}/vendor
|
||||
)
|
||||
|
||||
# Pass on REPRODUCIBLE_BUILD
|
||||
if(REPRODUCIBLE_BUILD)
|
||||
add_definitions(-DREPRODUCIBLE_BUILD)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# If using Windows, include the windows specific folder for anope_windows.h
|
||||
include_directories(${Anope_SOURCE_DIR}/src/win32)
|
||||
@@ -189,11 +173,6 @@ if(CMAKE_THREAD_LIBS_INIT)
|
||||
list(APPEND LINK_LIBS ${CMAKE_THREAD_LIBS_INIT})
|
||||
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()
|
||||
|
||||
if(NOT PROGRAM_NAME)
|
||||
set(PROGRAM_NAME anope)
|
||||
endif()
|
||||
@@ -337,14 +316,6 @@ if(${Anope_SOURCE_DIR} STREQUAL ${Anope_BINARY_DIR})
|
||||
endif()
|
||||
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)
|
||||
|
||||
# Get the filename of the Anope binary, to use later
|
||||
set(SERVICES_BINARY "$<TARGET_FILE:${PROGRAM_NAME}>")
|
||||
get_filename_component(SERVICES_BINARY ${SERVICES_BINARY} NAME)
|
||||
@@ -355,7 +326,7 @@ get_filename_component(ABSOLUTE_LOG_DIR ${LOG_DIR} REALPATH BASE_DIR ${CMAKE_INS
|
||||
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\")")
|
||||
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)
|
||||
@@ -417,3 +388,11 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
|
||||
set(CPACK_MONOLITHIC_INSTALL TRUE)
|
||||
include(CPack)
|
||||
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)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Configuration script for Anope.
|
||||
#
|
||||
# Anope (C) 2003-2024 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,18 +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
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
Load_Cache () {
|
||||
if [ -f $SOURCE_DIR/config.cache -a -r $SOURCE_DIR/config.cache -a ! "$IGNORE_CACHE" ] ; then
|
||||
echo "Using defaults from config.cache. To ignore, $SOURCE_DIR/Config -nocache"
|
||||
@@ -42,7 +30,6 @@ Run_Build_System () {
|
||||
WITH_PERM=""
|
||||
EXTRA_INCLUDE=""
|
||||
EXTRA_LIBS=""
|
||||
GEN_TYPE=""
|
||||
|
||||
if [ "$INSTDIR" != "" ] ; then
|
||||
WITH_INST="-DINSTDIR:STRING=$INSTDIR"
|
||||
@@ -70,45 +57,25 @@ Run_Build_System () {
|
||||
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 $EXTRA_INCLUDE $EXTRA_LIBS $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 $EXTRA_INCLUDE $EXTRA_LIBS $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
|
||||
if [ "$PWD" = "${SOURCE_DIR}/build" ]; then
|
||||
echo "Now run make to build Anope."
|
||||
else
|
||||
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
|
||||
###########################################################################
|
||||
@@ -121,7 +88,7 @@ EXTRA_INCLUDE_DIRS=
|
||||
EXTRA_LIB_DIRS=
|
||||
EXTRA_CONFIG_ARGS=
|
||||
CAN_QUICK="no"
|
||||
SOURCE_DIR=`dirname $0`
|
||||
SOURCE_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
|
||||
###########################################################################
|
||||
# Check out the options
|
||||
@@ -138,7 +105,8 @@ while [ $# -ge 1 ] ; do
|
||||
exit 0
|
||||
elif [ $1 = "-devel" ] ; then
|
||||
DEBUG="yes"
|
||||
INSTDIR="$PWD/run"
|
||||
DEVEL="yes"
|
||||
INSTDIR="$SOURCE_DIR/run"
|
||||
elif [ $1 = "-nocache" ] ; then
|
||||
IGNORE_CACHE="1"
|
||||
elif [ $1 = "-nointro" ] ; then
|
||||
@@ -163,7 +131,7 @@ done
|
||||
cmake --version 2>&1 > /dev/null
|
||||
if [ $? -ne 0 ] ; then
|
||||
clear
|
||||
echo "Anope requires CMake 3.8 or newer, which can be downloaded at https://cmake.org/ or through your system's package manager."
|
||||
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
|
||||
@@ -196,20 +164,47 @@ export ok INPUT
|
||||
|
||||
####
|
||||
|
||||
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
|
||||
fi
|
||||
echo ""
|
||||
|
||||
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 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
|
||||
fi
|
||||
if [ ! -d "$INPUT" ] ; then
|
||||
if exists "$INPUT" ; then
|
||||
if [ -e "$INPUT" ]; then
|
||||
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
|
||||
@@ -217,7 +212,7 @@ while [ $ok -eq 0 ] ; do
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
elif exists "$INPUT/include/services.h" ; then
|
||||
elif [ -e "$INPUT/include/services.h" ]; then
|
||||
echo "You cannot use the Anope source directory as a target directory."
|
||||
else
|
||||
ok=1
|
||||
@@ -238,7 +233,7 @@ else
|
||||
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
|
||||
@@ -263,7 +258,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
|
||||
@@ -287,7 +282,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
|
||||
@@ -305,7 +300,7 @@ 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."
|
||||
echo2 "[$EXTRA_INCLUDE_DIRS] "
|
||||
echo -n "[$EXTRA_INCLUDE_DIRS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
@@ -323,7 +318,7 @@ echo "You may only need to do this if CMake is unable to locate"
|
||||
echo "missing dependencies without hints."
|
||||
echo "Separate directories with semicolons."
|
||||
echo "If you need no extra library directories, enter NONE in all caps."
|
||||
echo2 "[$EXTRA_LIB_DIRS] "
|
||||
echo -n "[$EXTRA_LIB_DIRS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
@@ -338,7 +333,7 @@ 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."
|
||||
echo2 "[$EXTRA_CONFIG_ARGS] "
|
||||
echo -n "[$EXTRA_CONFIG_ARGS] "
|
||||
if read INPUT ; then : ; else echo "" ; exit 1 ; fi
|
||||
if [ "$INPUT" ] ; then
|
||||
if [ "$INPUT" = "NONE" ] ; then
|
||||
@@ -355,13 +350,14 @@ echo ""
|
||||
# Store values
|
||||
################################################################################
|
||||
|
||||
echo2 "Saving configuration results in config.cache... "
|
||||
echo -n "Saving configuration results in config.cache... "
|
||||
|
||||
cat <<EOT >$SOURCE_DIR/config.cache
|
||||
INSTDIR="$INSTDIR"
|
||||
RUNGROUP="$RUNGROUP"
|
||||
UMASK=$UMASK
|
||||
DEBUG="$DEBUG"
|
||||
DEVEL="$DEVEL"
|
||||
EXTRA_INCLUDE_DIRS="$EXTRA_INCLUDE_DIRS"
|
||||
EXTRA_LIB_DIRS="$EXTRA_LIB_DIRS"
|
||||
EXTRA_CONFIG_ARGS="$EXTRA_CONFIG_ARGS"
|
||||
|
||||
BIN
Binary file not shown.
@@ -4,7 +4,7 @@ Anope is an open source set of IRC services. It is highly modular, with a vast n
|
||||
|
||||
* [Website](https://anope.org)
|
||||
* [GitHub](https://github.com/anope)
|
||||
* IRC \#anope on irc.anope.org
|
||||
* IRC \#anope on irc.teranova.net
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -33,7 +33,7 @@ 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 anope.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.anope.org](irc://irc.anope.org/#anope).
|
||||
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.
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
# Only install example.chk and anope.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 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)
|
||||
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)
|
||||
install(FILES ${DATA}
|
||||
DESTINATION ${CONF_DIR}
|
||||
)
|
||||
|
||||
+189
-207
@@ -65,10 +65,6 @@
|
||||
* 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
|
||||
@@ -79,13 +75,17 @@
|
||||
/*
|
||||
* [OPTIONAL] Defines
|
||||
*
|
||||
* You can define values to other values, which can be used to easily change
|
||||
* many values in the configuration at once.
|
||||
* 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 services clients hostnames.
|
||||
* The "services.host" define is used in multiple different locations throughout
|
||||
* the configuration for the server name and pseudoclient hostnames. You should
|
||||
* change the value to the hostname you wish to use for your services server.
|
||||
*/
|
||||
define
|
||||
{
|
||||
@@ -211,7 +211,7 @@ serverinfo
|
||||
* 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.example.com"
|
||||
name = "${services.host}"
|
||||
|
||||
/*
|
||||
* The text which should appear as the server's information in /WHOIS and similar
|
||||
@@ -256,7 +256,6 @@ serverinfo
|
||||
* You MUST modify this to match the IRCd you run.
|
||||
*
|
||||
* Supported:
|
||||
* - bahamut
|
||||
* - hybrid
|
||||
* - inspircd
|
||||
* - ngircd
|
||||
@@ -265,26 +264,7 @@ serverinfo
|
||||
* - solanum
|
||||
* - unrealircd
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "inspircd"
|
||||
|
||||
/*
|
||||
* Some protocol modules can enforce mode locks server-side. This reduces the spam caused by
|
||||
* services immediately reversing mode changes for locked modes.
|
||||
*
|
||||
* If the protocol module you have loaded does not support this, this setting will have no effect.
|
||||
*/
|
||||
use_server_side_mlock = yes
|
||||
|
||||
/*
|
||||
* Some protocol modules can enforce topic locks server-side. This reduces the spam caused by
|
||||
* services immediately reversing topic changes.
|
||||
*
|
||||
* If the protocol module you have loaded does not support this, this setting will have no effect.
|
||||
*/
|
||||
use_server_side_topiclock = yes
|
||||
}
|
||||
module { name = "inspircd" }
|
||||
|
||||
/*
|
||||
* [REQUIRED] Network Information
|
||||
@@ -342,29 +322,29 @@ networkinfo
|
||||
* 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
|
||||
* 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.-"
|
||||
vhost_chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-/"
|
||||
|
||||
/*
|
||||
* If set to true, allows vHosts to not contain dots (.).
|
||||
* If enabled, 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
|
||||
allow_undotted_vhosts = no
|
||||
|
||||
/*
|
||||
* 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.
|
||||
* of a vhost. The same warning as vhost_chars applies.
|
||||
*
|
||||
* It is recommended you DON'T change this.
|
||||
*/
|
||||
disallow_start_or_end = ".-"
|
||||
disallow_start_or_end = ".-/"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -421,7 +401,7 @@ options
|
||||
/*
|
||||
* Sets the delay between automatic database updates.
|
||||
*/
|
||||
updatetimeout = 5m
|
||||
updatetimeout = 2m
|
||||
|
||||
/*
|
||||
* Sets the delay between checks for expired nicknames and channels.
|
||||
@@ -433,12 +413,6 @@ options
|
||||
*/
|
||||
readtimeout = 5s
|
||||
|
||||
/*
|
||||
* Sets the interval between sending warning messages for program errors via
|
||||
* WALLOPS/GLOBOPS.
|
||||
*/
|
||||
warningtimeout = 4h
|
||||
|
||||
/*
|
||||
* Sets the (maximum) frequency at which the timeout list is checked. This,
|
||||
* combined with readtimeout above, determines how accurately timed events,
|
||||
@@ -455,26 +429,11 @@ options
|
||||
timeoutcheck = 3s
|
||||
|
||||
/*
|
||||
* If set, this will allow users to let services send PRIVMSGs to them
|
||||
* instead of NOTICEs. Also see the "msg" option of nickserv:defaults,
|
||||
* which also toggles the default communication (PRIVMSG or NOTICE) to
|
||||
* use for unregistered users.
|
||||
*
|
||||
* This is a feature that is against the IRC RFC and should be used ONLY
|
||||
* if absolutely necessary.
|
||||
*
|
||||
* This directive is optional, and not recommended.
|
||||
* If set Anope will tell users to use a server-side alias for messaging
|
||||
* services instead of /msg. The alias for each service defaults to the
|
||||
* bot name but can be configured in the service block.
|
||||
*/
|
||||
#useprivmsg = yes
|
||||
|
||||
/*
|
||||
* If set, will force services to only respond to PRIVMSGs addresses to
|
||||
* Nick@ServerName - e.g. NickServ@example.com. This should be used in
|
||||
* conjunction with IRCd aliases. This directive is optional.
|
||||
*
|
||||
* This option will have no effect on some IRCds, such as TS6 IRCds.
|
||||
*/
|
||||
#usestrictprivmsg = yes
|
||||
#servicealias = yes
|
||||
|
||||
/*
|
||||
* If set, Anope will only show /stats o to IRC Operators. This directive
|
||||
@@ -516,6 +475,26 @@ options
|
||||
*/
|
||||
didyoumeandifference = 4
|
||||
|
||||
/*
|
||||
* The length of codes used for confirming actions like dropping a channel or a
|
||||
* nickname.
|
||||
*
|
||||
* Defaults to 15 if not set.
|
||||
*/
|
||||
codelength = 15
|
||||
|
||||
/*
|
||||
* If set, the maximum number of bytes after which to wrap services messages. This
|
||||
* can be set a bit higher than the default but should be well under the maximum
|
||||
* message length imposed by your IRC server or messages will end up truncated.
|
||||
*
|
||||
* NOTE: this currently only applies to tables but will be expanded to all messages
|
||||
* in a later release.
|
||||
*
|
||||
* Defaults to 100 if not set.
|
||||
*/
|
||||
linelength = 100
|
||||
|
||||
/* The regex engine to use, as provided by the regex modules.
|
||||
* Leave commented to disable regex matching.
|
||||
*
|
||||
@@ -530,7 +509,7 @@ options
|
||||
*
|
||||
* Removing .UTF-8 will instead use the default encoding for the language, e.g. iso-8859-1 for western European languages.
|
||||
*/
|
||||
languages = "ca_ES.UTF-8 de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 hu_HU.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 ru_RU.UTF-8 tr_TR.UTF-8"
|
||||
languages = "de_DE.UTF-8 el_GR.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 nl_NL.UTF-8 pl_PL.UTF-8 pt_PT.UTF-8 tr_TR.UTF-8"
|
||||
|
||||
/*
|
||||
* Default language that non- and newly-registered nicks will receive messages in.
|
||||
@@ -605,7 +584,7 @@ include
|
||||
}
|
||||
|
||||
/*
|
||||
* [OPTIONAL] NickServ
|
||||
* [RECOMMENDED] NickServ
|
||||
*
|
||||
* Includes nickserv.example.conf, which is necessary for NickServ functionality.
|
||||
*
|
||||
@@ -749,7 +728,7 @@ log
|
||||
*
|
||||
* Available privileges:
|
||||
* botserv/administration - Can view and assign private BotServ bots
|
||||
* botserv/fantasy - Can use fantasy commands without the FANTASIA privilege
|
||||
* botserv/fantasy - Can use fantasy commands without the FANTASY privilege
|
||||
* chanserv/administration - Can modify the settings of any channel (including changing of the owner!)
|
||||
* chanserv/access/list - Can view channel access and akick lists, but not modify them
|
||||
* chanserv/access/modify - Can modify channel access and akick lists, and use /chanserv enforce
|
||||
@@ -763,10 +742,13 @@ log
|
||||
* nickserv/alist - Can see the channel access list of other users
|
||||
* nickserv/auspex - Can see any information with /NICKSERV INFO
|
||||
* nickserv/cert - Can modify other users certificate lists
|
||||
* nickserv/confirm - Can confirm other users nicknames
|
||||
* nickserv/confirm/email - Can confirm other users email address change
|
||||
* nickserv/confirm/register - Can confirm other users account registration
|
||||
* nickserv/drop - Can drop other users nicks
|
||||
* nickserv/drop/display - Allows dropping display nicks when preservedisplay is enabled
|
||||
* nickserv/drop/override - Allows dropping nicks without using a confirmation code
|
||||
* nickserv/recover - Can recover other users nicks
|
||||
* nickserv/resend - Can resend confirmation codes via email
|
||||
* operserv/config - Can modify services's configuration
|
||||
* operserv/oper/modify - Can add and remove operators with at most the same privileges
|
||||
* protected - Can not be kicked from channels by services
|
||||
@@ -785,8 +767,8 @@ log
|
||||
* nickserv/getemail nickserv/suspend nickserv/ajoin nickserv/list
|
||||
*
|
||||
* nickserv/saset/autoop nickserv/saset/display nickserv/saset/email nickserv/saset/greet
|
||||
* nickserv/saset/kill nickserv/saset/keepmodes nickserv/saset/language nickserv/saset/message
|
||||
* nickserv/saset/neverop nickserv/saset/noexpire nickserv/saset/password nickserv/saset/private
|
||||
* nickserv/saset/keepmodes nickserv/saset/language nickserv/saset/message nickserv/saset/neverop
|
||||
* nickserv/saset/noexpire nickserv/saset/password nickserv/saset/private nickserv/saset/protect
|
||||
* nickserv/saset/url
|
||||
*
|
||||
* hostserv/set hostserv/del hostserv/list
|
||||
@@ -831,18 +813,16 @@ opertype
|
||||
inherits = "Helper, Another Helper"
|
||||
|
||||
/* What commands (see above) this opertype may use */
|
||||
commands = "chanserv/list chanserv/suspend chanserv/topic memoserv/staff nickserv/list nickserv/suspend operserv/mode operserv/chankill operserv/akill operserv/session operserv/modinfo operserv/sqline operserv/oper operserv/kick operserv/ignore operserv/snline"
|
||||
commands = "chanserv/list chanserv/suspend chanserv/topic memoserv/staff nickserv/list nickserv/resend nickserv/suspend operserv/mode operserv/chankill operserv/akill operserv/session operserv/modinfo operserv/sqline operserv/oper operserv/kick operserv/ignore operserv/snline"
|
||||
|
||||
/* What privs (see above) this opertype has */
|
||||
privs = "chanserv/auspex chanserv/no-register-limit memoserv/* nickserv/auspex nickserv/confirm"
|
||||
privs = "chanserv/auspex chanserv/no-register-limit memoserv/* nickserv/auspex nickserv/confirm/*"
|
||||
|
||||
/*
|
||||
* Modes to be set on users when they identify to accounts linked to this opertype.
|
||||
*
|
||||
* This can be used to automatically oper users who identify for services operator accounts, and is
|
||||
* useful for setting modes such as Plexus's user mode +N.
|
||||
*
|
||||
* Note that some IRCds, such as InspIRCd, do not allow directly setting +o, and this will not work.
|
||||
*/
|
||||
#modes = "+o"
|
||||
}
|
||||
@@ -893,14 +873,24 @@ opertype
|
||||
/* An optional password. If defined, the user must login using "/OPERSERV LOGIN" first */
|
||||
#password = "secret"
|
||||
|
||||
/*
|
||||
* The algorithm which the above password is hashed with. If this is not set then services will
|
||||
* assume the above password is not hashed.
|
||||
*
|
||||
* You will need to have the appropriate encryption module (e.g. enc_bcrypt) loaded in order
|
||||
* for this to work.
|
||||
*
|
||||
*/
|
||||
#password_hash = "bcrypt"
|
||||
|
||||
/* An optional SSL fingerprint. If defined, it's required to be able to use this opertype. */
|
||||
#certfp = "ed3383b3f7d74e89433ddaa4a6e5b2d7"
|
||||
|
||||
/* An optional list of user@host masks. If defined the user must be connected from one of them */
|
||||
#host = "*@*.anope.org ident@*"
|
||||
|
||||
/* An optional vHost to set on users who identify for this oper block.
|
||||
* This will override HostServ vHosts, and may not be available on all IRCds
|
||||
/* An optional vhost to set on users who identify for this oper block.
|
||||
* This will override HostServ vhosts, and may not be available on all IRCds
|
||||
*/
|
||||
#vhost = "oper.mynet"
|
||||
}
|
||||
@@ -934,23 +924,25 @@ mail
|
||||
* If set, this option enables the mail commands in Anope. You may choose
|
||||
* to disable it if you have no Sendmail-compatible mailer installed. Whilst
|
||||
* this directive (and entire block) is optional, it is required if
|
||||
* nickserv:registration is set to yes.
|
||||
* nickserv:registration is set to mail.
|
||||
*/
|
||||
usemail = yes
|
||||
|
||||
/*
|
||||
* This is the command-line that will be used to call the mailer to send an
|
||||
* email. It must be called with all the parameters needed to make it
|
||||
* scan the mail input to find the mail recipient; consult your mailer
|
||||
* documentation.
|
||||
* The command used for sending emails. It is assumed that this behaves like
|
||||
* sendmail (i.e. it reads the email from the standard input stream) but you
|
||||
* should probably use Postfix or some other sendmail-compatible emailer
|
||||
* instead of sendmail as sendmail is very hard to configure correctly. If
|
||||
* you are using Windows then https://www.glob.com.au/sendmail/ is probably
|
||||
* the best option currently.
|
||||
*
|
||||
* Postfix users must use the compatible sendmail utility provided with
|
||||
* it. This one usually needs no parameters on the command-line. Most
|
||||
* sendmail applications (or replacements of it) require the -t option
|
||||
* to be used.
|
||||
*
|
||||
* If you are running on Windows you should use a Windows sendmail port
|
||||
* like https://www.glob.com.au/sendmail/ for sending emails.
|
||||
* If your emailer sends emails directly from the services host you will
|
||||
* need to configure DKIM, DMARC, and SPF to avoid email hosts from marking
|
||||
* your services emails as spam. It is important that you do this *BEFORE*
|
||||
* sending emails for the first time as some email providers will add your
|
||||
* host to a DNSBL like Spamhaus if they consider your emails to be spam. If
|
||||
* this is too difficult then you may want to consider sending emails via an
|
||||
* external email provider using a forwarder like msmtp.
|
||||
*/
|
||||
#sendmailpath = "/usr/sbin/sendmail -it"
|
||||
|
||||
@@ -993,76 +985,76 @@ mail
|
||||
* The subject and message of emails sent to users when they register accounts.
|
||||
*
|
||||
* Available tokens for this template are:
|
||||
* %n - Gets replaced with the nickname
|
||||
* %N - Gets replaced with the network name
|
||||
* %c - Gets replaced with the confirmation code
|
||||
* {nick} - Gets replaced with the nickname
|
||||
* {network} - Gets replaced with the network name
|
||||
* {code} - Gets replaced with the confirmation code
|
||||
*/
|
||||
registration_subject = "Nickname registration for %n"
|
||||
registration_subject = "Nickname registration for {nick}"
|
||||
registration_message = "Hi,
|
||||
|
||||
You have requested to register the nickname %n on %N.
|
||||
Please type \" /msg NickServ CONFIRM %c \" to complete registration.
|
||||
You have requested to register the nickname {nick} on {network}.
|
||||
Please type \" /msg NickServ CONFIRM REGISTER {code} \" to complete registration.
|
||||
|
||||
If you don't know why this mail was sent to you, please ignore it silently.
|
||||
|
||||
%N administrators."
|
||||
{network} administrators."
|
||||
|
||||
/*
|
||||
* The subject and message of emails sent to users when they request a new password.
|
||||
*
|
||||
* Available tokens for this template are:
|
||||
* %n - Gets replaced with the nickname
|
||||
* %N - Gets replaced with the network name
|
||||
* %c - Gets replaced with the confirmation code
|
||||
* {nick} - Gets replaced with the nickname
|
||||
* {network} - Gets replaced with the network name
|
||||
* {code} - Gets replaced with the confirmation code
|
||||
*/
|
||||
reset_subject = "Reset password request for %n"
|
||||
reset_subject = "Reset password request for {nick}"
|
||||
reset_message = "Hi,
|
||||
|
||||
You have requested to have the password for %n reset.
|
||||
To reset your password, type \" /msg NickServ CONFIRM %n %c \"
|
||||
You have requested to have the password for {nick} reset.
|
||||
To reset your password, type \" /msg NickServ CONFIRM RESETPASS {nick} {code} \"
|
||||
|
||||
If you don't know why this mail was sent to you, please ignore it silently.
|
||||
|
||||
%N administrators."
|
||||
{network} administrators."
|
||||
|
||||
/*
|
||||
* The subject and message of emails sent to users when they request a new email address.
|
||||
*
|
||||
* Available tokens for this template are:
|
||||
* %e - Gets replaced with the old email address
|
||||
* %E - Gets replaced with the new email address
|
||||
* %n - Gets replaced with the nickname
|
||||
* %N - Gets replaced with the network name
|
||||
* %c - Gets replaced with the confirmation code
|
||||
* {old_email} - Gets replaced with the old email address
|
||||
* {new_email} - Gets replaced with the new email address
|
||||
* {account} - Gets replaced with the nickname
|
||||
* {network} - Gets replaced with the network name
|
||||
* {code} - Gets replaced with the confirmation code
|
||||
*/
|
||||
emailchange_subject = "Email confirmation"
|
||||
emailchange_message = "Hi,
|
||||
|
||||
You have requested to change your email address from %e to %E.
|
||||
Please type \" /msg NickServ CONFIRM %c \" to confirm this change.
|
||||
You have requested to change your email address from {old_email} to {new_email}.
|
||||
Please type \" /msg NickServ CONFIRM EMAIL {code} \" to confirm this change.
|
||||
|
||||
If you don't know why this mail was sent to you, please ignore it silently.
|
||||
|
||||
%N administrators."
|
||||
{network} administrators."
|
||||
|
||||
/*
|
||||
* The subject and message of emails sent to users when they receive a new memo.
|
||||
*
|
||||
* Available tokens for this template are:
|
||||
* %n - Gets replaced with the nickname
|
||||
* %s - Gets replaced with the sender's nickname
|
||||
* %d - Gets replaced with the memo number
|
||||
* %t - Gets replaced with the memo text
|
||||
* %N - Gets replaced with the network name
|
||||
* {receiver} - Gets replaced with the receiver's nickname
|
||||
* {sender} - Gets replaced with the sender's nickname
|
||||
* {number} - Gets replaced with the memo number
|
||||
* {text} - Gets replaced with the memo text
|
||||
* {network} - Gets replaced with the network name
|
||||
*/
|
||||
memo_subject = "New memo"
|
||||
memo_message = "Hi %n,
|
||||
memo_message = "Hi {receiver},
|
||||
|
||||
You've just received a new memo from %s. This is memo number %d.
|
||||
You've just received a new memo from {sender}. This is memo number {number}.
|
||||
|
||||
Memo text:
|
||||
|
||||
%t"
|
||||
{text}"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1073,108 +1065,109 @@ mail
|
||||
* have will not be stored!
|
||||
*/
|
||||
|
||||
/*
|
||||
* [DEPRECATED] db_old
|
||||
*
|
||||
* This is the old binary database format from late Anope 1.7.x, Anope 1.8.x, and
|
||||
* early Anope 1.9.x. This module only loads these databases, and will NOT save them.
|
||||
* You should only use this to upgrade old databases to a newer database format by loading
|
||||
* other database modules in addition to this one, which will be used when saving databases.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "db_old"
|
||||
|
||||
/*
|
||||
* This is the encryption type used by the databases. This must be set correctly or
|
||||
* your passwords will not work. Valid options are: md5, oldmd5, sha1, and plain.
|
||||
* You must also be sure to load the correct encryption module below in the Encryption
|
||||
* Modules section so that your passwords work.
|
||||
*/
|
||||
#hash = "md5"
|
||||
}
|
||||
|
||||
/*
|
||||
* db_atheme
|
||||
*
|
||||
* This allows importing databases from Atheme. You should load another database module as
|
||||
* well as this as it can only read Atheme databases not write them.
|
||||
* This allows importing databases from Atheme. You should load another database
|
||||
* module like db_json as well as this as it can only read Atheme databases not
|
||||
* write them.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "db_atheme"
|
||||
|
||||
/*
|
||||
* The database name db_atheme should use.
|
||||
* The file that db_atheme will import your main database from.
|
||||
*/
|
||||
database = "atheme.db"
|
||||
}
|
||||
|
||||
/*
|
||||
* [RECOMMENDED] db_flatfile
|
||||
* [DEPRECATED] db_flatfile
|
||||
*
|
||||
* This is the default flatfile database format.
|
||||
* This allows importing databases from the custom flat file format used between
|
||||
* Anope 1.9.6 and 2.1.17. You should load another database module like db_json
|
||||
* as well as this as it can only read db_flatfile databases not write them.
|
||||
*/
|
||||
module
|
||||
#module
|
||||
{
|
||||
name = "db_flatfile"
|
||||
|
||||
/*
|
||||
* The database name db_flatfile should use
|
||||
* The file that db_flatfile will import your main database from.
|
||||
*/
|
||||
database = "anope.db"
|
||||
}
|
||||
|
||||
/*
|
||||
* [RECOMMENDED] db_json
|
||||
*
|
||||
* Stores your database in a JSON file.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "db_json"
|
||||
|
||||
/*
|
||||
* Sets the number of days backups of databases are kept. If you don't give it,
|
||||
* or if you set it to 0, Anope won't backup the databases.
|
||||
* The file that db_json will write your main database to.
|
||||
*
|
||||
* NOTE: Anope must run 24 hours a day for this feature to work.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
* This is relative to your data directory.
|
||||
*/
|
||||
keepbackups = 3
|
||||
database = "anope.json"
|
||||
|
||||
/*
|
||||
* Allows Anope to continue file write operations (i.e. database saving)
|
||||
* even if the original file cannot be backed up. Enabling this option may
|
||||
* allow Anope to continue operation under conditions where it might
|
||||
* otherwise fail, such as a nearly-full disk.
|
||||
* The file that db_json will write third-party databases to.
|
||||
*
|
||||
* NOTE: Enabling this option can cause irrecoverable data loss under some
|
||||
* conditions, so make CERTAIN you know what you're doing when you enable it!
|
||||
* {name} will be replaced with the name of the module.
|
||||
*
|
||||
* This directive is optional, and you are discouraged against enabling it.
|
||||
* This is relative to your data directory.
|
||||
*/
|
||||
#nobackupokay = yes
|
||||
module_database = "{name}.module.json"
|
||||
|
||||
/*
|
||||
* If enabled, services will fork a child process to save databases.
|
||||
* Sets how many days and months worth of backups should be kept.
|
||||
*
|
||||
* This is only useful with very large databases, with hundreds
|
||||
* of thousands of objects, that have a noticeable delay from
|
||||
* writing databases.
|
||||
*
|
||||
* If your database is large enough cause a noticeable delay when
|
||||
* saving you should consider a more powerful alternative such
|
||||
* as db_sql or db_redis, which incrementally update their
|
||||
* databases asynchronously in real time.
|
||||
* It is recommended that at the very least you keep one backup. Failure to
|
||||
* do so may result in total data loss if you ever run out of disk space or
|
||||
* have a power failure during a database write. However, if you're *REALLY*
|
||||
* sure this won't happen you can disable backups by setting these to 0.
|
||||
*/
|
||||
fork = no
|
||||
daily_backups = 7
|
||||
monthly_backups = 3
|
||||
|
||||
/*
|
||||
* The directory in which backups are kept.
|
||||
*
|
||||
* This is relative to your data directory.
|
||||
*/
|
||||
backup_directory = "backups"
|
||||
|
||||
/*
|
||||
* Allows Anope to continue writing the database even if the original can
|
||||
* not be backed up. This is not recommended as it may result in total data
|
||||
* loss during the circumstances described above.
|
||||
*/
|
||||
#ignore_backup_failure = yes
|
||||
}
|
||||
|
||||
/*
|
||||
* db_sql and db_sql_live
|
||||
*
|
||||
* db_sql module allows saving and loading databases using one of the SQL engines.
|
||||
* This module loads the databases once on startup, then incrementally updates
|
||||
* objects in the database as they are changed within Anope in real time. Changes
|
||||
* to the SQL tables not done by Anope will have no effect and will be overwritten.
|
||||
* Allows saving and loading databases to a SQL database.
|
||||
*
|
||||
* db_sql_live module allows saving and loading databases using one of the SQL engines.
|
||||
* This module reads and writes to SQL in real time. Changes to the SQL tables
|
||||
* will be immediately reflected into Anope. This module should not be loaded
|
||||
* in conjunction with db_sql.
|
||||
* db_sql loads the databases once on startup and then incrementally updates in
|
||||
* in the database as they are changed within Anope. Changes to the SQL tables
|
||||
* not done by Anope will have no effect and will be overwritten.
|
||||
*
|
||||
* db_sql_live module reads and writes to SQL in real time. Changes to the SQL
|
||||
* tables will be immediately reflected in Anope. This module can not be loaded
|
||||
* at the same time as db_sql. It should also not be used on large networks as
|
||||
* it executes quite a lot of queries which can cause performance issues.
|
||||
*
|
||||
* IMPORTANT: The SQL schema has changed in the 2.1 branch. Whilst Anope will
|
||||
* try to update your schema it is recommended that before upgrading you export
|
||||
* to a file and re-import your database on 2.1. This will remove any obsolete
|
||||
* columns and change the types of existing columns to match the new schema.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
@@ -1182,10 +1175,10 @@ module
|
||||
#name = "db_sql_live"
|
||||
|
||||
/*
|
||||
* The SQL service db_sql(_live) should use, these are configured in modules.conf.
|
||||
* For MySQL, this should probably be mysql/main.
|
||||
* The SQL service that db_sql(_live) should use. These are configured in
|
||||
* modules.example.conf. For MySQL, this should probably be mysql/main.
|
||||
*/
|
||||
engine = "sqlite/main"
|
||||
engine = "mysql/main"
|
||||
|
||||
/*
|
||||
* An optional prefix to prepended to the name of each created table.
|
||||
@@ -1193,17 +1186,22 @@ module
|
||||
*/
|
||||
#prefix = "anope_db_"
|
||||
|
||||
/* Whether or not to import data from another database module in to SQL on startup.
|
||||
* If you enable this, be sure that the database services is configured to use is
|
||||
* empty and that another database module to import from is loaded before db_sql.
|
||||
* After you enable this and do a database import you should disable it for
|
||||
* subsequent restarts.
|
||||
/*
|
||||
* Whether or not to import data from another database module in to SQL on
|
||||
* startup.
|
||||
*
|
||||
* Note that you can not import databases using db_sql_live. If you want to import
|
||||
* databases and use db_sql_live you should import them using db_sql, then shut down
|
||||
* and start services with db_sql_live.
|
||||
* If you enable this, be sure that the database Anope is configured to use
|
||||
* is empty and that another database module to import from is loaded BEFORE
|
||||
* db_sql. After you enable this and do a database import you MUST disable
|
||||
* it for subsequent restarts. If you want to keep writing a file database
|
||||
* after the SQL import is done you should load db_flatfile or db_json AFTER
|
||||
* this module.
|
||||
*
|
||||
* Note that you can not import databases using db_sql_live. If you want to
|
||||
* import databases and use db_sql_live you should import them using db_sql,
|
||||
* then shut down and start Anope with db_sql_live.
|
||||
*/
|
||||
import = false
|
||||
import = no
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1251,9 +1249,9 @@ module
|
||||
name = "enc_sha2"
|
||||
|
||||
/** The sub-algorithm to use. Can be set to sha224 for SHA-224, sha256 for
|
||||
* SHA-256, sha284 for SHA-384 or sha512 to SHA-512. Defaults to sha256.
|
||||
* SHA-256, sha384 for SHA-384, or sha512 for SHA-512. Defaults to sha512.
|
||||
*/
|
||||
#algorithm = "sha256"
|
||||
#algorithm = "sha512"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1322,7 +1320,7 @@ module
|
||||
#module { name = "enc_posix" }
|
||||
|
||||
/*
|
||||
* [DEPRECATED] enc_md5, enc_none, enc_old, enc_sha1, enc_sha256
|
||||
* [DEPRECATED] enc_md5, enc_none, enc_sha1, enc_sha256
|
||||
*
|
||||
* Provides verify-only support for passwords encrypted using encryption methods
|
||||
* from older versions of Anope. These methods are no longer considered secure
|
||||
@@ -1332,8 +1330,6 @@ module
|
||||
* enc_md5: Verifies passwords encrypted with the MD5 algorithm
|
||||
* enc_none: Verifies passwords that are not encrypted
|
||||
* enc_sha1: Verifies passwords encrypted with the SHA1 algorithm
|
||||
* enc_old: Verifies passwords encrypted with the broken MD5 algorithm used
|
||||
* before 1.7.17.
|
||||
* enc_sha256: Verifies passwords encrypted with the SHA256 algorithm using a
|
||||
* custom initialisation vector as a salt.
|
||||
*
|
||||
@@ -1342,7 +1338,6 @@ module
|
||||
*/
|
||||
#module { name = "enc_md5" }
|
||||
#module { name = "enc_none" }
|
||||
#module { name = "enc_old" }
|
||||
#module { name = "enc_sha1" }
|
||||
#module { name = "enc_sha256" }
|
||||
|
||||
@@ -1362,16 +1357,3 @@ include
|
||||
type = "file"
|
||||
name = "chanstats.example.conf"
|
||||
}
|
||||
|
||||
/*
|
||||
* IRC2SQL Gateway
|
||||
* This module collects data about users, channels and servers. It doesn't build stats
|
||||
* itself, however, it gives you the database, it's up to you how you use it.
|
||||
*
|
||||
* Requires a MySQL Database and MySQL version 5.5 or higher
|
||||
*/
|
||||
#include
|
||||
{
|
||||
type = "file"
|
||||
name = "irc2sql.example.conf"
|
||||
}
|
||||
|
||||
+20
-11
@@ -31,12 +31,12 @@ service
|
||||
/*
|
||||
* The hostname of the BotServ client.
|
||||
*/
|
||||
host = "services.host"
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the BotServ client.
|
||||
*/
|
||||
gecos = "Bot Service"
|
||||
real = "Bot Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
@@ -59,6 +59,17 @@ service
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -285,11 +296,9 @@ command { service = "BotServ"; name = "KICK ITALICS"; command = "botserv/kick/it
|
||||
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
|
||||
*
|
||||
@@ -330,14 +339,13 @@ privilege
|
||||
xop = "AOP"
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* fantasy
|
||||
*
|
||||
* Allows 'fantasist' commands to be used in channels.
|
||||
* Allows fantasy commands (e.g. !kick) to be used in channels.
|
||||
*
|
||||
* Provides the commands:
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasist commands.
|
||||
* botserv/set/fantasy - Used for enabling or disabling BotServ's fantasy commands.
|
||||
*/
|
||||
module
|
||||
{
|
||||
@@ -376,15 +384,15 @@ 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 = "HELP"; command = "generic/help"; prepend_channel = no; require_privilege = no; }
|
||||
fantasy { name = "HOP"; command = "chanserv/xop"; }
|
||||
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = false; }
|
||||
fantasy { name = "INFO"; command = "chanserv/info"; prepend_channel = no; }
|
||||
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 = "LIST"; command = "chanserv/list"; prepend_channel = no; }
|
||||
fantasy { name = "LOG"; command = "chanserv/log"; }
|
||||
fantasy { name = "MODE"; command = "chanserv/mode"; }
|
||||
fantasy { name = "MUTE"; command = "chanserv/ban"; kick = no; mode = "QUIET"; }
|
||||
@@ -392,13 +400,14 @@ 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 = "SEEN"; command = "chanserv/seen"; prepend_channel = no; }
|
||||
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"; }
|
||||
|
||||
+44
-44
@@ -21,12 +21,12 @@ service
|
||||
/*
|
||||
* The hostname of the ChanServ client.
|
||||
*/
|
||||
host = "services.host"
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the ChanServ client.
|
||||
*/
|
||||
gecos = "Channel Registration Service"
|
||||
real = "Channel Registration Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* 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 = "CS"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -89,12 +100,13 @@ module
|
||||
* not in use.
|
||||
* - cs_no_expire: Enables no expire. Needs founder, successor (if set) or anyone in the access list
|
||||
* to be a registered nick, otherwise the channel will be dropped.
|
||||
* - cs_stats: Enable Chanstats for newly registered channels
|
||||
* - none: No defaults
|
||||
*
|
||||
* This directive is optional, if left blank, the options will default to keeptopic, peace,
|
||||
* securefounder, and signkick. If you really want no defaults, use "none" by itself as the option.
|
||||
* This directive is optional, if left blank, the options will default to cs_keep_modes, keeptopic, peace,
|
||||
* persist, securefounder, and signkick. If you really want no defaults, use "none" by itself as the option.
|
||||
*/
|
||||
defaults = "keeptopic peace securefounder signkick"
|
||||
defaults = "cs_keep_modes keeptopic peace persist securefounder signkick"
|
||||
|
||||
/*
|
||||
* The maximum number of channels which may be registered to a single nickname.
|
||||
@@ -107,10 +119,9 @@ module
|
||||
/*
|
||||
* The length of time before a channel registration expires.
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
* If not set, the default is 30 days.
|
||||
* This directive is optional. If not set, the default is never.
|
||||
*/
|
||||
expire = 30d
|
||||
#expire = 90d
|
||||
|
||||
/*
|
||||
* The maximum number of entries on a channel's access list.
|
||||
@@ -153,27 +164,27 @@ module
|
||||
|
||||
/*
|
||||
* The message formatting to use for signed kick messages.
|
||||
* %n is the nick of the kicker
|
||||
* %m is the message specified
|
||||
* {nick} is the nick of the kicker
|
||||
* {message} is the message specified
|
||||
*/
|
||||
signkickformat = "%m (%n)"
|
||||
signkickformat = "{message} ({nick})"
|
||||
|
||||
/*
|
||||
* If set, prevents channel access entries from containing hostmasks.
|
||||
*/
|
||||
disallow_hostmask_access = false
|
||||
disallow_hostmask_access = no
|
||||
|
||||
/*
|
||||
* If set, prevents channels from being on access lists.
|
||||
*/
|
||||
disallow_channel_access = false
|
||||
disallow_channel_access = no
|
||||
|
||||
/*
|
||||
* If set, ChanServ will always lower the timestamp of registered channels to their registration date.
|
||||
* This prevents several race conditions where unauthorized users can join empty registered channels and set
|
||||
* modes etc. prior to services deopping them.
|
||||
*/
|
||||
always_lower_ts = false
|
||||
always_lower_ts = no
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -392,7 +403,7 @@ privilege
|
||||
}
|
||||
|
||||
/*
|
||||
* FANTASIA privilege.
|
||||
* FANTASY privilege.
|
||||
*
|
||||
* Used by botserv/main and chanserv/xop.
|
||||
*
|
||||
@@ -400,7 +411,7 @@ privilege
|
||||
*/
|
||||
privilege
|
||||
{
|
||||
name = "FANTASIA"
|
||||
name = "FANTASY"
|
||||
desc = _("Allowed to use fantasy commands")
|
||||
rank = 30
|
||||
level = 3
|
||||
@@ -727,7 +738,7 @@ privilege
|
||||
privilege
|
||||
{
|
||||
name = "SET"
|
||||
desc = _("Allowed to set channel settings")
|
||||
desc = _("Allowed to modify channel settings")
|
||||
rank = 320
|
||||
level = 9999
|
||||
flag = "s"
|
||||
@@ -936,7 +947,7 @@ command { service = "ChanServ"; name = "AKICK"; command = "chanserv/akick"; grou
|
||||
* Used for banning users from channels.
|
||||
*/
|
||||
module { name = "cs_ban" }
|
||||
command { service = "ChanServ"; name = "BAN"; command = "chanserv/ban"; }
|
||||
command { service = "ChanServ"; name = "BAN"; command = "chanserv/ban"; group = "chanserv/management"; }
|
||||
|
||||
/*
|
||||
* cs_clone
|
||||
@@ -1037,7 +1048,7 @@ command { service = "ChanServ"; name = "INVITE"; command = "chanserv/invite"; }
|
||||
* Used for kicking users from channels.
|
||||
*/
|
||||
module { name = "cs_kick" }
|
||||
command { service = "ChanServ"; name = "KICK"; command = "chanserv/kick"; }
|
||||
command { service = "ChanServ"; name = "KICK"; command = "chanserv/kick"; group = "chanserv/management"; }
|
||||
|
||||
/*
|
||||
* cs_list
|
||||
@@ -1056,10 +1067,8 @@ module
|
||||
listmax = 50
|
||||
}
|
||||
command { service = "ChanServ"; name = "LIST"; command = "chanserv/list"; }
|
||||
|
||||
command { service = "ChanServ"; name = "SET PRIVATE"; command = "chanserv/set/private"; }
|
||||
|
||||
|
||||
/*
|
||||
* cs_log
|
||||
*
|
||||
@@ -1145,7 +1154,6 @@ command { service = "ChanServ"; name = "DEHALFOP"; command = "chanserv/modes"; g
|
||||
command { service = "ChanServ"; name = "VOICE"; command = "chanserv/modes"; group = "chanserv/status"; set = "VOICE" }
|
||||
command { service = "ChanServ"; name = "DEVOICE"; command = "chanserv/modes"; group = "chanserv/status"; unset = "VOICE" }
|
||||
|
||||
|
||||
/*
|
||||
* cs_register
|
||||
*
|
||||
@@ -1168,11 +1176,8 @@ module
|
||||
{
|
||||
name = "cs_seen"
|
||||
|
||||
/* If set, uses the older 1.8 style seen, which is less resource intensive */
|
||||
simple = false
|
||||
|
||||
/* Sets the time to keep seen entries in the seen database. */
|
||||
purgetime = "30d"
|
||||
purgetime = 90d
|
||||
}
|
||||
command { service = "OperServ"; name = "SEEN"; command = "operserv/seen"; permission = "operserv/seen"; }
|
||||
|
||||
@@ -1218,7 +1223,7 @@ module
|
||||
* If set, persistent channels have their creation times lowered to their
|
||||
* original registration dates.
|
||||
*/
|
||||
persist_lower_ts = true
|
||||
persist_lower_ts = yes
|
||||
}
|
||||
command { service = "ChanServ"; name = "SET"; command = "chanserv/set"; group = "chanserv/management"; }
|
||||
command { service = "ChanServ"; name = "SET AUTOOP"; command = "chanserv/set/autoop"; }
|
||||
@@ -1246,7 +1251,7 @@ command { service = "ChanServ"; name = "SET NOEXPIRE"; command = "chanserv/saset
|
||||
* A field named misc_description may be given for use with help output.
|
||||
*/
|
||||
module { name = "cs_set_misc" }
|
||||
command { service = "ChanServ"; name = "SET URL"; command = "chanserv/set/misc"; misc_description = _("Associate a URL with the channel"); }
|
||||
command { service = "ChanServ"; name = "SET URL"; command = "chanserv/set/misc"; misc_description = _("Associate a URL with the channel"); misc_numeric = 328; }
|
||||
command { service = "ChanServ"; name = "SET EMAIL"; command = "chanserv/set/misc"; misc_description = _("Associate an email address with the channel"); }
|
||||
|
||||
/*
|
||||
@@ -1259,7 +1264,15 @@ command { service = "ChanServ"; name = "SET EMAIL"; command = "chanserv/set/misc
|
||||
*/
|
||||
module { name = "cs_status" }
|
||||
command { service = "ChanServ"; name = "STATUS"; command = "chanserv/status"; }
|
||||
command { service = "ChanServ"; name = "WHY"; command = "chanserv/status"; hide = true; }
|
||||
command { service = "ChanServ"; name = "WHY"; command = "chanserv/status"; hide = yes; }
|
||||
|
||||
/*
|
||||
* cs_statusupdate
|
||||
*
|
||||
* This module automatically updates users' status on channels when the
|
||||
* channel's access list is modified.
|
||||
*/
|
||||
module { name = "cs_statusupdate" }
|
||||
|
||||
/*
|
||||
* cs_suspend
|
||||
@@ -1278,7 +1291,7 @@ module
|
||||
* This directive is optional.
|
||||
* If not set, the default is never.
|
||||
*/
|
||||
expire = 90d
|
||||
suspendexpire = 90d
|
||||
|
||||
/*
|
||||
* Settings to show to non-opers in ChanServ's INFO output.
|
||||
@@ -1320,7 +1333,7 @@ command { service = "ChanServ"; name = "SET KEEPTOPIC"; command = "chanserv/set/
|
||||
* Used for unbanning users from channels.
|
||||
*/
|
||||
module { name = "cs_unban" }
|
||||
command { service = "ChanServ"; name = "UNBAN"; command = "chanserv/unban"; }
|
||||
command { service = "ChanServ"; name = "UNBAN"; command = "chanserv/unban"; group = "chanserv/management"; }
|
||||
|
||||
/*
|
||||
* cs_updown
|
||||
@@ -1353,16 +1366,3 @@ command { service = "ChanServ"; name = "SOP"; command = "chanserv/xop"; group =
|
||||
command { service = "ChanServ"; name = "AOP"; command = "chanserv/xop"; group = "chanserv/access"; }
|
||||
command { service = "ChanServ"; name = "HOP"; command = "chanserv/xop"; group = "chanserv/access"; }
|
||||
command { service = "ChanServ"; name = "VOP"; command = "chanserv/xop"; group = "chanserv/access"; }
|
||||
|
||||
|
||||
/*
|
||||
* Extra ChanServ related modules.
|
||||
*/
|
||||
|
||||
/*
|
||||
* cs_statusupdate
|
||||
*
|
||||
* This module automatically updates users' status on channels when the
|
||||
* channel's access list is modified.
|
||||
*/
|
||||
module { name = "cs_statusupdate" }
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
/*
|
||||
* Example configuration file for Chanstats.
|
||||
*
|
||||
* You can enable Chanstats by default by adding CS_STATS to {chanserv}:defaults
|
||||
* and NS_STATS to {nickserv}:defaults.
|
||||
*
|
||||
* Make sure BotServ, ChanServ and NickServ are running.
|
||||
*/
|
||||
|
||||
@@ -23,12 +27,6 @@ module
|
||||
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"; }
|
||||
|
||||
@@ -21,12 +21,12 @@ service
|
||||
/*
|
||||
* The hostname of the Global client.
|
||||
*/
|
||||
host = "services.host"
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the Global client.
|
||||
*/
|
||||
gecos = "Global Noticer"
|
||||
real = "Global Noticer"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -82,7 +93,7 @@ module
|
||||
#globaloncycleup = "Services are now back online - have a nice day"
|
||||
|
||||
/*
|
||||
* If set, Anope will hide the IRC Operator's nick in a global
|
||||
* If set, Anope will hide the Services Operator's nick in a global
|
||||
* message/notice.
|
||||
*
|
||||
* This directive is optional.
|
||||
|
||||
+51
-16
@@ -21,12 +21,12 @@ service
|
||||
/*
|
||||
* The hostname of the HostServ client.
|
||||
*/
|
||||
host = "services.host"
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the HostServ client.
|
||||
*/
|
||||
gecos = "vHost Service"
|
||||
real = "Hostname Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -68,7 +79,12 @@ module
|
||||
/*
|
||||
* If enabled, vhosts are activated on users immediately when they are set.
|
||||
*/
|
||||
activate_on_set = false
|
||||
activate_on_set = yes
|
||||
|
||||
/*
|
||||
* If enabled, vhosts are activated on users immediately when they log out of an operator account.
|
||||
*/
|
||||
activate_on_deoper = yes
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -90,7 +106,7 @@ command { service = "HostServ"; name = "HELP"; command = "generic/help"; }
|
||||
*
|
||||
* Provides the commands hostserv/del and hostserv/delall.
|
||||
*
|
||||
* Used for removing users' vHosts.
|
||||
* Used for removing users' vhosts.
|
||||
*/
|
||||
module { name = "hs_del" }
|
||||
command { service = "HostServ"; name = "DEL"; command = "hostserv/del"; permission = "hostserv/del"; }
|
||||
@@ -101,21 +117,21 @@ command { service = "HostServ"; name = "DELALL"; command = "hostserv/delall"; pe
|
||||
*
|
||||
* Provides the command hostserv/group.
|
||||
*
|
||||
* Used for grouping one vHost to many nicks.
|
||||
* Used for syncing one vhost to many nicks.
|
||||
*/
|
||||
module
|
||||
{
|
||||
name = "hs_group"
|
||||
|
||||
/*
|
||||
* Upon nickserv/group, this option syncs the nick's main vHost to the grouped nick.
|
||||
* Upon nickserv/group, this option syncs the nick's main vhost to the grouped nick.
|
||||
*/
|
||||
syncongroup = true
|
||||
syncongroup = yes
|
||||
|
||||
/*
|
||||
* This makes vhosts act as if they are per account.
|
||||
*/
|
||||
synconset = true
|
||||
synconset = yes
|
||||
}
|
||||
command { service = "HostServ"; name = "GROUP"; command = "hostserv/group"; }
|
||||
|
||||
@@ -124,7 +140,7 @@ command { service = "HostServ"; name = "GROUP"; command = "hostserv/group"; }
|
||||
*
|
||||
* Provides the command hostserv/list.
|
||||
*
|
||||
* Used for listing actively set vHosts.
|
||||
* Used for listing actively set vhosts.
|
||||
*/
|
||||
module { name = "hs_list" }
|
||||
command { service = "HostServ"; name = "LIST"; command = "hostserv/list"; permission = "hostserv/list"; }
|
||||
@@ -134,7 +150,7 @@ command { service = "HostServ"; name = "LIST"; command = "hostserv/list"; permis
|
||||
*
|
||||
* Provides the command hostserv/off.
|
||||
*
|
||||
* Used for turning off your vHost.
|
||||
* Used for turning off your vhost.
|
||||
*/
|
||||
module { name = "hs_off" }
|
||||
command { service = "HostServ"; name = "OFF"; command = "hostserv/off"; }
|
||||
@@ -144,7 +160,7 @@ command { service = "HostServ"; name = "OFF"; command = "hostserv/off"; }
|
||||
*
|
||||
* Provides the command hostserv/on.
|
||||
*
|
||||
* Used for turning on your vHost.
|
||||
* Used for turning on your vhost.
|
||||
*/
|
||||
module { name = "hs_on" }
|
||||
command { service = "HostServ"; name = "ON"; command = "hostserv/on"; }
|
||||
@@ -152,36 +168,55 @@ command { service = "HostServ"; name = "ON"; command = "hostserv/on"; }
|
||||
/*
|
||||
* hs_request
|
||||
*
|
||||
* Provides the commands hostserv/request, hostserv/activate, hostserv/reject, and hostserv/waiting.
|
||||
* Provides the commands:
|
||||
* hostserv/request - Requests a vhost.
|
||||
* hostserv/activate - Approves a requested vhost.
|
||||
* hostserv/reject - Rejects a requested vhost.
|
||||
* hostserv/waiting - Lists pending vhost requests.
|
||||
* hostserv/validate - Allows self-service approval of vhosts using DNS
|
||||
* validation (requires the dns module).
|
||||
*
|
||||
* Used to manage vHosts requested by users.
|
||||
* 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
|
||||
* 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.
|
||||
* If set, Anope will send a memo to all services staff when a new vhost is requested.
|
||||
*/
|
||||
#memooper = yes
|
||||
|
||||
/*
|
||||
* If DNS validation is enabled, how long should users have to wait between
|
||||
* attempts at DNS validation. Defaults to 5 minutes.
|
||||
*/
|
||||
#validationcooldown = 5m
|
||||
|
||||
/*
|
||||
* If DNS validation is enabled, the TXT record to look for when determining
|
||||
* if the requester controls the domain. Defaults to anope-dns-validation.
|
||||
*/
|
||||
#validationrecord = "anope-dns-validation"
|
||||
}
|
||||
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"; }
|
||||
#command { service = "HostServ"; name = "VALIDATE"; command = "hostserv/validate"; }
|
||||
|
||||
/*
|
||||
* hs_set
|
||||
*
|
||||
* Provides the commands hostserv/set and hostserv/setall.
|
||||
*
|
||||
* Used for setting users' vHosts.
|
||||
* Used for setting users' vhosts.
|
||||
*/
|
||||
module { name = "hs_set" }
|
||||
command { service = "HostServ"; name = "SET"; command = "hostserv/set"; permission = "hostserv/set"; }
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
/*
|
||||
* 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 = "stats.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"
|
||||
}
|
||||
@@ -21,12 +21,12 @@ service
|
||||
/*
|
||||
* The hostname of the MemoServ client.
|
||||
*/
|
||||
host = "services.host"
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the MemoServ client.
|
||||
*/
|
||||
gecos = "Memo Service"
|
||||
real = "Memo Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -78,8 +89,7 @@ module
|
||||
/*
|
||||
* 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.
|
||||
* space (and memory).
|
||||
*
|
||||
* This directive is optional, but recommended.
|
||||
*/
|
||||
@@ -186,8 +196,6 @@ command { service = "MemoServ"; name = "READ"; command = "memoserv/read"; }
|
||||
* Provides the command memoserv/rsend.
|
||||
*
|
||||
* Used to send a memo requiring a receipt be sent back once it is read.
|
||||
*
|
||||
* Requires configuring memoserv:memoreceipt.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
@@ -198,7 +206,7 @@ command { service = "MemoServ"; name = "READ"; command = "memoserv/read"; }
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
operonly = false
|
||||
operonly = no
|
||||
}
|
||||
#command { service = "MemoServ"; name = "RSEND"; command = "memoserv/rsend"; }
|
||||
|
||||
|
||||
+225
-59
@@ -41,7 +41,6 @@ module { name = "help" }
|
||||
*/
|
||||
timeout = 5
|
||||
|
||||
|
||||
/* Only edit below if you are expecting to use os_dns or otherwise answer DNS queries. */
|
||||
|
||||
/*
|
||||
@@ -54,7 +53,6 @@ module { name = "help" }
|
||||
ip = "0.0.0.0"
|
||||
port = 53
|
||||
|
||||
|
||||
/*
|
||||
* SOA record information.
|
||||
*/
|
||||
@@ -65,7 +63,7 @@ module { name = "help" }
|
||||
/* 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
|
||||
/* The time secondary servers are allowed to cache for. This should be reasonably low
|
||||
* if you want your records to be updated without much delay.
|
||||
*/
|
||||
refresh = 3600
|
||||
@@ -119,15 +117,15 @@ module { name = "help" }
|
||||
time = 4h
|
||||
|
||||
/* Reason for akill.
|
||||
* %n is the nick of the user
|
||||
* %u is the ident/username of the user
|
||||
* %g is the realname of the user
|
||||
* %h is the hostname of the user
|
||||
* %i is the IP of the user
|
||||
* %r is the reply reason (configured below). Will be nothing if not configured.
|
||||
* %N is the network name set in networkinfo:networkname
|
||||
* {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=%i for info"
|
||||
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
|
||||
@@ -171,7 +169,7 @@ module { name = "help" }
|
||||
{
|
||||
name = "dnsbl.dronebl.org"
|
||||
time = 4h
|
||||
reason = "You have a host listed in the DroneBL. For more information, visit https://dronebl.org/lookup_branded?ip=%i&network=%N"
|
||||
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 */
|
||||
@@ -233,7 +231,7 @@ module { name = "help" }
|
||||
}
|
||||
|
||||
/*
|
||||
* ldap [EXTRA]
|
||||
* [EXTRA] ldap
|
||||
*
|
||||
* This module allows other modules to use LDAP. By itself, this module does nothing useful.
|
||||
*/
|
||||
@@ -270,10 +268,10 @@ module { name = "help" }
|
||||
|
||||
/*
|
||||
* 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.
|
||||
* {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))"
|
||||
search_filter = "(&(uid={account})(objectClass={object_class}))"
|
||||
|
||||
/*
|
||||
* The object class used by LDAP to store user account information.
|
||||
@@ -304,13 +302,13 @@ module { name = "help" }
|
||||
*
|
||||
* If not set, then registration is not blocked.
|
||||
*/
|
||||
#disable_register_reason = "To register on this network visit https://some.misconfigured.site/register"
|
||||
#disable_register_reason = "To register on this network visit https://some.misconfigured.site.example/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"
|
||||
#disable_email_reason = "To change your email address visit https://some.misconfigured.site.example"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -327,7 +325,7 @@ module { name = "help" }
|
||||
|
||||
/*
|
||||
* An optional binddn to use when searching for groups.
|
||||
* %a is replaced with the account name of the user.
|
||||
* {account} is replaced with the account name of the user.
|
||||
*/
|
||||
#binddn = "cn=Manager,dc=anope,dc=org"
|
||||
|
||||
@@ -343,9 +341,9 @@ module { name = "help" }
|
||||
|
||||
/*
|
||||
* The filter to use when searching for users.
|
||||
* %a is replaced with the account name of the user.
|
||||
* {account} is replaced with the account name of the user.
|
||||
*/
|
||||
filter = "(member=uid=%a,ou=users,dc=anope,dc=org)"
|
||||
filter = "(member=uid={account},ou=users,dc=anope,dc=org)"
|
||||
|
||||
/*
|
||||
* The attribute of the group that is the name of the opertype.
|
||||
@@ -355,7 +353,7 @@ module { name = "help" }
|
||||
}
|
||||
|
||||
/*
|
||||
* mysql [EXTRA]
|
||||
* [EXTRA] mysql
|
||||
*
|
||||
* This module allows other modules to use MySQL.
|
||||
*/
|
||||
@@ -372,6 +370,7 @@ module { name = "help" }
|
||||
username = "anope"
|
||||
password = "mypassword"
|
||||
port = 3306
|
||||
socket = ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -401,7 +400,7 @@ module { name = "help" }
|
||||
}
|
||||
|
||||
/*
|
||||
* regex_pcre2 [EXTRA]
|
||||
* [EXTRA] regex_pcre2
|
||||
*
|
||||
* Provides the regex engine regex/pcre, which uses version 2 of the Perl Compatible Regular
|
||||
* Expressions library.
|
||||
@@ -409,7 +408,7 @@ module { name = "help" }
|
||||
#module { name = "regex_pcre2" }
|
||||
|
||||
/*
|
||||
* regex_posix [EXTRA]
|
||||
* [EXTRA] regex_posix
|
||||
*
|
||||
* Provides the regex engine regex/posix, which uses the POSIX compliant regular expressions.
|
||||
*/
|
||||
@@ -439,7 +438,7 @@ module
|
||||
}
|
||||
|
||||
/*
|
||||
* regex_tre [EXTRA]
|
||||
* [EXTRA] regex_tre
|
||||
*
|
||||
* Provides the regex engine regex/tre, which uses the TRE regex library.
|
||||
*/
|
||||
@@ -456,7 +455,7 @@ module
|
||||
service = "ChanServ"; name = "CLEAR"; command = "rewrite"
|
||||
|
||||
/* Enable rewrite. */
|
||||
rewrite = true
|
||||
rewrite = yes
|
||||
|
||||
/* Source message to match. A $ can be used to match anything. */
|
||||
rewrite_source = "CLEAR $ USERS"
|
||||
@@ -549,26 +548,16 @@ module
|
||||
|
||||
/*
|
||||
* The reason to ban the user for.
|
||||
* %h is replaced with the type of proxy found.
|
||||
* %i is replaced with the IP of proxy found.
|
||||
* %p is replaced with the port.
|
||||
* {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 (%t:%i:%p)"
|
||||
reason = "You have an open proxy running on your host ({type}:{ip}:{port})"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* sasl
|
||||
*
|
||||
* Some IRCds allow "SASL" authentication to let users identify to services
|
||||
* during the IRCd user registration process. If this module is loaded, Anope will allow
|
||||
* authenticating users through this mechanism. Supported mechanisms are:
|
||||
* PLAIN, EXTERNAL.
|
||||
*/
|
||||
module { name = "sasl" }
|
||||
|
||||
/*
|
||||
* ssl_gnutls [EXTRA]
|
||||
* [EXTRA] ssl_gnutls
|
||||
*
|
||||
* This module provides SSL services to Anope using GnuTLS, for example to
|
||||
* connect to the uplink server(s) via SSL.
|
||||
@@ -607,7 +596,7 @@ module { name = "sasl" }
|
||||
}
|
||||
|
||||
/*
|
||||
* ssl_openssl [EXTRA]
|
||||
* [EXTRA] ssl_openssl
|
||||
*
|
||||
* This module provides SSL services to Anope using OpenSSL, for example to
|
||||
* connect to the uplink server(s) via SSL.
|
||||
@@ -679,24 +668,41 @@ module { name = "sasl" }
|
||||
*/
|
||||
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"
|
||||
#disable_reason = "To register on this network visit https://some.misconfigured.site.example/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"
|
||||
#disable_email_reason = "To change your email address visit https://some.misconfigured.site.example"
|
||||
}
|
||||
|
||||
/*
|
||||
* 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
|
||||
* that allows logging Services' logs to SQL. To log to SQL, add
|
||||
* the SQL service name to log:targets prefixed by sql_log:. For
|
||||
* example:
|
||||
*
|
||||
@@ -715,8 +721,8 @@ module { name = "sasl" }
|
||||
/*
|
||||
* 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.
|
||||
* This module allows granting users Services Operator privileges based on an
|
||||
* external SQL database using a custom query.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
@@ -739,7 +745,7 @@ module { name = "sasl" }
|
||||
}
|
||||
|
||||
/*
|
||||
* sqlite [EXTRA]
|
||||
* [EXTRA] sqlite
|
||||
*
|
||||
* This module allows other modules to use SQLite.
|
||||
*/
|
||||
@@ -754,7 +760,7 @@ module { name = "sasl" }
|
||||
name = "sqlite/main"
|
||||
|
||||
/* The database name, it will be created if it does not exist. */
|
||||
database = "anope.db"
|
||||
database = "anope.sqlite"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -772,36 +778,196 @@ module { name = "sasl" }
|
||||
name = "webcpanel"
|
||||
|
||||
/* Web server to use. */
|
||||
server = "httpd/main";
|
||||
server = "httpd/main"
|
||||
|
||||
/*
|
||||
* The directory containing the webcpanel templates. This is relative to the
|
||||
* data directory.
|
||||
*/
|
||||
template_dir = "webcpanel/templates/default";
|
||||
template_dir = "webcpanel/templates/default"
|
||||
|
||||
/* Page title. */
|
||||
title = "Anope IRC Services";
|
||||
title = "Anope IRC Services"
|
||||
}
|
||||
|
||||
/*
|
||||
* xmlrpc
|
||||
* 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 (xmlrpc_main) to receive and send XMLRPC queries.
|
||||
* Allows remote applications to execute methods within Anope using the JSON-RPC
|
||||
* protocol. See https://www.jsonrpc.org/specification for more information.
|
||||
*
|
||||
* By itself this module does nothing. You should load a RPC method module like
|
||||
* rpc_data which actually provides RPC methods.
|
||||
*
|
||||
* See docs/RPC/jsonrpc.js for an example JavaScript JSON-RPC client.
|
||||
* See docs/RPC/jsonrpc.rb for an example Ruby JSON-RPC client.
|
||||
*
|
||||
* IMPORTANT: this can not be loaded at the same time as the xmlrpc module.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "jsonrpc"
|
||||
|
||||
/*
|
||||
* The maximum number of bits an integer can be have in its native type.
|
||||
*
|
||||
* By default Anope will emit integers as their native JSON type. If you are
|
||||
* using JavaScript (which has 53 bit integers) or another language with
|
||||
* native integer types smaller than 64 bits you may need to limit the size
|
||||
* of integers emitted by Anope.
|
||||
*
|
||||
* If this is enabled a string will be used for values outside of the range
|
||||
* supported by the native data type.
|
||||
*/
|
||||
#integer_bits = 53
|
||||
|
||||
/* Web service to use. Requires httpd. */
|
||||
server = "httpd/main"
|
||||
|
||||
/*
|
||||
* You can also specify one or more authorization tokens to protect access
|
||||
* to the JSON-RPC interface. These tokens should be sent using the Bearer
|
||||
* authorization header as defined in RFC 6750.
|
||||
*/
|
||||
#token
|
||||
{
|
||||
/* The token used for authentication. */
|
||||
token = "BmcxTaiYjoBtayfnxCFq"
|
||||
|
||||
/*
|
||||
* The algorithm which the above token is hashed with. If this is not
|
||||
* set then services will assume the above password is not hashed.
|
||||
*
|
||||
* You will need to have the appropriate encryption module (e.g.
|
||||
* enc_bcrypt) loaded in order for this to work.
|
||||
*/
|
||||
#token_hash = "bcrypt"
|
||||
|
||||
/** A list of glob patterns for methods the token can execute. */
|
||||
methods = "~anope.message* anope.*"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* [EXTRA] xmlrpc
|
||||
*
|
||||
* Allows remote applications to execute methods within Anope using the XML-RPC
|
||||
* protocol. See https://xmlrpc.com/spec.md for more information.
|
||||
*
|
||||
* By itself this module does nothing. You should load a RPC method module like
|
||||
* rpc_data which actually provides RPC methods.
|
||||
*
|
||||
* IMPORTANT: this can not be loaded at the same time as the jsonrpc module.
|
||||
*/
|
||||
#module
|
||||
{
|
||||
name = "xmlrpc"
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
/* Web service to use. Requires httpd. */
|
||||
server = "httpd/main"
|
||||
|
||||
/*
|
||||
* You can also specify one or more authorization tokens to protect access
|
||||
* to the XML-RPC interface. These tokens should be sent using the Bearer
|
||||
* authorization header as defined in RFC 6750.
|
||||
*/
|
||||
#token
|
||||
{
|
||||
/* The token used for authentication. */
|
||||
token = "BmcxTaiYjoBtayfnxCFq"
|
||||
|
||||
/*
|
||||
* The algorithm which the above token is hashed with. If this is not
|
||||
* set then services will assume the above password is not hashed.
|
||||
*
|
||||
* You will need to have the appropriate encryption module (e.g.
|
||||
* enc_bcrypt) loaded in order for this to work.
|
||||
*/
|
||||
#token_hash = "bcrypt"
|
||||
|
||||
/** A list of glob patterns for methods the token can execute. */
|
||||
methods = "~anope.message* anope.*"
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* xmlrpc_main
|
||||
* rpc_user
|
||||
*
|
||||
* Adds the main XMLRPC core functions.
|
||||
* Requires xmlrpc.
|
||||
* Adds support for the following RPC methods:
|
||||
*
|
||||
* anope.checkCredentials anope.identify
|
||||
* anope.listCommands anope.command
|
||||
*
|
||||
* Requires either the jsonrpc or xmlrpc module.
|
||||
*
|
||||
* See docs/RPC/rpc_user.md for API documentation.
|
||||
*/
|
||||
#module { name = "xmlrpc_main" }
|
||||
#module
|
||||
{
|
||||
name = "rpc_user"
|
||||
|
||||
/*
|
||||
* Some commands can only be executed by a real IRC user. You can work around
|
||||
* this executing them as an IRC user logged into the account if one exists.
|
||||
*/
|
||||
pretenduser = 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_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" }
|
||||
|
||||
+305
-120
@@ -21,12 +21,12 @@ service
|
||||
/*
|
||||
* The hostname of the NickServ client.
|
||||
*/
|
||||
host = "services.host"
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the NickServ client.
|
||||
*/
|
||||
gecos = "Nickname Registration Service"
|
||||
real = "Nickname Registration Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -75,11 +86,14 @@ module
|
||||
/*
|
||||
* 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 = no
|
||||
#confirmemailchanges = yes
|
||||
|
||||
/*
|
||||
* A message sent to users on connect if they use an unregistered nick. %n will be replaced with the user's nickname.
|
||||
* 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.
|
||||
*/
|
||||
@@ -91,11 +105,6 @@ module
|
||||
* by spaces.
|
||||
*
|
||||
* The options are:
|
||||
* - killprotect: Kill nick if not identified within 60 seconds
|
||||
* - kill_quick: Kill nick if not identified within 20 seconds, this one overrides the killprotect
|
||||
* option and the killprotect option must be specified with this one
|
||||
* - kill_immed: Kill nick immediately if not identified, this one overrides both the killprotect
|
||||
* and kill_quick options and the killprotect option must be specified with this one
|
||||
* - 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
|
||||
@@ -106,14 +115,15 @@ module
|
||||
* - 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, requires options:useprivmsg
|
||||
* to be enabled as well
|
||||
* - 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.
|
||||
* - ns_stats: Enable Chanstats for newly registered nicks
|
||||
*
|
||||
* 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 = "killprotect ns_private hide_email hide_mask memo_signon memo_receive autoop"
|
||||
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
|
||||
@@ -124,9 +134,9 @@ module
|
||||
/*
|
||||
* The length of time before a nick's registration expires.
|
||||
*
|
||||
* This directive is optional, but recommended. If not set, the default is 90 days.
|
||||
* This directive is optional, but recommended. If not set, the default is one year.
|
||||
*/
|
||||
expire = 90d
|
||||
expire = 1y
|
||||
|
||||
/*
|
||||
* Prevents the use of the ACCESS and CERT (excluding their LIST subcommand), DROP, FORBID, SUSPEND
|
||||
@@ -155,14 +165,28 @@ module
|
||||
* If set, Anope will not show netsplits in the last quit message field
|
||||
* of NickServ's INFO command.
|
||||
*/
|
||||
hidenetsplitquit = no
|
||||
hidenetsplitquit = yes
|
||||
|
||||
/*
|
||||
* If set, is the length of time NickServ's killquick and kill options wait before
|
||||
* forcing users off of protected nicknames.
|
||||
* The default period to force users to stop using a protected nickname after.
|
||||
*
|
||||
* Defaults to 1 minute.
|
||||
*/
|
||||
killquick = 20s
|
||||
kill = 60s
|
||||
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
|
||||
@@ -179,11 +203,13 @@ module
|
||||
#restrictopernicks = yes
|
||||
|
||||
/*
|
||||
* The username, and possibly hostname, used for fake users created when Anope needs to
|
||||
* hold a nickname.
|
||||
* The username, hostname, and real name used for pseudoclients created when
|
||||
* Anope needs to hold a nickname. This is only used if your IRCd does not
|
||||
* support SVSHOLDs.
|
||||
*/
|
||||
enforceruser = "enforcer"
|
||||
enforcerhost = "services.host"
|
||||
enforcerhost = "${services.host}"
|
||||
enforcerreal = "Services Enforcer"
|
||||
|
||||
/*
|
||||
* The length of time Anope should hold nicknames for.
|
||||
@@ -193,13 +219,17 @@ module
|
||||
releasetimeout = 1m
|
||||
|
||||
/*
|
||||
* When a user's nick is forcibly changed to enforce a "nick kill", their new nick will start
|
||||
* with this value. The rest will be made up of 6 or 7 digits.
|
||||
* Make sure this is a valid nick and Nicklen+7 is not longer than the allowed Nicklen on your ircd.
|
||||
* 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.
|
||||
*
|
||||
* This directive is optional. If not set it defaults to "Guest"
|
||||
* 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####"
|
||||
*/
|
||||
guestnickprefix = "Guest"
|
||||
guestnick = "Guest####"
|
||||
|
||||
/*
|
||||
* If set, Anope does not allow ownership of nick names, only ownership of accounts.
|
||||
@@ -219,6 +249,12 @@ module
|
||||
* This directive is optional. If not set it defaults to 50.
|
||||
*/
|
||||
maxpasslen = 50
|
||||
|
||||
/*
|
||||
* Whether all of the secondary nicks of an account have to expire or be
|
||||
* dropped before the display nick can expire or be dropped.
|
||||
*/
|
||||
preservedisplay = no
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -273,7 +309,7 @@ command { service = "NickServ"; name = "AJOIN"; command = "nickserv/ajoin"; }
|
||||
*/
|
||||
module { name = "ns_alist" }
|
||||
command { service = "NickServ"; name = "ALIST"; command = "nickserv/alist"; }
|
||||
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/alist"; hide = true; }
|
||||
command { service = "NickServ"; name = "ACCESS"; command = "nickserv/alist"; hide = yes; }
|
||||
|
||||
/*
|
||||
* ns_cert
|
||||
@@ -286,6 +322,12 @@ 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.
|
||||
@@ -294,6 +336,16 @@ module
|
||||
}
|
||||
command { service = "NickServ"; name = "CERT"; command = "nickserv/cert"; }
|
||||
|
||||
/*
|
||||
* ns_confirm
|
||||
*
|
||||
* Provides the command nickserv/confirm.
|
||||
*
|
||||
* Used for confirming previous account actions.
|
||||
*/
|
||||
module { name = "ns_confirm" }
|
||||
command { service = "NickServ"; name = "CONFIRM"; command = "nickserv/confirm"; }
|
||||
|
||||
/*
|
||||
* ns_drop
|
||||
*
|
||||
@@ -305,21 +357,56 @@ module { name = "ns_drop" }
|
||||
command { service = "NickServ"; name = "DROP"; command = "nickserv/drop"; }
|
||||
|
||||
/*
|
||||
* ns_getemail
|
||||
* ns_email
|
||||
*
|
||||
* Provides the command nickserv/getemail.
|
||||
* Provides various functionality relating to email addresses. This includes the
|
||||
* following commands:
|
||||
*
|
||||
* Used for getting registered accounts by searching for emails.
|
||||
* - nickserv/confirm/email: Used for confirming email changes.
|
||||
* - nickserv/getemail: Used for getting accounts by searching for emails.
|
||||
* - nickserv/set/email, nickserv/saset/email: Used for setting an account's
|
||||
* emailvaddress.
|
||||
*/
|
||||
module { name = "ns_getemail" }
|
||||
module
|
||||
{
|
||||
name = "ns_email"
|
||||
|
||||
/*
|
||||
* The amount of time a user has after requesting a change of email address
|
||||
* before it expires. Defaults to 1 day.
|
||||
*/
|
||||
#changeexpire = 1d
|
||||
|
||||
/*
|
||||
* The limit to how many registered accounts 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
|
||||
|
||||
/*
|
||||
* Whether to attempt to remove aliases when counting email addresses. This
|
||||
* means removing dots (.) and anything after a plus (+) in the user part of
|
||||
* the address, e.g. foo.bar+baz@example.com -> foobar@example.com.
|
||||
*/
|
||||
#remove_aliases = yes
|
||||
}
|
||||
command { service = "NickServ"; name = "CONFIRM EMAIL"; command = "nickserv/confirm/email"; }
|
||||
command { service = "NickServ"; name = "GETEMAIL"; command = "nickserv/getemail"; permission = "nickserv/getemail"; group = "nickserv/admin"; }
|
||||
command { service = "NickServ"; name = "SET EMAIL"; command = "nickserv/set/email"; }
|
||||
command { service = "NickServ"; name = "SASET EMAIL"; command = "nickserv/saset/email"; permission = "nickserv/saset/email"; }
|
||||
|
||||
/*
|
||||
* ns_group
|
||||
*
|
||||
* Provides the commands nickserv/group, nickserv/glist, and nickserv/ungroup.
|
||||
* Provides the commands:
|
||||
* nickserv/group
|
||||
* nickserv/ungroup
|
||||
* nickserv/glist
|
||||
* nickserv/saset/display
|
||||
* nickserv/set/display
|
||||
*
|
||||
* Used for controlling nick groups.
|
||||
* Used for controlling grouped nicknames.
|
||||
*/
|
||||
module
|
||||
{
|
||||
@@ -344,6 +431,12 @@ module
|
||||
command { service = "NickServ"; name = "GLIST"; command = "nickserv/glist"; }
|
||||
command { service = "NickServ"; name = "GROUP"; command = "nickserv/group"; }
|
||||
command { service = "NickServ"; name = "UNGROUP"; command = "nickserv/ungroup"; }
|
||||
command { service = "NickServ"; name = "SET DISPLAY"; command = "nickserv/set/display"; }
|
||||
command { service = "NickServ"; name = "SASET DISPLAY"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; }
|
||||
|
||||
# For compatibility with Atheme.
|
||||
command { service = "NickServ"; name = "SET ACCOUNTNAME"; command = "nickserv/set/display"; hide = yes; }
|
||||
command { service = "NickServ"; name = "SASET ACCOUNTNAME"; command = "nickserv/saset/display"; permission = "nickserv/saset/display"; hide = yes; }
|
||||
|
||||
/*
|
||||
* ns_identify
|
||||
@@ -361,7 +454,7 @@ module
|
||||
*/
|
||||
maxlogins = 10
|
||||
}
|
||||
command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; hide = true; }
|
||||
command { service = "NickServ"; name = "ID"; command = "nickserv/identify"; hide = yes; }
|
||||
command { service = "NickServ"; name = "IDENTIFY"; command = "nickserv/identify"; }
|
||||
|
||||
/*
|
||||
@@ -378,7 +471,6 @@ 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
|
||||
*
|
||||
@@ -397,11 +489,9 @@ module
|
||||
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
|
||||
*
|
||||
@@ -434,13 +524,13 @@ module
|
||||
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; }
|
||||
command { service = "NickServ"; name = "GHOST"; command = "nickserv/recover"; hide = yes; }
|
||||
command { service = "NickServ"; name = "RELEASE"; command = "nickserv/recover"; hide = yes; }
|
||||
|
||||
/*
|
||||
* ns_register
|
||||
*
|
||||
* Provides the commands nickserv/confirm, nickserv/register, and nickserv/resend.
|
||||
* Provides the commands nickserv/confirm/register, nickserv/register, and nickserv/resend.
|
||||
*
|
||||
* Used for registering accounts.
|
||||
*/
|
||||
@@ -449,11 +539,15 @@ 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.
|
||||
* The method for confirming account registrations. Possible values are:
|
||||
*
|
||||
* "admin" to require confirmation by a Services Operator.
|
||||
* "code" to require confirmation with a code provided via IRC.
|
||||
* "disable" to disable account registration.
|
||||
* "mail" to require confirmation with a code provided via email.
|
||||
* "none" to automatically confirm (this is the default).
|
||||
*/
|
||||
registration = "none"
|
||||
registration = "code"
|
||||
|
||||
/*
|
||||
* The minimum length of time between consecutive uses of NickServ's RESEND command.
|
||||
@@ -468,7 +562,7 @@ module
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
nickregdelay = 15s
|
||||
#nickregdelay = 1m
|
||||
|
||||
/*
|
||||
* The length of time a user using an unconfirmed account has
|
||||
@@ -476,80 +570,162 @@ module
|
||||
*/
|
||||
#unconfirmedexpire = 1d
|
||||
}
|
||||
command { service = "NickServ"; name = "CONFIRM"; command = "nickserv/confirm"; }
|
||||
command { service = "NickServ"; name = "CONFIRM REGISTER"; command = "nickserv/confirm/register"; }
|
||||
command { service = "NickServ"; name = "REGISTER"; command = "nickserv/register"; }
|
||||
command { service = "NickServ"; name = "RESEND"; command = "nickserv/resend"; }
|
||||
|
||||
/*
|
||||
* ns_resetpass
|
||||
*
|
||||
* Provides the command nickserv/resetpass.
|
||||
* Provides the command nickserv/confirm/resetpass and nickserv/resetpass.
|
||||
*
|
||||
* Used for resetting passwords by emailing users a temporary one.
|
||||
*/
|
||||
module { name = "ns_resetpass" }
|
||||
module
|
||||
{
|
||||
name = "ns_resetpass"
|
||||
|
||||
/*
|
||||
* The amount of time a user has after requesting a password reset before it
|
||||
* expires. Defaults to 1 day.
|
||||
*/
|
||||
#resetexpire = 1d
|
||||
}
|
||||
command { service = "NickServ"; name = "CONFIRM RESETPASS"; command = "nickserv/confirm/resetpass"; }
|
||||
command { service = "NickServ"; name = "RESETPASS"; command = "nickserv/resetpass"; }
|
||||
|
||||
# For compatibility with Anope 2.0.
|
||||
command { service = "NickServ"; name = "GETPASS"; command = "nickserv/resetpass"; hide = yes; }
|
||||
|
||||
/*
|
||||
* 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"
|
||||
|
||||
/*
|
||||
* Sets the number of invalid SASL authentication attempts before services
|
||||
* removes a partially-connected user from the network. If not defined then
|
||||
* the value specified in options:badpasslimit will be used instead.
|
||||
*/
|
||||
#badpasslimit = 1
|
||||
|
||||
/*
|
||||
* Sets the time after which invalid SASL authentication attempts are
|
||||
* forgotten about. If a user does not fail to authenticate in this amount
|
||||
* of time, the incorrect password count will reset to zero. If not defined
|
||||
* then the value specified in options:badpasstimeout will be used instead.
|
||||
*/
|
||||
#badpasstimeout = 15m
|
||||
}
|
||||
|
||||
/*
|
||||
* ns_sasl_anonymous, ns_sasl_external, ns_sasl_plain
|
||||
*
|
||||
* Provides support for the following SASL mechanisms:
|
||||
*
|
||||
* ns_sasl_anonymous: Adds the ANONYMOUS mechanism which allows logging out of
|
||||
* an account. See RFC 4505 for more details.
|
||||
* ns_sasl_external: Adds the EXTERNAL mechanism which allows logging into an
|
||||
account using a TLS client certificate. See RFC 4422 for
|
||||
for more details.
|
||||
* ns_sasl_plain: Adds the PLAIN mechanism which allows logging in to an
|
||||
account using a plain text username and password. See RFC
|
||||
4422 for more details.
|
||||
*/
|
||||
module { name = "ns_sasl_anonymous" }
|
||||
module { name = "ns_sasl_external" }
|
||||
module { name = "ns_sasl_plain" }
|
||||
|
||||
/*
|
||||
* 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/kill, nickserv/saset/kill - Used for configuring nickname protection.
|
||||
* nickserv/set/language, nickserv/saset/language - Used for configuring what language services use.
|
||||
* nickserv/set/message, nickserv/saset/message - Used to configure how services send messages to you.
|
||||
* nickserv/set/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"
|
||||
|
||||
/*
|
||||
* Allow the use of the IMMED option in the NickServ SET KILL command.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
#allowkillimmed = yes
|
||||
}
|
||||
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 KEEPMODES"; command = "nickserv/set/keepmodes"; }
|
||||
command { service = "NickServ"; name = "SASET KEEPMODES"; command = "nickserv/saset/keepmodes"; permission = "nickserv/saset/keepmodes"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/kill"; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/kill"; permission = "nickserv/saset/kill"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET LANGUAGE"; command = "nickserv/set/language"; }
|
||||
command { service = "NickServ"; name = "SASET LANGUAGE"; command = "nickserv/saset/language"; permission = "nickserv/saset/language"; }
|
||||
|
||||
command { service = "NickServ"; name = "SET MESSAGE"; command = "nickserv/set/message"; }
|
||||
command { service = "NickServ"; name = "SASET MESSAGE"; command = "nickserv/saset/message"; permission = "nickserv/saset/message"; }
|
||||
|
||||
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_layout
|
||||
*
|
||||
* Provides the command nickserv/set/layout and nickserv/saset/layout.
|
||||
*
|
||||
* Allows configuring the layout that services uses.
|
||||
*/
|
||||
module { name = "ns_set_layout" }
|
||||
command { service = "NickServ"; name = "SET LAYOUT"; command = "nickserv/set/layout"; }
|
||||
command { service = "NickServ"; name = "SASET LAYOUT"; command = "nickserv/saset/layout"; permission = "nickserv/saset/layout"; }
|
||||
|
||||
/*
|
||||
* 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
|
||||
@@ -562,12 +738,44 @@ command { service = "NickServ"; name = "SASET NOEXPIRE"; command = "nickserv/sas
|
||||
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 FACEBOOK"; command = "nickserv/set/misc"; misc_description = _("Associate a Facebook URL with your account"); }
|
||||
#command { service = "NickServ"; name = "SASET FACEBOOK"; command = "nickserv/saset/misc"; misc_description = _("Associate a Facebook URL with this account"); permission = "nickserv/saset/facebook"; group = "nickserv/admin"; }
|
||||
#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 LOCATION"; command = "nickserv/set/misc"; misc_description = _("Associate a location with your account"); }
|
||||
#command { service = "NickServ"; name = "SASET LOCATION"; command = "nickserv/saset/misc"; misc_description = _("Associate a location with this account"); permission = "nickserv/saset/location"; group = "nickserv/admin"; }
|
||||
|
||||
/*
|
||||
* ns_set_op
|
||||
*
|
||||
* Provides the commands:
|
||||
* nickserv/set/autoop, nickserv/saset/autoop - Allows configuring whether status modes are automatically granted when joining a channel.
|
||||
* nickserv/set/neverop, nickserv/saset/neverop - Allows configuring whether a user can be added to access lists.
|
||||
*/
|
||||
module { name = "ns_set_op" }
|
||||
|
||||
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 NEVEROP"; command = "nickserv/set/neverop"; }
|
||||
command { service = "NickServ"; name = "SASET NEVEROP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop"; }
|
||||
|
||||
# For compatibility with DALnet Services.
|
||||
command { service = "NickServ"; name = "SET NOOP"; command = "nickserv/set/neverop"; hide = yes; }
|
||||
command { service = "NickServ"; name = "SASET NOOP"; command = "nickserv/saset/neverop"; permission = "nickserv/saset/neverop"; hide = yes; }
|
||||
|
||||
/*
|
||||
* ns_set_protect
|
||||
*
|
||||
* Provides the commands nickserv/set/protect and nickserv/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/protect"; }
|
||||
|
||||
# For compatibility with Anope 2.0.
|
||||
command { service = "NickServ"; name = "SET KILL"; command = "nickserv/set/protect"; hide = yes; }
|
||||
command { service = "NickServ"; name = "SASET KILL"; command = "nickserv/saset/protect"; permission = "nickserv/saset/protect"; hide = yes; }
|
||||
|
||||
/*
|
||||
* ns_suspend
|
||||
@@ -602,30 +810,7 @@ command { service = "NickServ"; name = "UNSUSPEND"; command = "nickserv/unsuspen
|
||||
*
|
||||
* Provides the command nickserv/update.
|
||||
*
|
||||
* Used to update your status on all channels, turn on your vHost, etc.
|
||||
* 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
|
||||
}
|
||||
|
||||
@@ -21,12 +21,12 @@ service
|
||||
/*
|
||||
* The hostname of the OperServ client.
|
||||
*/
|
||||
host = "services.host"
|
||||
host = "${services.host}"
|
||||
|
||||
/*
|
||||
* The realname of the OperServ client.
|
||||
*/
|
||||
gecos = "Operator Service"
|
||||
real = "Operator Service"
|
||||
|
||||
/*
|
||||
* The modes this client should use.
|
||||
@@ -49,6 +49,17 @@ service
|
||||
* 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"
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -100,7 +111,7 @@ module
|
||||
killonsqline = yes
|
||||
|
||||
/*
|
||||
* Adds the nickname of the IRC Operator issuing an AKILL to the kill reason.
|
||||
* Adds the nickname of the Services Operator issuing an AKILL to the kill reason.
|
||||
*
|
||||
* This directive is optional.
|
||||
*/
|
||||
@@ -276,15 +287,15 @@ command { service = "OperServ"; name = "CHANKILL"; command = "operserv/chankill"
|
||||
* 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,
|
||||
* Alternatively, you may use a secondary DNS server to hide services' 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; };
|
||||
* type secondary;
|
||||
* primaries { 127.0.0.1 port 5353; };
|
||||
* };
|
||||
*
|
||||
* Where 127.0.0.1:5353 is the IP and port services are listening on.
|
||||
@@ -491,6 +502,13 @@ module
|
||||
* 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"; }
|
||||
@@ -569,7 +587,7 @@ module
|
||||
*
|
||||
* This directive is optional, if not set, nothing will be sent.
|
||||
*/
|
||||
sessionlimitexceeded = "The session limit for your IP %IP% has been exceeded."
|
||||
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
|
||||
@@ -638,8 +656,18 @@ command { service = "OperServ"; name = "SET"; command = "operserv/set"; permissi
|
||||
*
|
||||
* Used to quit, restart, or shutdown services.
|
||||
*/
|
||||
module { name = "os_shutdown" }
|
||||
command { service = "OperServ"; name = "QUIT"; command = "operserv/quit"; permission = "operserv/quit"; }
|
||||
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"; }
|
||||
|
||||
|
||||
@@ -1,518 +0,0 @@
|
||||
/*
|
||||
* 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 define values to other values, which can be used to easily change
|
||||
* many values in the configuration at once.
|
||||
*/
|
||||
|
||||
/*
|
||||
* The stats.host define is used in multiple different locations throughout the
|
||||
* configuration for the stats client hostname.
|
||||
*/
|
||||
define
|
||||
{
|
||||
name = "stats.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 = "stats.example.com"
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
/*
|
||||
* Sets the interval between sending warning messages for program errors via
|
||||
* WALLOPS/GLOBOPS.
|
||||
*/
|
||||
warningtimeout = 4h
|
||||
|
||||
/*
|
||||
* 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"
|
||||
}
|
||||
@@ -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>
|
||||
* PeGaSuS <droider.pc@gmail.com>
|
||||
* Daniel Vassdal <shutter@canternet.org>
|
||||
* MatthewM <mcm@they-got.us>
|
||||
* 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>
|
||||
* Val Lorentz <progval+git@progval.net>
|
||||
* Bram Matthys <syzop@vulnscan.org>
|
||||
* Federico G. Schwindt <fgsch@lodoss.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>
|
||||
+231
@@ -1,3 +1,234 @@
|
||||
Anope Version 2.1.18
|
||||
--------------------
|
||||
Added a check that a non-deprecated database module is loaded.
|
||||
Added support for flexible and monospace layouts to make text easier to read on clients that use a variable-width font.
|
||||
Added support for logging about deprecated modules on boot.
|
||||
Added support for per-IRCd hints when a link fails.
|
||||
Added support for self-service validation of vhosts using DNS TXT records.
|
||||
Added support for separate bad password limits for pre-connection SASL authentication.
|
||||
Added support for SRV and TXT records to the dns module.
|
||||
Added the --nodb option to disable database and encrytption module checks.
|
||||
Added the nickname registration date to the nickserv/glist output.
|
||||
Changed db_flatfile to be import-only (migrate to db_json).
|
||||
Changed the default registration confirmation type to code validation.
|
||||
Changed the fantasy !help command to not require the FANTASY privilege by default.
|
||||
Changed various length measurement code to be UTF-8 aware.
|
||||
Disabled the nickname registration delay by default.
|
||||
Fixed reporting the MySQL version that the mysql module was built against.
|
||||
Improved the layout of the nickserv/info command.
|
||||
Modularised the ns_sasl module to make it easier to pick SASL mechanisms.
|
||||
Moved duration rounding logic from Anope::Expires to Anope::Duration.
|
||||
Removed support for importing old databases from 1.8.
|
||||
Removed support for verifying "old MD5" passwords from 1.7.
|
||||
Reworked how memory is allocated when formatting messages.
|
||||
|
||||
Anope Version 2.1.17
|
||||
--------------------
|
||||
Allowed opers to resend passwords for users in nickserv/resend.
|
||||
Fixed HostServ using a different valid username character set to the protocol module.
|
||||
Fixed losing the channel and nickname registration time when upgrading from an earlier 2.1 release.
|
||||
Improved the messages sent when a user is forced off a protected nickname.
|
||||
Simplified copying modules to the runtime directory on Windows.
|
||||
|
||||
Anope Version 2.1.16
|
||||
--------------------
|
||||
Added support for on-IRC code confirmation.
|
||||
Added the ability for fantasy commands to be executable without the FANTASY privilege.
|
||||
Added the ability to prepend to topics as well as appending to them.
|
||||
Changed various fields to serialize to the database as a string not an integer.
|
||||
Disabled db_flatfile by default in preparation for becoming import-only.
|
||||
Fixed a memory leak in the db_json module.
|
||||
Fixed building on OpenSSL 1.1.1 (for now).
|
||||
Fixed removed and later re-added temporary bans being removed automatically.
|
||||
Fixed sometimes sending malformed LMODE messages on InspIRCd.
|
||||
Fixed the "did you mean" message suggesting unloaded commands.
|
||||
Fixed various issues with the example config files.
|
||||
Marked db_json as the recommended database module.
|
||||
Moved the BAN, UNBAN, and KICK commands to the chanserv/management group.
|
||||
Removed support for the 1.8-style seen command.
|
||||
Reworked confirmation to allow confirmation of multiple account actions.
|
||||
When dropping a display nickname the new display will now be the oldest in the group.
|
||||
|
||||
Anope Version 2.1.15
|
||||
--------------------
|
||||
Added a workaround to the jsonrpc module for JavaScript truncating big integers.
|
||||
Added an example Ruby library for accessing the RPC interface.
|
||||
Added away state and tls usage to the anope.user RPC event.
|
||||
Added support for looking up accounts by identifier in the anope.account RPC event.
|
||||
Added support for storing the setter and set time and setter of list modes and restoring them on InspIRCd and Solanum.
|
||||
Added support for token authentication to the RPC modules.
|
||||
Added the anope.checkCredentials, anope.identify, anope.listCommands, and anope.command RPC events to the new rpc_user module.
|
||||
Bumped the minimum supported version of ircd-hybrid to 8.2.34.
|
||||
Deprecated irc2sql in favour of rpc_data.
|
||||
Dropped support for Bahamut as it has no known users.
|
||||
Fixed creating duplicate Stats rows on some servers.
|
||||
Fixed loading databases in db_json.
|
||||
Fixed restoring cloaked hosts on InspIRCd when the cloak module is not loaded.
|
||||
Fixed some variable shadowing that potentially caused issues with the SQL database backends.
|
||||
Fixed sometimes writing accounts to the database without a unique identifier.
|
||||
Fixed various documentation issues with the example JavaScript JSON-RPC client.
|
||||
Improved CTCP handling and added support for more CTCP types.
|
||||
|
||||
Anope Version 2.1.14
|
||||
--------------------
|
||||
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
|
||||
--------------------
|
||||
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 2.1.12
|
||||
--------------------
|
||||
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.
|
||||
|
||||
Anope Version 2.1.11
|
||||
--------------------
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
+158
-25
@@ -1,3 +1,137 @@
|
||||
Anope Version 2.1.18
|
||||
--------------------
|
||||
Added the hostserv/validate command.
|
||||
Added the nickserv/saset/layout command.
|
||||
Added the nickserv/set/layout command.
|
||||
Added the ns_sasl_anonymous module.
|
||||
Added the ns_sasl_external module.
|
||||
Added the ns_sasl_plain module.
|
||||
Added the ns_set_layout module.
|
||||
Added the ns_set_op module.
|
||||
Added {hs_request}:validationcooldown (defaults to 5 minutes).
|
||||
Added {hs_request}:validationrecord (defaults to "anope-dns-validation").
|
||||
Added {ns_sasl}:badpasslimit (defaults to options:badpasslimit).
|
||||
Added {ns_sasl}:badpasstimeout (defaults to options:badpasstimeout).
|
||||
Moved nickserv/set/autoop and nickserv/saset/autoop to the ns_set_op module.
|
||||
Moved nickserv/set/display and nickserv/saset/display to the ns_set_group module.
|
||||
Moved nickserv/set/neverop and nickserv/saset/neverop to the ns_set_op module.
|
||||
Removed the db_old module.
|
||||
Removed the enc_old module.
|
||||
Removed {db_flatfile}:fork (module is now import-only).
|
||||
Removed {db_flatfile}:keepbackups (module is now import-only).
|
||||
Removed {db_flatfile}:nobackupokay (module is now import-only).
|
||||
|
||||
Anope Version 2.1.17
|
||||
--------------------
|
||||
Added the nickserv/resend oper privilege.
|
||||
|
||||
Anope Version 2.1.16
|
||||
--------------------
|
||||
Added fantasy:require_privilege (defaults to yes).
|
||||
Added the nickserv/confirm/email command.
|
||||
Added the nickserv/confirm/email oper privilege.
|
||||
Added the nickserv/confirm/register command.
|
||||
Added the ns_confirm module.
|
||||
Added {ns_email}:changeexpire (defaults to 1 day).
|
||||
Added {ns_resetpass}:resetexpire (defaults to 1 day).
|
||||
Removed the irc2sql module (migrate to JSON-RPC instead).
|
||||
Removed {ns_seen}:simple (1.8-style seen has been removed).
|
||||
Renamed the nickserv/confirm oper privilege to nickserv/confirm/register.
|
||||
|
||||
Anope Version 2.1.15
|
||||
--------------------
|
||||
Added the ns_email module.
|
||||
Added the rpc_user module.
|
||||
Added {jsonrpc}:integer_bits (defaults to 64).
|
||||
Added {jsonrpc}:token.
|
||||
Added {nickserv}:enforcerreal (defaults to "Services Enforcer").
|
||||
Added {xmlrpc}:token.
|
||||
Moved nickserv/set/email and nickserv/saset/email to the ns_email module.
|
||||
Removed the bahamut module.
|
||||
Removed the ns_getemail module (load ns_email instead).
|
||||
Removed the ns_maxemail module (load ns_email instead).
|
||||
Removed the rpc_main module (migrate to the other RPC modules).
|
||||
Removed {chanstats}:cs_def_chanstats (add CS_STATS to {chanserv}:defaults instead).
|
||||
Removed {chanstats}:ns_def_chanstats (add NS_STATS to {nickserv}:defaults instead).
|
||||
Renamed service:gecos to service:real.
|
||||
|
||||
Anope Version 2.1.14
|
||||
--------------------
|
||||
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}:filter, {nickserv}:unregistered_notice, {os_session}:sessionlimitexceeded, {proxyscan}:proxyscan:reason.
|
||||
|
||||
Anope Version 2.1.13
|
||||
--------------------
|
||||
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.
|
||||
|
||||
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.
|
||||
|
||||
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 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
|
||||
-------------------
|
||||
No significant changes.
|
||||
|
||||
Anope Version 2.1.8
|
||||
-------------------
|
||||
Added the nickserv/drop/display oper privilege.
|
||||
Added {nickserv}:preservedisplay (defaults to no).
|
||||
|
||||
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.
|
||||
@@ -10,22 +144,21 @@ Added the enc_posix module.
|
||||
Added the enc_sha2 module.
|
||||
Added the gl_queue module.
|
||||
Added the gl_server module.
|
||||
Added the global/queue operator privilege.
|
||||
Added the global/server operator privilege.
|
||||
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 module:accessmax for the chanserv module to 1000.
|
||||
Changed the default value of module:inhabit for the chanserv module to 1 minute.
|
||||
Changed the default value of module:max for the cs_mode module to 50.
|
||||
Changed the default value of module:max for the ms_ignore module to 50.
|
||||
Removed options:seed.
|
||||
Replaced module:template for the webcpanel module with module:template_dir.
|
||||
|
||||
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.
|
||||
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.
|
||||
@@ -35,21 +168,21 @@ 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 module:defaults from the chanserv module (now always enabled).
|
||||
Removed the nickserv/saset/secure command.
|
||||
Removed the nickserv/saset/secure oper privilege.
|
||||
Removed the nickserv/set/secure command.
|
||||
Removed the nickserv/status command.
|
||||
Removed the ns_access module.
|
||||
Removed the ns_secure option in module:defaults from the nickserv module (now always enabled).
|
||||
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 module:tlsv10 to the ssl_openssl module for configuring whether TLSv1.0 is usable (defaults to no).
|
||||
Added module:tlsv11 to the ssl_openssl module for configuring whether TLSv1.1 is usable (defaults to yes).
|
||||
Added module:tlsv12 to the ssl_openssl module for configuring whether TLSv1.2 is usable (defaults to yes).
|
||||
Removed module:sslv3 from the ssl_openssl module (now always disabled).
|
||||
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
|
||||
-------------------
|
||||
@@ -58,14 +191,14 @@ 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 as it is obsolete now nickserv:minpasslen exists.
|
||||
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 {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.
|
||||
Replaced uplink:ipv6 with uplink:protocol (defaults to ipv4).
|
||||
|
||||
+1
-1
@@ -90,4 +90,4 @@ Anope DefCon
|
||||
6) Support
|
||||
|
||||
You might get DefCon support by posting on our online forum, or maybe on
|
||||
our #anope channel at /server irc.anope.org.
|
||||
our #anope channel at /server irc.teranova.net.
|
||||
|
||||
+6
-6
@@ -27,7 +27,7 @@ Note: You should also read the README and FAQ files!
|
||||
cmake --version
|
||||
|
||||
If it's installed, you will get a line that says something similar to
|
||||
"cmake version 2.8.12.2". 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:
|
||||
@@ -60,7 +60,7 @@ Note: You should also read the README and FAQ files!
|
||||
most likely not work!
|
||||
|
||||
If you need help, you should visit https://forum.anope.org/ or #anope on
|
||||
irc.anope.org. Provide *complete* error output, along with other relevant
|
||||
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.
|
||||
|
||||
@@ -111,17 +111,17 @@ Note: You should also read the README and FAQ files!
|
||||
A crontab entry will allow you to check periodically whether Anope is
|
||||
still running, and restart it if not.
|
||||
|
||||
First rename the example.chk script that is in Anope path (by default,
|
||||
this is ~/anope/conf) to anope.chk and edit it. You'll need to
|
||||
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 anope.chk, and try to launch the
|
||||
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/anope/conf/anope.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
|
||||
|
||||
+6
-6
@@ -27,7 +27,7 @@ Note : Vous devrez également lire les fichiers README et FAQ !
|
||||
cmake --version
|
||||
|
||||
Si CMake est installé, vous aurez une ligne qui dit quelque chose comme
|
||||
"cmake version 2.8.12.2". Si la version est inférieure à 2.4 ou si vous
|
||||
"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 :
|
||||
@@ -64,7 +64,7 @@ Note : Vous devrez également lire les fichiers README et FAQ !
|
||||
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.anope.org.
|
||||
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
|
||||
@@ -121,11 +121,11 @@ Note : Vous devrez également lire les fichiers README et FAQ !
|
||||
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 example.chk qui est dans les dossiers
|
||||
d'Anope (par défaut, ~/anope/conf) en anope.chk et modifiez-le.
|
||||
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 anope.chk et essayez de lancer le script pour voir
|
||||
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 ;))
|
||||
|
||||
@@ -133,7 +133,7 @@ Note : Vous devrez également lire les fichiers README et FAQ !
|
||||
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/anope.chk > /dev/null 2>&1
|
||||
*/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).
|
||||
|
||||
+8
-4
@@ -19,6 +19,8 @@ Anope Multi Language Support
|
||||
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
|
||||
@@ -27,15 +29,17 @@ Anope Multi Language Support
|
||||
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 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.
|
||||
There are several control characters within the messages. These are mostly IRC formatting codes (https://modern.ircdocs.horse/formatting)
|
||||
but 0x1A is special to Anope and is used to prevent the automatic linewrapper from breaking messages in the middle of
|
||||
text that should not be split (e.g. commands). Your editor may not show these so be careful you don't delete them!
|
||||
|
||||
NOTE: There is no guarantee we will use your work so please do not be offended if we say no thanks.
|
||||
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
|
||||
|
||||
|
||||
+1
-1
@@ -111,7 +111,7 @@ 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
|
||||
|
||||
|
||||
+6
-7
@@ -1,7 +1,7 @@
|
||||
Anope -- a set of IRC services for IRC networks
|
||||
-----------------------------------------------
|
||||
|
||||
Anope is 2003-2024 Anope Team <team@anope.org>.
|
||||
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>.
|
||||
|
||||
@@ -160,20 +160,19 @@ Table of Contents
|
||||
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
|
||||
* 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
|
||||
* ircd-hybrid 8.2.23 or later
|
||||
* InspIRCd 3 or later
|
||||
* ircd-hybrid 8.2.34 or later
|
||||
* ircd-ratbox 3 or later
|
||||
* ngIRCd 19.2 or later
|
||||
* Plexus 3 or later
|
||||
* Ratbox 2.0.6 or later
|
||||
* Solanum (all versions)
|
||||
* UnrealIRCd 4 or later
|
||||
* 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.
|
||||
@@ -245,7 +244,7 @@ Table of Contents
|
||||
|
||||
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 be as
|
||||
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.
|
||||
|
||||
|
||||
@@ -0,0 +1,270 @@
|
||||
// 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} host The RPC host base URL.
|
||||
* @param {string} token The bearer token for authorizing with the RPC interface.
|
||||
*/
|
||||
constructor(host, token = "") {
|
||||
this.host = host;
|
||||
this.token = token;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 body = JSON.stringify({
|
||||
"jsonrpc": "2.0",
|
||||
"method": method,
|
||||
"params": params.map((p) => p.toString()),
|
||||
"id": Math.random().toString(36).slice(2)
|
||||
});
|
||||
const headers = new Headers();
|
||||
if (this.token) {
|
||||
headers.append("Authorization", `Bearer ${btoa(this.token)}`);
|
||||
}
|
||||
const response = await fetch(this.host, {
|
||||
method: 'POST',
|
||||
headers: headers,
|
||||
body: body
|
||||
});
|
||||
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} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of accounts.
|
||||
*/
|
||||
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} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of channels.
|
||||
*/
|
||||
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} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of services operators.
|
||||
*/
|
||||
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} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of servers.
|
||||
*/
|
||||
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} detail The level of detail to request.
|
||||
* @returns {(array|object)} A list of users.
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks whether the specified credentials are valid.
|
||||
*
|
||||
* Requires the rpc_user module to be loaded.
|
||||
*
|
||||
* @param {string} account A nickname belonging to the account to check.
|
||||
* @param {string} password The password for the specified account.
|
||||
* @returns {object} An object containing basic information about the account.
|
||||
*/
|
||||
checkCredentials(account, password) {
|
||||
return this.run("anope.checkCredentials", account, password);
|
||||
}
|
||||
|
||||
/**
|
||||
* Identifies an IRC user to the specified account.
|
||||
*
|
||||
* Requires the rpc_user module to be loaded.
|
||||
*
|
||||
* @param {string} account Either an account identifier or nickname belonging to the account to
|
||||
* identify to.
|
||||
* @param {string} password The nickname of the IRC user to identify to the account.
|
||||
*/
|
||||
identify(account, user) {
|
||||
return this.run("anope.identify", account, user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all commands that exist on the network.
|
||||
*
|
||||
* Requires the rpc_user module to be loaded.
|
||||
*
|
||||
* @param {...*} services The nicknames of the services to list commands for.
|
||||
* @returns {object} An object containing information about the available commands.
|
||||
*/
|
||||
listCommands(...services) {
|
||||
return this.run("anope.listCommands", ...services);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all commands that exist on the network.
|
||||
*
|
||||
* Requires the rpc_user module to be loaded.
|
||||
*
|
||||
* @param {string} account If non-empty then the account to execute the command as.
|
||||
* @param {string} service The service which the command exists on.
|
||||
* @param {...*} command The the command to execute and any parameters to pass to it.
|
||||
* @returns {object} An object containing information about the available commands.
|
||||
*/
|
||||
command(account, service, ...command) {
|
||||
return this.run("anope.command", account, service, ...command);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
const arpc = new AnopeRPC("http://127.0.0.1:8080/jsonrpc");
|
||||
arpc.listServers("full").then(servers => {
|
||||
console.log(servers);
|
||||
}).catch (error => {
|
||||
console.log(error);
|
||||
});
|
||||
*/
|
||||
@@ -0,0 +1,242 @@
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
require "base64"
|
||||
require "json"
|
||||
require "net/http"
|
||||
|
||||
# Implements methods for accessing an Anope JSON-RPC server.
|
||||
class AnopeRPC
|
||||
|
||||
# The RPC host base URL.
|
||||
attr_accessor :host
|
||||
|
||||
# The bearer token for authorizing with the RPC interface.
|
||||
attr_accessor :token
|
||||
|
||||
# Initializes a new AnopeRPC instance with the specified RPC host.
|
||||
#
|
||||
# @param host [String] The RPC host base URL.
|
||||
# @param token [String] The bearer token for authorizing with the RPC interface.
|
||||
def initialize(host, token = nil)
|
||||
@host = URI(host)
|
||||
@token = token
|
||||
end
|
||||
|
||||
# Executes an arbitrary RPC query.
|
||||
#
|
||||
# @param method [String] The name of the method to execute.
|
||||
# @param params [Object] The parameters pass to the method.
|
||||
# @return [Object] The result of the RPC query.
|
||||
private def run(method, *params)
|
||||
body = {
|
||||
jsonrpc: "2.0",
|
||||
method: method,
|
||||
params: params.map(&:to_s),
|
||||
id: rand(36**16).to_s(36)
|
||||
}.to_json
|
||||
|
||||
headers = {}
|
||||
headers["Authorization"] = "Bearer #{Base64.strict_encode64(@token)}" if @token
|
||||
|
||||
response = Net::HTTP.post(@host, body, headers)
|
||||
raise "HTTP returned #{response.status}" unless response.is_a?(Net::HTTPSuccess)
|
||||
|
||||
json = JSON.parse(response.body, symbolize_names: true)
|
||||
raise "JSON-RPC returned #{json[:error][:code]}: #{json[:error][:message]}" if json.key?(:error)
|
||||
|
||||
json.dig(:result)
|
||||
end
|
||||
|
||||
# Retrieves a list of accounts.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of account names.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# accounts.
|
||||
def list_accounts(detail = :name)
|
||||
self.run("anope.listAccounts", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified account.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the account.
|
||||
# @return [Hash] A hash containing information about the account.
|
||||
def account(name)
|
||||
self.run("anope.account", name)
|
||||
end
|
||||
|
||||
# Retrieves a list of channels.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of channel names.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# channels.
|
||||
def list_channels(detail = :name)
|
||||
self.run("anope.listChannels", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified channel.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the channel.
|
||||
# @return [Hash] A hash containing information about the channel.
|
||||
def channel(name)
|
||||
self.run("anope.channel", name)
|
||||
end
|
||||
|
||||
# Retrieves a list of services operators.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of services operator names.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# services operators.
|
||||
def list_opers(detail = :name)
|
||||
self.run("anope.listOpers", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified services operator.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the services operator.
|
||||
# @return [Hash] A hash containing information about the services operator.
|
||||
def oper(name)
|
||||
self.run("anope.oper", name)
|
||||
end
|
||||
|
||||
# Retrieves a list of servers.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of server names.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# servers.
|
||||
def list_servers(detail = :name)
|
||||
self.run("anope.listServers", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified server.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the server.
|
||||
# @return [Hash] A hash containing information about the server.
|
||||
def server(name)
|
||||
self.run("anope.server", name)
|
||||
end
|
||||
|
||||
# Retrieves a list of users.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param detail [Symbol] detail The level of detail to request.
|
||||
# @return [Array] If the detail level is set to :name then an array of user nicknames.
|
||||
# @return [Hash] If the detail level is set to :full then a hash of information about the
|
||||
# users.
|
||||
def list_users(detail = :name)
|
||||
self.run("anope.listUsers", detail)
|
||||
end
|
||||
|
||||
# Retrieves information about the specified user.
|
||||
#
|
||||
# Requires the rpc_data module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the user.
|
||||
# @return [Hash] A hash containing information about the user.
|
||||
def user(name)
|
||||
self.run("anope.user", name)
|
||||
end
|
||||
|
||||
# Sends a message to every user on the network.
|
||||
#
|
||||
# Requires the rpc_message module to be loaded.
|
||||
#
|
||||
# @param messages [Array<String>] One or more messages to send.
|
||||
def message_network(*messages)
|
||||
self.run("anope.messageNetwork", *messages)
|
||||
end
|
||||
|
||||
# Sends a message to every user on the specified server.
|
||||
#
|
||||
# Requires the rpc_message module to be loaded.
|
||||
#
|
||||
# @param name [String] The name of the server.
|
||||
# @param messages [Array<String>] One or more messages to send.
|
||||
def message_server(server, *messages)
|
||||
self.run("anope.messageServer", server, *messages)
|
||||
end
|
||||
|
||||
# Sends a message to the specified user.
|
||||
#
|
||||
# Requires the rpc_message module to be loaded.
|
||||
#
|
||||
# @param source [String] The source pseudoclient to send the message from.
|
||||
# @param target [String] The target user to send the message to.
|
||||
# @param messages [Array<String>] One or more messages to send.
|
||||
def message_user(source, target, *messages)
|
||||
self.run("anope.messageUser", source, target, *messages)
|
||||
end
|
||||
|
||||
# Checks whether the specified credentials are valid.
|
||||
#
|
||||
# Requires the rpc_user module to be loaded.
|
||||
#
|
||||
# @param account [String] A nickname belonging to the account to check.
|
||||
# @param password [String] The password for the specified account.
|
||||
# @return [Hash] A hash containing basic information about the account.
|
||||
def check_credentials(account, password)
|
||||
self.run("anope.checkCredentials", account, password)
|
||||
end
|
||||
|
||||
# Identifies an IRC user to the specified account.
|
||||
#
|
||||
# Requires the rpc_user module to be loaded.
|
||||
#
|
||||
# @param account [String] Either an account identifier or nickname belonging to the account to
|
||||
# identify to.
|
||||
# @param password [String] The nickname of the IRC user to identify to the account.
|
||||
def identify(account, user)
|
||||
self.run("anope.identify", account, user)
|
||||
end
|
||||
|
||||
# Lists all commands that exist on the network.
|
||||
#
|
||||
# Requires the rpc_user module to be loaded.
|
||||
#
|
||||
# @param services [Array<String>] The nicknames of the services to list commands for.
|
||||
# @return [Hash] A hash containing information about the available commands.
|
||||
def list_commands(*services)
|
||||
self.run("anope.listCommands", *services)
|
||||
end
|
||||
|
||||
# Lists all commands that exist on the network.
|
||||
#
|
||||
# Requires the rpc_user module to be loaded.
|
||||
#
|
||||
# @param account [String] If non-empty then the account to execute the command as.
|
||||
# @param service [String] The service which the command exists on.
|
||||
# @param command [Array<String>] The the command to execute and any parameters to pass to it.
|
||||
# @return [Hash] A hash containing information about the available commands.
|
||||
def command(account, service, *command)
|
||||
self.run("anope.command", account, service, *command)
|
||||
end
|
||||
end
|
||||
|
||||
=begin
|
||||
arpc = AnopeRPC.new("http://127.0.0.1:8080/jsonrpc")
|
||||
begin
|
||||
pp arpc.list_servers(:full)
|
||||
rescue StandardError => err
|
||||
STDERR.puts err
|
||||
end
|
||||
=end
|
||||
@@ -0,0 +1,463 @@
|
||||
# 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 | Either a nickname belonging to the account or an account identifier.
|
||||
|
||||
### 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.
|
||||
away | map or null | The user's away state or null if they are not away.
|
||||
away.message | string | The away message specified by the user.
|
||||
away.time | int | The UNIX time at which the user went away.
|
||||
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.
|
||||
tls | bool | Whether the user is connected using TLS (SSL).
|
||||
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",
|
||||
"away": null,
|
||||
"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,
|
||||
"tls": true,
|
||||
"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.
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
# Anope `rpc_user` RPC interface
|
||||
|
||||
## `anope.checkCredentials`
|
||||
|
||||
Checks whether the specified credentials are valid.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | A nickname belonging to the account to check.
|
||||
1 | The password for the specified account.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified account does not exist.
|
||||
-32098 | The specified password is not correct.
|
||||
-32097 | The specified account is suspended.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing basic information about the account. More information about the account can be found by calling [the `anope.account` event using the value from the `uniqueid` field (requires the rpc_data module)](./rpc_user.md).
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
account | string | The display nickname of the account.
|
||||
confirmed | boolean | Whether the account has been confirmed.
|
||||
uniqueid | uint | The unique immutable identifier of the account.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"account": "foo",
|
||||
"confirmed": true,
|
||||
"uniqueid": 11085415958920757000,
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.identify`
|
||||
|
||||
Identifies an IRC user to the specified account.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | Either an account identifier or nickname belonging to the account to identify to.
|
||||
1 | The nickname of the IRC user to identify to the account.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified account does not exist.
|
||||
-32098 | The specified IRC user does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
This procedure returns no result.
|
||||
|
||||
## `anope.listCommands`
|
||||
|
||||
Lists all commands that exist on the network.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0...n | The nicknames of the services to list commands for. If none are specified then all commands are returned.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32098 | The specified service does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns a map containing information about the available commands.
|
||||
|
||||
Key | Type | Description
|
||||
--- | ---- | -----------
|
||||
\* | map | A key-value map of services to the commands that exist on them.
|
||||
\*.\* | string | A key-value map of commands to information about the commands.
|
||||
\*.\*.group | string or null | The group that the command belongs to or null if the command is not grouped.
|
||||
\*.\*.hidden | boolean | Whether the command is visible in the help output.
|
||||
\*.\*.maxparams | uint or null | The maximum number of parameters that the command accepts or null if there is no limit.
|
||||
\*.\*.minparams | uint | The minimum number of parameters that the command accepts.
|
||||
\*.\*.permission | string or null | The services operator permission required to execute the command or null if no permissions are required.
|
||||
\*.\*.requiresaccount | boolean | Whether a caller must be logged into an account to execute the command.
|
||||
\*.\*.requiresuser | boolean | Whether an IRC user is required to execute the command.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
{
|
||||
"Global": {
|
||||
"GLOBAL": {
|
||||
"group": null,
|
||||
"hidden": false,
|
||||
"maxparams": 1,
|
||||
"minparams": 0,
|
||||
"permission": "global/global",
|
||||
"requiresaccount": true,
|
||||
"requiresuser": false
|
||||
},
|
||||
"HELP": {
|
||||
"group": null,
|
||||
"hidden": false,
|
||||
"maxparams": null,
|
||||
"minparams": 0,
|
||||
"permission": null,
|
||||
"requireaccount": false,
|
||||
"requireuser": false
|
||||
},
|
||||
"QUEUE": {
|
||||
"group": null,
|
||||
"hidden": false,
|
||||
"maxparams": 2,
|
||||
"minparams": 1,
|
||||
"permission": "global/queue",
|
||||
"requireaccount": true,
|
||||
"requireuser": false
|
||||
},
|
||||
"SERVER": {
|
||||
"group": null,
|
||||
"hidden": false,
|
||||
"maxparams": 2,
|
||||
"minparams": 1,
|
||||
"permission": "global/server",
|
||||
"requireaccount": true,
|
||||
"requireuser": false
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `anope.commands`
|
||||
|
||||
Executes the specified command.
|
||||
|
||||
### Parameters
|
||||
|
||||
Index | Description
|
||||
----- | -----------
|
||||
0 | If non-empty then the account to execute the command as.
|
||||
1 | The service which the command exists on.
|
||||
2...n | The the command to execute and any parameters to pass to it.
|
||||
|
||||
### Errors
|
||||
|
||||
Code | Description
|
||||
------ | -----------
|
||||
-32099 | The specified account does not exist.
|
||||
-32098 | The specified service does not exist.
|
||||
-32097 | The specified command does not exist.
|
||||
|
||||
### Result
|
||||
|
||||
Returns an array of messages returned by the command.
|
||||
|
||||
#### Example
|
||||
|
||||
```json
|
||||
[
|
||||
"Global commands:",
|
||||
" GLOBAL Send a message to all users",
|
||||
" HELP Displays this list and give information about commands",
|
||||
" QUEUE Manages your pending message queue.",
|
||||
" SERVER Send a message to all users on a server"
|
||||
]
|
||||
```
|
||||
@@ -1,29 +0,0 @@
|
||||
XMLRPC using PHP'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 XMLRPC calls, provided by xmlrpc_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 XMLRPC.
|
||||
|
||||
stats - Takes no parameters, returns miscellaneous stats that can be found in the /operserv stats command.
|
||||
|
||||
channel - Takes one parameter, a channel name, and returns real time information regarding that channel, such as users, modes
|
||||
(ban lists and such), topic etc.
|
||||
|
||||
user - Takes one parameter, a user name, and returns real time information regarding that user.
|
||||
|
||||
opers - Takes no parameters, returns opertypes, their privileges and commands.
|
||||
|
||||
notice - Takes three parameters, source user, target user, and message. Sends a message to the user.
|
||||
|
||||
XMLRPC 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/XMLRPC.
|
||||
|
||||
Also note that 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.
|
||||
@@ -1,145 +0,0 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* XMLRPC Functions
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*/
|
||||
|
||||
class AnopeXMLRPC
|
||||
{
|
||||
/**
|
||||
* The XMLRPC host
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $host;
|
||||
|
||||
/**
|
||||
* Initiate a new AnopeXMLRPC instance
|
||||
*
|
||||
* @param $host
|
||||
*/
|
||||
public function __construct($host)
|
||||
{
|
||||
$this->host = $host;
|
||||
}
|
||||
|
||||
/**
|
||||
* Run an XMLRPC 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)
|
||||
{
|
||||
$xmlquery = xmlrpc_encode_request($name, $params);
|
||||
$context = stream_context_create(["http" => [
|
||||
"method" => "POST",
|
||||
"header" => "Content-Type: text/xml",
|
||||
"content" => $xmlquery]]);
|
||||
|
||||
$inbuf = file_get_contents($this->host, false, $context);
|
||||
$response = xmlrpc_decode($inbuf);
|
||||
|
||||
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 && $ret["result"] == "Success") {
|
||||
return $ret["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("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("notice", [$source, $target, $message]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Like channel(), but different.
|
||||
*
|
||||
* @param $user
|
||||
* @return array|null
|
||||
*/
|
||||
public function user($user)
|
||||
{
|
||||
return $this->run("user", [$user]);
|
||||
}
|
||||
}
|
||||
|
||||
$anope = new AnopeXMLRPC("http://127.0.0.1:8080/xmlrpc");
|
||||
+11
-4
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -74,6 +74,16 @@ public:
|
||||
class CoreExport ChanAccess
|
||||
: public Serializable
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(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;
|
||||
@@ -97,9 +107,6 @@ public:
|
||||
const Anope::string &Mask() const;
|
||||
NickCore *GetAccount() const;
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
static const unsigned int MAX_DEPTH = 4;
|
||||
|
||||
/** Check if this access entry matches the given user or account
|
||||
|
||||
+39
-18
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -23,7 +23,7 @@ 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 nickcoreid_map NickCoreIdList;
|
||||
extern CoreExport Serialize::Checker<nickcoreid_map> NickCoreIdList;
|
||||
|
||||
/* A registered nickname.
|
||||
* It matters that Base is here before Extensible (it is inherited by Serializable)
|
||||
@@ -32,18 +32,27 @@ class CoreExport NickAlias final
|
||||
: public Serializable
|
||||
, public Extensible
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
private:
|
||||
Anope::string vhost_ident, vhost_host, vhost_creator;
|
||||
time_t vhost_created = 0;
|
||||
|
||||
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 time_registered = Anope::CurTime;
|
||||
/* Last cloaked user@host this nick was seen using. */
|
||||
Anope::string last_userhost;
|
||||
/* Last real user@host this nick was seen using. */
|
||||
Anope::string last_userhost_real;
|
||||
time_t registered = Anope::CurTime;
|
||||
time_t last_seen = Anope::CurTime;
|
||||
|
||||
/* Account this nick is tied to. Multiple nicks can be tied to a single account. */
|
||||
@@ -56,9 +65,6 @@ public:
|
||||
NickAlias(const Anope::string &nickname, NickCore *nickcore);
|
||||
~NickAlias();
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
/** Set a vhost for the user
|
||||
* @param ident The ident
|
||||
* @param host The host
|
||||
@@ -106,6 +112,7 @@ public:
|
||||
* @return the nick, if found
|
||||
*/
|
||||
static NickAlias *Find(const Anope::string &nick);
|
||||
static NickAlias *FindId(uint64_t uid);
|
||||
};
|
||||
|
||||
/* A registered account. Each account must have a NickAlias with the same nick as the
|
||||
@@ -116,10 +123,20 @@ class CoreExport NickCore final
|
||||
: public Serializable
|
||||
, public Extensible
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
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;
|
||||
uint64_t uniqueid;
|
||||
public:
|
||||
/* Name of the account. Find(display)->nc == this. */
|
||||
Anope::string display;
|
||||
@@ -130,8 +147,10 @@ public:
|
||||
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;
|
||||
std::map<Anope::string, Anope::string> last_modes;
|
||||
std::map<Anope::string, ModeData> last_modes;
|
||||
|
||||
/* Nicknames registered that are grouped to this account.
|
||||
* for n in aliases, n->nc == this.
|
||||
@@ -143,6 +162,8 @@ public:
|
||||
|
||||
/* Unsaved data */
|
||||
|
||||
/** The display nick for this account. */
|
||||
Serialize::Reference<NickAlias> na;
|
||||
/* Number of channels registered by this account */
|
||||
uint16_t channelcount = 0;
|
||||
/* Users online now logged into this account */
|
||||
@@ -155,13 +176,10 @@ public:
|
||||
NickCore(const Anope::string &nickdisplay, uint64_t nickid = 0);
|
||||
~NickCore();
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
/** Changes the display for this account
|
||||
* @param na The new display, must be grouped to this account.
|
||||
*/
|
||||
void SetDisplay(const NickAlias *na);
|
||||
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.
|
||||
@@ -176,6 +194,7 @@ public:
|
||||
* @return The account, if it exists
|
||||
*/
|
||||
static NickCore *Find(const Anope::string &nick);
|
||||
static NickCore *FindId(uint64_t uid);
|
||||
|
||||
void AddChannelReference(ChannelInfo *ci);
|
||||
void RemoveChannelReference(ChannelInfo *ci);
|
||||
@@ -192,6 +211,7 @@ class CoreExport IdentifyRequest
|
||||
Module *owner;
|
||||
Anope::string account;
|
||||
Anope::string password;
|
||||
Anope::string address;
|
||||
|
||||
std::set<Module *> holds;
|
||||
bool dispatched = false;
|
||||
@@ -200,7 +220,7 @@ class CoreExport IdentifyRequest
|
||||
static std::set<IdentifyRequest *> Requests;
|
||||
|
||||
protected:
|
||||
IdentifyRequest(Module *o, const Anope::string &acc, const Anope::string &pass);
|
||||
IdentifyRequest(Module *o, const Anope::string &acc, const Anope::string &pass, const Anope::string &ip);
|
||||
virtual ~IdentifyRequest();
|
||||
|
||||
public:
|
||||
@@ -211,6 +231,7 @@ public:
|
||||
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,
|
||||
|
||||
+16
-74
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <signal.h>
|
||||
|
||||
#include "hashcomp.h"
|
||||
#include "utfcpp/unchecked.h"
|
||||
|
||||
namespace Anope
|
||||
{
|
||||
@@ -129,6 +130,7 @@ namespace Anope
|
||||
* Returns the string's length.
|
||||
*/
|
||||
inline size_type length() const { return this->_string.length(); }
|
||||
inline size_type utf8length() const { return utf8::unchecked::distance(str().begin(), str().end()); }
|
||||
|
||||
/**
|
||||
* Returns the size of the currently allocated storage space in the string object.
|
||||
@@ -221,6 +223,14 @@ namespace Anope
|
||||
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.
|
||||
*/
|
||||
@@ -346,7 +356,7 @@ namespace Anope
|
||||
template<typename T>
|
||||
using unordered_map = std::unordered_map<string, T, hash_ci, compare>;
|
||||
|
||||
#ifndef REPRODUCIBLE_BUILD
|
||||
#if !REPRODUCIBLE_BUILD
|
||||
static const char *const compiled = __TIME__ " " __DATE__;
|
||||
#endif
|
||||
|
||||
@@ -371,11 +381,11 @@ namespace Anope
|
||||
|
||||
/** The debug level we are running at.
|
||||
*/
|
||||
extern CoreExport int Debug;
|
||||
extern CoreExport unsigned Debug;
|
||||
|
||||
/** Other command line options.
|
||||
*/
|
||||
extern CoreExport bool ReadOnly, NoFork, NoThird, NoPID, NoExpire, ProtocolDebug;
|
||||
extern CoreExport bool ReadOnly, NoFork, NoThird, NoDB, NoPID, NoExpire, ProtocolDebug;
|
||||
|
||||
/** The root of the Anope installation. Usually ~/anope
|
||||
*/
|
||||
@@ -455,40 +465,12 @@ namespace Anope
|
||||
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);
|
||||
|
||||
/** Hashes a buffer with SipHash-2-4
|
||||
* @param src The start of the buffer to hash
|
||||
* @param src_sz The total number of bytes in the buffer
|
||||
* @param key A 16 byte key to hash the buffer with.
|
||||
*/
|
||||
extern CoreExport uint64_t SipHash24(const void *src, unsigned long src_sz, const char key[16]);
|
||||
|
||||
/** 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
|
||||
*/
|
||||
@@ -512,9 +494,10 @@ namespace Anope
|
||||
/** Retrieves a human readable string representing the time in seconds
|
||||
* @param seconds The time on seconds, eg 60
|
||||
* @param nc The account to use language settings for to translate this string, if applicable
|
||||
* @param round Whether to round the duration to produce a shorter output.
|
||||
* @return A human readable string, eg "1 minute"
|
||||
*/
|
||||
extern CoreExport Anope::string Duration(time_t seconds, const NickCore *nc = NULL);
|
||||
extern CoreExport Anope::string Duration(time_t seconds, const NickCore *nc = nullptr, bool round = false);
|
||||
|
||||
/** Generates a human readable string of type "expires in ..."
|
||||
* @param expires time in seconds
|
||||
@@ -530,12 +513,6 @@ namespace Anope
|
||||
*/
|
||||
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
|
||||
*/
|
||||
@@ -571,36 +548,8 @@ namespace Anope
|
||||
/** 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); }
|
||||
|
||||
}
|
||||
|
||||
/** sepstream allows for splitting token separated lists.
|
||||
@@ -717,9 +666,6 @@ protected:
|
||||
*/
|
||||
Anope::string source;
|
||||
public:
|
||||
/** Default constructor, just uses the error message 'Core threw an exception'.
|
||||
*/
|
||||
CoreException() : err("Core threw an exception"), source("The core") { }
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
CoreException(const Anope::string &message) : err(message), source("The core") { }
|
||||
@@ -750,10 +696,6 @@ class CoreExport ModuleException
|
||||
: public CoreException
|
||||
{
|
||||
public:
|
||||
/** Default constructor, just uses the error message 'Module threw an exception'.
|
||||
*/
|
||||
ModuleException() : CoreException("Module threw an exception", "A Module") { }
|
||||
|
||||
/** This constructor can be used to specify an error message before throwing.
|
||||
*/
|
||||
ModuleException(const Anope::string &message) : CoreException(message, "A Module") { }
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* (C) 2008-2024 Anope Team <team@anope.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
+18
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2008-2024 Anope Team <team@anope.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
@@ -23,6 +23,16 @@ class CoreExport BotInfo final
|
||||
: public User
|
||||
, public Serializable
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
private:
|
||||
/* Channels this bot is assigned to */
|
||||
Serialize::Checker<std::set<ChannelInfo *> > channels;
|
||||
public:
|
||||
@@ -31,6 +41,10 @@ public:
|
||||
time_t lastmsg;
|
||||
/* Map of actual command names -> service name/permission required */
|
||||
CommandInfo::map commands;
|
||||
/** CTCP responses this bot can send. */
|
||||
Anope::map<std::function<void(BotInfo *, User *, const Anope::string &)>> ctcps;
|
||||
/* 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 */
|
||||
@@ -126,6 +140,9 @@ public:
|
||||
*/
|
||||
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
|
||||
|
||||
+19
-19
@@ -1,6 +1,6 @@
|
||||
/* Channel support
|
||||
*
|
||||
* (C) 2008-2024 Anope Team
|
||||
* (C) 2008-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -36,7 +36,7 @@ class CoreExport Channel final
|
||||
static std::vector<Channel *> deleting;
|
||||
|
||||
public:
|
||||
typedef std::multimap<Anope::string, Anope::string> ModeList;
|
||||
typedef std::multimap<Anope::string, ModeData> ModeList;
|
||||
private:
|
||||
/** A map of channel modes with their parameters set on this channel
|
||||
*/
|
||||
@@ -48,11 +48,11 @@ public:
|
||||
/* Set if this channel is registered. ci->c == this. Contains information relevant to the registered channel */
|
||||
Serialize::Reference<ChannelInfo> ci;
|
||||
/* When the channel was created */
|
||||
time_t creation_time;
|
||||
time_t created;
|
||||
/* If the channel has just been created in a netjoin */
|
||||
bool syncing;
|
||||
bool syncing = false;
|
||||
/* Is configured in the conf as a channel bots should be in */
|
||||
bool botchannel;
|
||||
bool botchannel = false;
|
||||
|
||||
/* Users in the channel */
|
||||
typedef std::map<User *, ChanUserContainer *> ChanUserList;
|
||||
@@ -66,15 +66,15 @@ public:
|
||||
* 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;
|
||||
time_t topic_ts = 0;
|
||||
/* The actual time the topic was set, probably close to Anope::CurTime */
|
||||
time_t topic_time;
|
||||
time_t topic_time = 0;
|
||||
|
||||
time_t server_modetime; /* Time of last server MODE */
|
||||
time_t chanserv_modetime; /* Time of last check_modes() */
|
||||
int16_t server_modecount; /* Number of server MODEs this second */
|
||||
int16_t chanserv_modecount; /* Number of check_mode()'s this sec */
|
||||
int16_t bouncy_modes; /* Did we fail to set modes here? */
|
||||
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
|
||||
@@ -148,10 +148,10 @@ public:
|
||||
/** 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 data Data about the mode.
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetModeInternal(MessageSource &source, ChannelMode *cm, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
void SetModeInternal(MessageSource &source, ChannelMode *cm, const ModeData &data = {}, bool enforce_mlock = true);
|
||||
|
||||
/** Remove a mode internally on a channel, this is not sent out to the IRCd
|
||||
* @param setter The Setter
|
||||
@@ -164,19 +164,19 @@ public:
|
||||
/** 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 data Data about the mode
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetMode(BotInfo *bi, ChannelMode *cm, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
void SetMode(BotInfo *bi, ChannelMode *cm, const ModeData &data = {}, bool enforce_mlock = true);
|
||||
|
||||
/**
|
||||
* Set a mode on a channel
|
||||
* @param bi The client setting the modes
|
||||
* @param name The mode name
|
||||
* @param param Optional param arg for the mode
|
||||
* @param data Data about the mode
|
||||
* @param enforce_mlock true if mlocks should be enforced, false to override mlock
|
||||
*/
|
||||
void SetMode(BotInfo *bi, const Anope::string &name, const Anope::string ¶m = "", bool enforce_mlock = true);
|
||||
void SetMode(BotInfo *bi, const Anope::string &name, const ModeData &data = {}, bool enforce_mlock = true);
|
||||
|
||||
/** Remove a mode from a channel
|
||||
* @param bi The client setting the modes
|
||||
@@ -215,7 +215,7 @@ public:
|
||||
* @param mode the modes
|
||||
* @param enforce_mlock true to enforce mlock
|
||||
*/
|
||||
void SetModesInternal(MessageSource &source, const Anope::string &mode, time_t ts = 0, bool enforce_mlock = true);
|
||||
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
|
||||
|
||||
+17
-13
@@ -1,6 +1,6 @@
|
||||
/* Declarations for command data.
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "service.h"
|
||||
#include "anope.h"
|
||||
#include "channels.h"
|
||||
#include "textproc.h"
|
||||
|
||||
struct CommandGroup final
|
||||
{
|
||||
@@ -31,10 +32,12 @@ struct CommandInfo final
|
||||
Anope::string permission;
|
||||
/* Group this command is in */
|
||||
Anope::string group;
|
||||
/* whether or not to hide this command in help output */
|
||||
/* Whether to hide this command in help and suggestions */
|
||||
bool hide = false;
|
||||
/* Only used with fantasy */
|
||||
/* Whether to prepend the channel name (only used with fantasy) */
|
||||
bool prepend_channel = false;
|
||||
/* Whether to require the FANTASY privilege (only used with fantasy) */
|
||||
bool require_privilege = true;
|
||||
};
|
||||
|
||||
/* Where the replies from commands go to. User inherits from this and is the normal
|
||||
@@ -81,6 +84,7 @@ public:
|
||||
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);
|
||||
@@ -95,11 +99,11 @@ class CoreExport Command
|
||||
: public Service
|
||||
{
|
||||
Anope::string desc;
|
||||
std::vector<Anope::string> syntax;
|
||||
std::vector<std::pair<Anope::string, std::function<bool(CommandSource&)>>> syntax;
|
||||
/* Allow unregistered users to use this command */
|
||||
bool allow_unregistered;
|
||||
bool allow_unregistered = false;
|
||||
/* Command requires that a user is executing it */
|
||||
bool require_user;
|
||||
bool require_user = false;
|
||||
|
||||
public:
|
||||
/* Maximum parameters accepted by this command */
|
||||
@@ -127,15 +131,15 @@ protected:
|
||||
void SetDesc(const Anope::string &d);
|
||||
|
||||
void ClearSyntax();
|
||||
void SetSyntax(const Anope::string &s);
|
||||
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;
|
||||
inline bool AllowUnregistered() const { return this->allow_unregistered; }
|
||||
inline bool RequireUser() const { return this->require_user; }
|
||||
|
||||
/** Get the command description
|
||||
* @param source The source wanting the command description
|
||||
@@ -149,10 +153,10 @@ public:
|
||||
*/
|
||||
virtual void Execute(CommandSource &source, const std::vector<Anope::string> ¶ms) = 0;
|
||||
|
||||
/** Called when HELP is requested for the client this command is on.
|
||||
/** Called when help is requested for the client this command is on.
|
||||
* @param source The source
|
||||
*/
|
||||
virtual void OnServHelp(CommandSource &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
|
||||
@@ -171,9 +175,9 @@ public:
|
||||
* @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);
|
||||
static bool Run(CommandSource &source, const Anope::string &message);
|
||||
|
||||
void Run(CommandSource &source, const Anope::string &, const CommandInfo &, std::vector<Anope::string> ¶ms);
|
||||
bool 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
|
||||
|
||||
+16
-20
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -18,11 +18,9 @@
|
||||
|
||||
namespace Configuration
|
||||
{
|
||||
namespace Internal
|
||||
{
|
||||
class CoreExport Block
|
||||
{
|
||||
friend struct Configuration::Conf;
|
||||
friend class Configuration::Conf;
|
||||
|
||||
public:
|
||||
typedef Anope::map<Anope::string> item_map;
|
||||
@@ -41,7 +39,7 @@ namespace Configuration
|
||||
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;
|
||||
const Block &GetBlock(const Anope::string &name, int num = 0) const;
|
||||
Block *GetMutableBlock(const Anope::string &name, int num = 0);
|
||||
|
||||
template<typename T> T Get(const Anope::string &tag, const Anope::string &def = "") const
|
||||
@@ -56,10 +54,6 @@ namespace Configuration
|
||||
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;
|
||||
} // namespace Internal
|
||||
|
||||
typedef const Internal::Block Block;
|
||||
typedef Internal::Block MutableBlock;
|
||||
|
||||
/** Represents a configuration file
|
||||
*/
|
||||
@@ -83,26 +77,27 @@ namespace Configuration
|
||||
|
||||
struct Uplink;
|
||||
|
||||
struct CoreExport Conf final
|
||||
: Block
|
||||
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;
|
||||
/* options:useprivmsg */
|
||||
bool UsePrivmsg;
|
||||
/* If we should default to privmsging clients */
|
||||
bool DefPrivmsg;
|
||||
/* Default language */
|
||||
Anope::string DefLanguage;
|
||||
/* options:timeoutcheck */
|
||||
time_t TimeoutCheck;
|
||||
/* options:usestrictprivmsg */
|
||||
bool UseStrictPrivmsg;
|
||||
/* options:servicealias */
|
||||
bool ServiceAlias;
|
||||
/* networkinfo:nickchars */
|
||||
Anope::string NickChars;
|
||||
|
||||
/* either "/msg " or "/" */
|
||||
Anope::string StrictPrivmsg;
|
||||
/* List of uplink servers to try and connect to */
|
||||
std::vector<Uplink> Uplinks;
|
||||
/* A vector of our logfile options */
|
||||
@@ -130,12 +125,12 @@ namespace Configuration
|
||||
void LoadConf(File &file);
|
||||
void Post(Conf *old);
|
||||
|
||||
Block *GetModule(Module *);
|
||||
Block *GetModule(const Anope::string &name);
|
||||
Block &GetModule(const Module *);
|
||||
Block &GetModule(const Anope::string &name);
|
||||
|
||||
BotInfo *GetClient(const Anope::string &name);
|
||||
|
||||
const Block *GetCommand(CommandSource &);
|
||||
const Block &GetCommand(CommandSource &);
|
||||
};
|
||||
|
||||
struct Uplink final
|
||||
@@ -148,6 +143,7 @@ namespace Configuration
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -19,11 +19,12 @@ class ChanAccess;
|
||||
class Channel;
|
||||
class ChannelInfo;
|
||||
class ChannelStatus;
|
||||
struct ModeData;
|
||||
struct ChanUserContainer;
|
||||
class ClientSocket;
|
||||
class Command;
|
||||
class CommandSource;
|
||||
namespace Configuration { struct Conf; }
|
||||
namespace Configuration { class Conf; }
|
||||
class ConnectionSocket;
|
||||
namespace DNS { struct Query; }
|
||||
class Entry;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
|
||||
{
|
||||
T *t = this->Get(e);
|
||||
data[this->name] << *t;
|
||||
data.Store(this->name, *t);
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
@@ -194,7 +194,7 @@ public:
|
||||
|
||||
void ExtensibleSerialize(const Extensible *e, const Serializable *s, Serialize::Data &data) const override
|
||||
{
|
||||
data[this->name] << true;
|
||||
data.Store(this->name, this->HasExt(e));
|
||||
}
|
||||
|
||||
void ExtensibleUnserialize(Extensible *e, Serializable *s, Serialize::Data &data) override
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2002-2011 InspIRCd Development Team
|
||||
* (C) 2009-2024 Anope Team <team@anope.org>
|
||||
* (C) 2009-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
+47
-18
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2024 Anope Team
|
||||
* (C) 2008-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -55,31 +55,65 @@ namespace Language
|
||||
*/
|
||||
extern CoreExport const char *Translate(const NickCore *nc, const char *string);
|
||||
|
||||
/** Translatesa string to the given language.
|
||||
/** 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%s DROP %s %s\002")
|
||||
#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%s HELP %s\002 for more information.")
|
||||
#define MORE_INFO _("Type \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\n" \
|
||||
"something that could be easily guessed (e.g. your real name or your nick) and\n" \
|
||||
"cannot contain the space or tab characters.\n")
|
||||
#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.")
|
||||
@@ -92,14 +126,9 @@ namespace Language
|
||||
#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\n" \
|
||||
"nick, type \002%s%s IDENTIFY \037password\037\002. Otherwise,\n" \
|
||||
"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.")
|
||||
@@ -108,12 +137,12 @@ namespace Language
|
||||
#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 for channel \002%s\002:")
|
||||
#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.\n" \
|
||||
"Type \002%s%s READ %s %zu\002 to read it.")
|
||||
#define MEMO_NEW_MEMO_ARRIVED _("You have a new memo from %s.\n" \
|
||||
"Type \002%s%s READ %zu\002 to read it.")
|
||||
#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.")
|
||||
|
||||
+1
-33
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -57,35 +57,3 @@ public:
|
||||
*/
|
||||
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);
|
||||
};
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+10
-5
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -18,15 +18,20 @@ class CoreExport Memo final
|
||||
: public Serializable
|
||||
{
|
||||
public:
|
||||
struct Type final
|
||||
: public Serialize::Type
|
||||
{
|
||||
Type();
|
||||
void Serialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
Serializable *Unserialize(Serializable *obj, Serialize::Data &data) const override;
|
||||
};
|
||||
|
||||
MemoInfo *mi;
|
||||
bool unread;
|
||||
bool receipt;
|
||||
Memo();
|
||||
~Memo();
|
||||
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &);
|
||||
|
||||
Anope::string owner;
|
||||
/* When it was sent */
|
||||
time_t time;
|
||||
@@ -41,7 +46,7 @@ struct CoreExport MemoInfo final
|
||||
{
|
||||
int16_t memomax = 0;
|
||||
Serialize::Checker<std::vector<Memo *> > memos;
|
||||
std::vector<Anope::string> ignores;
|
||||
std::set<Anope::string, ci::less> ignores;
|
||||
|
||||
MemoInfo();
|
||||
Memo *GetMemo(unsigned index) const;
|
||||
|
||||
+11
-3
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -45,6 +45,13 @@ namespace Message
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Ignore final
|
||||
: IRCDMessage
|
||||
{
|
||||
Ignore(Module *creator, const Anope::string &mname);
|
||||
void Run(MessageSource &source, const std::vector<Anope::string> ¶ms, const Anope::map<Anope::string> &tags) override;
|
||||
};
|
||||
|
||||
struct CoreExport Invite
|
||||
: IRCDMessage
|
||||
{
|
||||
@@ -66,10 +73,11 @@ namespace Message
|
||||
* @param source The source of the SJOIN
|
||||
* @param chan The channel the users are joining to
|
||||
* @param ts The TS for the channel
|
||||
* @param modes The modes sent with the SJOIN, if any
|
||||
* @param modes The mode letters sent with the SJOIN, if any
|
||||
* @param modeparams The mode parameters sent with the SJOIN, if any
|
||||
* @param users The users and their status, if any
|
||||
*/
|
||||
static void SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::list<SJoinUser> &users);
|
||||
static void SJoin(MessageSource &source, const Anope::string &chan, time_t ts, const Anope::string &modes, const std::vector<Anope::string> &modeparams, const std::list<SJoinUser> &users);
|
||||
};
|
||||
|
||||
struct CoreExport Kick
|
||||
|
||||
+39
-16
@@ -1,7 +1,7 @@
|
||||
/* Mode support
|
||||
*
|
||||
* (C) 2008-2011 Adam <Adam@anope.org>
|
||||
* (C) 2008-2024 Anope Team <team@anope.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
@@ -33,6 +33,20 @@ enum ModeClass
|
||||
MC_USER
|
||||
};
|
||||
|
||||
struct ModeData final
|
||||
{
|
||||
Anope::string value;
|
||||
Anope::string set_by;
|
||||
time_t set_at;
|
||||
|
||||
ModeData(const Anope::string &v = "", const Anope::string &s = "", time_t t = 0)
|
||||
: value(v)
|
||||
, set_by(s)
|
||||
, set_at(t)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
/** This class is the basis of all modes in Anope
|
||||
*/
|
||||
class CoreExport Mode
|
||||
@@ -56,11 +70,6 @@ public:
|
||||
*/
|
||||
Mode(const Anope::string &mname, ModeClass mclass, char mc, ModeType type);
|
||||
virtual ~Mode() = default;
|
||||
|
||||
/** Can a user set this mode, used for mlock
|
||||
* @param u The user
|
||||
*/
|
||||
virtual bool CanSet(User *u) const;
|
||||
};
|
||||
|
||||
/** This class is a user mode, all user modes use this/inherit from this
|
||||
@@ -74,6 +83,12 @@ public:
|
||||
* @param mc The mode char
|
||||
*/
|
||||
UserMode(const Anope::string &name, char mc);
|
||||
|
||||
/** Can a user set this mode, used for mlock
|
||||
* @param source The user who is setting the mode.
|
||||
* @param target The user the mode is being set on.
|
||||
*/
|
||||
virtual bool CanSet(User *source, User *target) const { return true; }
|
||||
};
|
||||
|
||||
class CoreExport UserModeParam
|
||||
@@ -108,7 +123,11 @@ public:
|
||||
*/
|
||||
ChannelMode(const Anope::string &name, char mc);
|
||||
|
||||
bool CanSet(User *u) const override;
|
||||
/** Can a user set this mode, used for mlock
|
||||
* @param u The user who is setting the mode.
|
||||
* @param c The channel the mode is being set on.
|
||||
*/
|
||||
virtual bool CanSet(User *u, Channel *c) const;
|
||||
|
||||
virtual void Check() { }
|
||||
|
||||
@@ -216,9 +235,12 @@ template<typename T>
|
||||
class CoreExport ChannelModeVirtual
|
||||
: public T
|
||||
{
|
||||
Anope::string base;
|
||||
private:
|
||||
ChannelMode *basech;
|
||||
|
||||
protected:
|
||||
Anope::string base;
|
||||
|
||||
public:
|
||||
ChannelModeVirtual(const Anope::string &mname, const Anope::string &basename);
|
||||
|
||||
@@ -253,7 +275,7 @@ class CoreExport UserModeOperOnly
|
||||
public:
|
||||
UserModeOperOnly(const Anope::string &mname, char um) : UserMode(mname, um) { }
|
||||
|
||||
bool CanSet(User *u) const override;
|
||||
bool CanSet(User *source, User *target) const override;
|
||||
};
|
||||
|
||||
class CoreExport UserModeNoone
|
||||
@@ -262,7 +284,7 @@ class CoreExport UserModeNoone
|
||||
public:
|
||||
UserModeNoone(const Anope::string &mname, char um) : UserMode(mname, um) { }
|
||||
|
||||
bool CanSet(User *u) const override;
|
||||
bool CanSet(User *source, User *target) const override;
|
||||
};
|
||||
|
||||
/** Channel mode +k (key)
|
||||
@@ -285,7 +307,7 @@ public:
|
||||
ChannelModeOperOnly(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
|
||||
|
||||
/* Opers only */
|
||||
bool CanSet(User *u) const override;
|
||||
bool CanSet(User *u, Channel *c) const override;
|
||||
};
|
||||
|
||||
/** This class is used for channel modes only servers may set
|
||||
@@ -296,7 +318,7 @@ class CoreExport ChannelModeNoone
|
||||
public:
|
||||
ChannelModeNoone(const Anope::string &mname, char mc) : ChannelMode(mname, mc) { }
|
||||
|
||||
bool CanSet(User *u) const override;
|
||||
bool CanSet(User *u, Channel *c) const override;
|
||||
};
|
||||
|
||||
/** This is the mode manager
|
||||
@@ -308,6 +330,7 @@ public:
|
||||
class CoreExport ModeManager final
|
||||
{
|
||||
public:
|
||||
using Change = std::multimap<Mode *, std::pair<bool, ModeData>>;
|
||||
|
||||
/* Number of generic channel and user modes we are tracking */
|
||||
static unsigned GenericChannelModes;
|
||||
@@ -375,18 +398,18 @@ public:
|
||||
* @param c The channel
|
||||
* @param cm The channel mode
|
||||
* @param set true for setting, false for removing
|
||||
* @param param The param, if there is one
|
||||
* @param data Data about the mode.
|
||||
*/
|
||||
static void StackerAdd(BotInfo *bi, Channel *c, ChannelMode *cm, bool set, const Anope::string ¶m = "");
|
||||
static void StackerAdd(BotInfo *bi, Channel *c, ChannelMode *cm, bool set, const ModeData &data = {});
|
||||
|
||||
/** Add a mode to the stacker to be set on a user
|
||||
* @param bi The client to set the modes from
|
||||
* @param u The user
|
||||
* @param um The user mode
|
||||
* @param set true for setting, false for removing
|
||||
* @param param The param, if there is one
|
||||
* @param data Data about the mode.
|
||||
*/
|
||||
static void StackerAdd(BotInfo *bi, User *u, UserMode *um, bool set, const Anope::string ¶m = "");
|
||||
static void StackerAdd(BotInfo *bi, User *u, UserMode *um, bool set, const ModeData &data = {});
|
||||
|
||||
/** Process all of the modes in the stacker and send them to the IRCd to be set on channels/users
|
||||
*/
|
||||
|
||||
+6
-5
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -39,13 +39,14 @@
|
||||
#include "services.h"
|
||||
#include "socketengine.h"
|
||||
#include "sockets.h"
|
||||
#include "textproc.h"
|
||||
#include "threadengine.h"
|
||||
#include "timers.h"
|
||||
#include "uplink.h"
|
||||
#include "users.h"
|
||||
#include "xline.h"
|
||||
|
||||
#include "modules/pseudoclients/chanserv.h"
|
||||
#include "modules/pseudoclients/global.h"
|
||||
#include "modules/pseudoclients/memoserv.h"
|
||||
#include "modules/pseudoclients/nickserv.h"
|
||||
#include "modules/chanserv/service.h"
|
||||
#include "modules/global/service.h"
|
||||
#include "modules/memoserv/service.h"
|
||||
#include "modules/nickserv/service.h"
|
||||
|
||||
+260
-143
@@ -1,6 +1,6 @@
|
||||
/* Modular support
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -158,7 +158,9 @@ enum
|
||||
PSEUDOCLIENT = 1 << 5,
|
||||
/* Module provides IRCd protocol support */
|
||||
PROTOCOL = 1 << 6,
|
||||
MT_END = 1 << 7
|
||||
/* Module is deprecated */
|
||||
DEPRECATED = 1 << 7,
|
||||
MT_END = DEPRECATED,
|
||||
};
|
||||
typedef unsigned short ModType;
|
||||
|
||||
@@ -199,6 +201,8 @@ public:
|
||||
class CoreExport NotImplementedException final
|
||||
: public CoreException
|
||||
{
|
||||
public:
|
||||
NotImplementedException() : CoreException("") { }
|
||||
};
|
||||
|
||||
/** Every module in Anope is actually a class.
|
||||
@@ -288,7 +292,7 @@ public:
|
||||
* @param cu The user, channel, and status of the user being kicked
|
||||
* @param kickmsg The reason for the kick.
|
||||
*/
|
||||
virtual void OnPreUserKicked(const MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg) { throw NotImplementedException(); }
|
||||
virtual void OnPreUserKicked(const MessageSource &source, ChanUserContainer *cu, const Anope::string &kickmsg) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user has been kicked from a channel.
|
||||
* @param source The kicker
|
||||
@@ -297,13 +301,13 @@ public:
|
||||
* @param status The status the kicked user had on the channel before they were kicked
|
||||
* @param kickmsg The reason for the kick.
|
||||
*/
|
||||
virtual void OnUserKicked(const MessageSource &source, User *target, const Anope::string &channel, ChannelStatus &status, const Anope::string &kickmsg) { throw NotImplementedException(); }
|
||||
virtual void OnUserKicked(const MessageSource &source, User *target, const Anope::string &channel, ChannelStatus &status, const Anope::string &kickmsg) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when the configuration is being (re)loaded.
|
||||
* @param conf The config that is being built now and will replace the global Config object
|
||||
* @throws A ConfigException to abort the config (re)loading process.
|
||||
*/
|
||||
virtual void OnReload(Configuration::Conf *conf) { throw NotImplementedException(); }
|
||||
virtual void OnReload(Configuration::Conf &conf) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a bot is assigned to a channel.
|
||||
* @param sender The user assigning the bot
|
||||
@@ -311,35 +315,35 @@ public:
|
||||
* @param bi The bot being assigned.
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the assign.
|
||||
*/
|
||||
virtual EventReturn OnPreBotAssign(User *sender, ChannelInfo *ci, BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnPreBotAssign(User *sender, ChannelInfo *ci, BotInfo *bi) ATTR_NOT_NULL(2, 3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot is assigned ot a channel
|
||||
*/
|
||||
virtual void OnBotAssign(User *sender, ChannelInfo *ci, BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnBotAssign(User *sender, ChannelInfo *ci, BotInfo *bi) ATTR_NOT_NULL(2, 3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a bot is unassigned from a channel.
|
||||
* @param sender The user unassigning the bot
|
||||
* @param ci The channel the bot is being removed from
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the unassign.
|
||||
*/
|
||||
virtual EventReturn OnBotUnAssign(User *sender, ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotUnAssign(User *sender, ChannelInfo *ci) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new user connects to the network.
|
||||
* @param u The connecting user.
|
||||
* @param exempt set to true/is true if the user should be excepted from bans etc
|
||||
*/
|
||||
virtual void OnUserConnect(User *u, bool &exempt) { throw NotImplementedException(); }
|
||||
virtual void OnUserConnect(User *u, bool &exempt) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new server connects to the network.
|
||||
* @param s The server that has connected to the network
|
||||
*/
|
||||
virtual void OnNewServer(Server *s) { throw NotImplementedException(); }
|
||||
virtual void OnNewServer(Server *s) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a user changed the nick
|
||||
* @param u The user.
|
||||
* @param oldnick The old nick of the user
|
||||
*/
|
||||
virtual void OnUserNickChange(User *u, const Anope::string &oldnick) { throw NotImplementedException(); }
|
||||
virtual void OnUserNickChange(User *u, const Anope::string &oldnick) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when someone uses the generic/help command
|
||||
* @param source Command source
|
||||
@@ -360,14 +364,14 @@ public:
|
||||
* @param params The parameters the user is sending
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnPreCommand(CommandSource &source, Command *command, std::vector<Anope::string> ¶ms) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a command has been executed.
|
||||
* @param source The source of the command
|
||||
* @param command The command the user executed
|
||||
* @param params The parameters the user sent
|
||||
*/
|
||||
virtual void OnPostCommand(CommandSource &source, Command *command, const std::vector<Anope::string> ¶ms) { throw NotImplementedException(); }
|
||||
virtual void OnPostCommand(CommandSource &source, Command *command, const std::vector<Anope::string> ¶ms) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when the databases are saved
|
||||
*/
|
||||
@@ -389,7 +393,7 @@ public:
|
||||
* @param params The params
|
||||
* @return EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed
|
||||
*/
|
||||
virtual EventReturn OnBotFantasy(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotFantasy(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called on fantasy command without access
|
||||
* @param source The source of the command
|
||||
@@ -398,31 +402,31 @@ public:
|
||||
* @param params The params
|
||||
* @return EVENT_STOP to halt processing and not run the command, EVENT_ALLOW to allow the command to be executed
|
||||
*/
|
||||
virtual EventReturn OnBotNoFantasyAccess(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotNoFantasyAccess(CommandSource &source, Command *c, ChannelInfo *ci, const std::vector<Anope::string> ¶ms) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot places a ban
|
||||
* @param u User being banned
|
||||
* @param ci Channel the ban is placed on
|
||||
* @param mask The mask being banned
|
||||
*/
|
||||
virtual void OnBotBan(User *u, ChannelInfo *ci, const Anope::string &mask) { throw NotImplementedException(); }
|
||||
virtual void OnBotBan(User *u, ChannelInfo *ci, const Anope::string &mask) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a badword is added to the badword list
|
||||
* @param ci The channel
|
||||
* @param bw The badword
|
||||
*/
|
||||
virtual void OnBadWordAdd(ChannelInfo *ci, const BadWord *bw) { throw NotImplementedException(); }
|
||||
virtual void OnBadWordAdd(ChannelInfo *ci, const BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a badword is deleted from a channel
|
||||
* @param ci The channel
|
||||
* @param bw The badword
|
||||
*/
|
||||
virtual void OnBadWordDel(ChannelInfo *ci, const BadWord *bw) { throw NotImplementedException(); }
|
||||
virtual void OnBadWordDel(ChannelInfo *ci, const BadWord *bw) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot is created or destroyed
|
||||
*/
|
||||
virtual void OnCreateBot(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnDelBot(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnCreateBot(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnDelBot(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a bot kicks a user
|
||||
* @param bi The bot sending the kick
|
||||
@@ -431,13 +435,13 @@ public:
|
||||
* @param reason The reason
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnBotKick(BotInfo *bi, Channel *c, User *u, const Anope::string &reason) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotKick(BotInfo *bi, Channel *c, User *u, const Anope::string &reason) ATTR_NOT_NULL(2, 3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a user parts a channel
|
||||
* @param u The user
|
||||
* @param c The channel
|
||||
*/
|
||||
virtual void OnPrePartChannel(User *u, Channel *c) {}
|
||||
virtual void OnPrePartChannel(User *u, Channel *c) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user parts a channel
|
||||
* @param u The user
|
||||
@@ -445,14 +449,14 @@ public:
|
||||
* @param channel The channel name
|
||||
* @param msg The part reason
|
||||
*/
|
||||
virtual void OnPartChannel(User *u, Channel *c, const Anope::string &channel, const Anope::string &msg) { throw NotImplementedException(); }
|
||||
virtual void OnPartChannel(User *u, Channel *c, const Anope::string &channel, const Anope::string &msg) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user leaves a channel.
|
||||
* From either parting, being kicked, or quitting/killed!
|
||||
* @param u The user
|
||||
* @param c The channel
|
||||
*/
|
||||
virtual void OnLeaveChannel(User *u, Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnLeaveChannel(User *u, Channel *c) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a user joins a channel
|
||||
* If this event triggers the user is allowed to be in the channel, and will
|
||||
@@ -461,7 +465,7 @@ public:
|
||||
* @param u The user
|
||||
* @param channel The channel
|
||||
*/
|
||||
virtual void OnJoinChannel(User *u, Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnJoinChannel(User *u, Channel *c) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new topic is set
|
||||
* @param source The user changing the topic, if any
|
||||
@@ -469,18 +473,18 @@ public:
|
||||
* @param setter The user who set the new topic, if there is no source
|
||||
* @param topic The new topic
|
||||
*/
|
||||
virtual void OnTopicUpdated(User *source, Channel *c, const Anope::string &user, const Anope::string &topic) { throw NotImplementedException(); }
|
||||
virtual void OnTopicUpdated(User *source, Channel *c, const Anope::string &user, const Anope::string &topic) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a channel expires
|
||||
* @param ci The channel
|
||||
* @param expire Set to true to allow the chan to expire
|
||||
*/
|
||||
virtual void OnPreChanExpire(ChannelInfo *ci, bool &expire) { throw NotImplementedException(); }
|
||||
virtual void OnPreChanExpire(ChannelInfo *ci, bool &expire) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a channel expires
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnChanExpire(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnChanExpire(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before Anope connects to its uplink
|
||||
*/
|
||||
@@ -492,7 +496,7 @@ public:
|
||||
|
||||
/** Called when we are almost done synching with the uplink, just before we send the EOB
|
||||
*/
|
||||
virtual void OnPreUplinkSync(Server *serv) { throw NotImplementedException(); }
|
||||
virtual void OnPreUplinkSync(Server *serv) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when Anope disconnects from its uplink, before it tries to reconnect
|
||||
*/
|
||||
@@ -510,12 +514,12 @@ public:
|
||||
* @param na The nick
|
||||
* @param expire Set to true to allow the nick to expire
|
||||
*/
|
||||
virtual void OnPreNickExpire(NickAlias *na, bool &expire) { throw NotImplementedException(); }
|
||||
virtual void OnPreNickExpire(NickAlias *na, bool &expire) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick drops
|
||||
* @param na The nick
|
||||
*/
|
||||
virtual void OnNickExpire(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnNickExpire(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when defcon level changes
|
||||
* @param level The level
|
||||
@@ -526,13 +530,13 @@ public:
|
||||
* @param ex The exception
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnExceptionAdd(Exception *ex) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnExceptionAdd(Exception *ex) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before an exception is deleted
|
||||
* @param source The source deleting it
|
||||
* @param ex The exception
|
||||
*/
|
||||
virtual void OnExceptionDel(CommandSource &source, Exception *ex) { throw NotImplementedException(); }
|
||||
virtual void OnExceptionDel(CommandSource &source, Exception *ex) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a XLine is added
|
||||
* @param source The source of the XLine
|
||||
@@ -540,31 +544,31 @@ public:
|
||||
* @param xlm The xline manager it was added to
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to halt the command and not process it
|
||||
*/
|
||||
virtual EventReturn OnAddXLine(CommandSource &source, const XLine *x, XLineManager *xlm) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnAddXLine(CommandSource &source, const XLine *x, XLineManager *xlm) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a XLine is deleted
|
||||
* @param source The source of the XLine
|
||||
* @param x The XLine
|
||||
* @param xlm The xline manager it was deleted from
|
||||
*/
|
||||
virtual void OnDelXLine(CommandSource &source, const XLine *x, XLineManager *xlm) { throw NotImplementedException(); }
|
||||
virtual void OnDelXLine(CommandSource &source, const XLine *x, XLineManager *xlm) ATTR_NOT_NULL(4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user is checked for whether they are a services oper
|
||||
* @param u The user
|
||||
* @return EVENT_ALLOW to allow, anything else to deny
|
||||
*/
|
||||
virtual EventReturn IsServicesOper(User *u) { throw NotImplementedException(); }
|
||||
virtual EventReturn IsServicesOper(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a server quits
|
||||
* @param server The server
|
||||
*/
|
||||
virtual void OnServerQuit(Server *server) { throw NotImplementedException(); }
|
||||
virtual void OnServerQuit(Server *server) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user quits, or is killed
|
||||
* @param u The user
|
||||
* @param msg The quit message
|
||||
*/
|
||||
virtual void OnUserQuit(User *u, const Anope::string &msg) { throw NotImplementedException(); }
|
||||
virtual void OnUserQuit(User *u, const Anope::string &msg) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user is quit, before and after being internally removed from
|
||||
* This is different from OnUserQuit, which takes place at the time of the quit.
|
||||
@@ -572,43 +576,43 @@ public:
|
||||
* all lists (channels, user list, etc)
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnPreUserLogoff(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnPostUserLogoff(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnPreUserLogoff(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnPostUserLogoff(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new bot is made
|
||||
* @param bi The bot
|
||||
*/
|
||||
virtual void OnBotCreate(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnBotCreate(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot is changed
|
||||
* @param bi The bot
|
||||
*/
|
||||
virtual void OnBotChange(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnBotChange(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a bot is deleted
|
||||
* @param bi The bot
|
||||
*/
|
||||
virtual void OnBotDelete(BotInfo *bi) { throw NotImplementedException(); }
|
||||
virtual void OnBotDelete(BotInfo *bi) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after an access entry is deleted from a channel
|
||||
* @param ci The channel
|
||||
* @param source The source of the command
|
||||
* @param access The access entry that was removed
|
||||
*/
|
||||
virtual void OnAccessDel(ChannelInfo *ci, CommandSource &source, ChanAccess *access) { throw NotImplementedException(); }
|
||||
virtual void OnAccessDel(ChannelInfo *ci, CommandSource &source, ChanAccess *access) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when access is added
|
||||
* @param ci The channel
|
||||
* @param source The source of the command
|
||||
* @param access The access changed
|
||||
*/
|
||||
virtual void OnAccessAdd(ChannelInfo *ci, CommandSource &source, ChanAccess *access) { throw NotImplementedException(); }
|
||||
virtual void OnAccessAdd(ChannelInfo *ci, CommandSource &source, ChanAccess *access) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when the access list is cleared
|
||||
* @param ci The channel
|
||||
* @param u The user who cleared the access
|
||||
*/
|
||||
virtual void OnAccessClear(ChannelInfo *ci, CommandSource &source) { throw NotImplementedException(); }
|
||||
virtual void OnAccessClear(ChannelInfo *ci, CommandSource &source) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a level for a channel is changed
|
||||
* @param source The source of the command
|
||||
@@ -616,63 +620,63 @@ public:
|
||||
* @param priv The privilege changed
|
||||
* @param what The new level
|
||||
*/
|
||||
virtual void OnLevelChange(CommandSource &source, ChannelInfo *ci, const Anope::string &priv, int16_t what) { throw NotImplementedException(); }
|
||||
virtual void OnLevelChange(CommandSource &source, ChannelInfo *ci, const Anope::string &priv, int16_t what) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called right before a channel is dropped
|
||||
* @param source The user dropping the channel
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual EventReturn OnChanDrop(CommandSource &source, ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnChanDrop(CommandSource &source, ChannelInfo *ci) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is registered
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnChanRegistered(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnChanRegistered(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is suspended
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnChanSuspend(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnChanSuspend(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is unsuspended
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnChanUnsuspend(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnChanUnsuspend(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is being created, for any reason
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnCreateChan(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnCreateChan(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is being deleted, for any reason
|
||||
* @param ci The channel
|
||||
*/
|
||||
virtual void OnDelChan(ChannelInfo *ci) { throw NotImplementedException(); }
|
||||
virtual void OnDelChan(ChannelInfo *ci) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a new channel is created
|
||||
* Note that this channel may not be introduced to the uplink at this point.
|
||||
* @param c The channel
|
||||
*/
|
||||
virtual void OnChannelCreate(Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnChannelCreate(Channel *c) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel is deleted
|
||||
* @param c The channel
|
||||
*/
|
||||
virtual void OnChannelDelete(Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnChannelDelete(Channel *c) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after adding an akick to a channel
|
||||
* @param source The source of the command
|
||||
* @param ci The channel
|
||||
* @param ak The akick
|
||||
*/
|
||||
virtual void OnAkickAdd(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) { throw NotImplementedException(); }
|
||||
virtual void OnAkickAdd(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before removing an akick from a channel
|
||||
* @param source The source of the command
|
||||
* @param ci The channel
|
||||
* @param ak The akick
|
||||
*/
|
||||
virtual void OnAkickDel(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) { throw NotImplementedException(); }
|
||||
virtual void OnAkickDel(CommandSource &source, ChannelInfo *ci, const AutoKick *ak) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a user join a channel when we decide whether to kick them or not
|
||||
* @param u The user
|
||||
@@ -682,7 +686,7 @@ public:
|
||||
* @param reason The reason for the kick
|
||||
* @return EVENT_STOP to prevent the user from joining by kicking/banning the user
|
||||
*/
|
||||
virtual EventReturn OnCheckKick(User *u, Channel *c, Anope::string &mask, Anope::string &reason) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnCheckKick(User *u, Channel *c, Anope::string &mask, Anope::string &reason) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user requests info for a channel
|
||||
* @param source The user requesting info
|
||||
@@ -690,109 +694,109 @@ public:
|
||||
* @param info Data to show the user requesting information
|
||||
* @param show_hidden true if we should show the user everything
|
||||
*/
|
||||
virtual void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_hidden) { throw NotImplementedException(); }
|
||||
virtual void OnChanInfo(CommandSource &source, ChannelInfo *ci, InfoFormatter &info, bool show_hidden) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Checks if access has the channel privilege 'priv'.
|
||||
* @param access THe access struct
|
||||
* @param priv The privilege being checked for
|
||||
* @return EVENT_ALLOW for yes, EVENT_STOP to stop all processing
|
||||
*/
|
||||
virtual EventReturn OnCheckPriv(const ChanAccess *access, const Anope::string &priv) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnCheckPriv(const ChanAccess *access, const Anope::string &priv) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Check whether an access group has a privilege
|
||||
* @param group The group
|
||||
* @param priv The privilege
|
||||
* @return MOD_ALLOW to allow, MOD_STOP to stop
|
||||
*/
|
||||
virtual EventReturn OnGroupCheckPriv(const AccessGroup *group, const Anope::string &priv) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnGroupCheckPriv(const AccessGroup *group, const Anope::string &priv) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is dropped
|
||||
* @param source The source of the command
|
||||
* @param na The nick
|
||||
*/
|
||||
virtual void OnNickDrop(CommandSource &source, NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnNickDrop(CommandSource &source, NickAlias *na) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user groups their nick
|
||||
* @param u The user grouping
|
||||
* @param target The target they're grouping to
|
||||
*/
|
||||
virtual void OnNickGroup(User *u, NickAlias *target) { throw NotImplementedException(); }
|
||||
virtual void OnNickGroup(User *u, NickAlias *target) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user identifies to a nick
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnNickIdentify(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnNickIdentify(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user is logged into an account
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnUserLogin(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnUserLogin(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick logs out
|
||||
* @param u The nick
|
||||
*/
|
||||
virtual void OnNickLogout(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnNickLogout(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is registered
|
||||
* @param user The user registering the nick, of any
|
||||
* @param The nick
|
||||
* @param pass The password of the newly registered nick
|
||||
*/
|
||||
virtual void OnNickRegister(User *user, NickAlias *na, const Anope::string &pass) { throw NotImplementedException(); }
|
||||
virtual void OnNickRegister(User *user, NickAlias *na, const Anope::string &pass) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is confirmed. This will never be called if registration confirmation is not enabled.
|
||||
* @param user The user confirming the nick
|
||||
* @param The account being confirmed
|
||||
* @param nc The account being confirmed
|
||||
*/
|
||||
virtual void OnNickConfirm(User *user, NickCore *) { throw NotImplementedException(); }
|
||||
virtual void OnNickConfirm(User *user, NickCore *nc) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is suspended
|
||||
* @param na The nick alias
|
||||
*/
|
||||
virtual void OnNickSuspend(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnNickSuspend(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nick is unsuspended
|
||||
* @param na The nick alias
|
||||
*/
|
||||
virtual void OnNickUnsuspended(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnNickUnsuspended(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called on delnick()
|
||||
* @ param na pointer to the nickalias
|
||||
*/
|
||||
virtual void OnDelNick(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnDelNick(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nickcore is created
|
||||
* @param nc The nickcore
|
||||
*/
|
||||
virtual void OnNickCoreCreate(NickCore *nc) { throw NotImplementedException(); }
|
||||
virtual void OnNickCoreCreate(NickCore *nc) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called on delcore()
|
||||
* @param nc pointer to the NickCore
|
||||
*/
|
||||
virtual void OnDelCore(NickCore *nc) { throw NotImplementedException(); }
|
||||
virtual void OnDelCore(NickCore *nc) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called on change_core_display()
|
||||
* @param nc pointer to the NickCore
|
||||
* @param newdisplay the new display
|
||||
*/
|
||||
virtual void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) { throw NotImplementedException(); }
|
||||
virtual void OnChangeCoreDisplay(NickCore *nc, const Anope::string &newdisplay) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** called from NickCore::ClearCert()
|
||||
* @param nc pointer to the NickCore
|
||||
*/
|
||||
virtual void OnNickClearCert(NickCore *nc) { throw NotImplementedException(); }
|
||||
virtual void OnNickClearCert(NickCore *nc) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user adds an entry to their cert list
|
||||
* @param nc The nick
|
||||
* @param entry The entry
|
||||
*/
|
||||
virtual void OnNickAddCert(NickCore *nc, const Anope::string &entry) { throw NotImplementedException(); }
|
||||
virtual void OnNickAddCert(NickCore *nc, const Anope::string &entry) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called from NickCore::EraseCert()
|
||||
* @param nc pointer to the NickCore
|
||||
* @param entry The fingerprint
|
||||
*/
|
||||
virtual void OnNickEraseCert(NickCore *nc, const Anope::string &entry) { throw NotImplementedException(); }
|
||||
virtual void OnNickEraseCert(NickCore *nc, const Anope::string &entry) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user requests info for a nick
|
||||
* @param source The user requesting info
|
||||
@@ -800,55 +804,55 @@ public:
|
||||
* @param info Data to show the user requesting information
|
||||
* @param show_hidden true if we should show the user everything
|
||||
*/
|
||||
virtual void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) { throw NotImplementedException(); }
|
||||
virtual void OnNickInfo(CommandSource &source, NickAlias *na, InfoFormatter &info, bool show_hidden) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user uses botserv/info on a bot or channel.
|
||||
*/
|
||||
virtual void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) { throw NotImplementedException(); }
|
||||
virtual void OnBotInfo(CommandSource &source, BotInfo *bi, ChannelInfo *ci, InfoFormatter &info) ATTR_NOT_NULL(4) { throw NotImplementedException(); }
|
||||
|
||||
/** Check whether a username and password is correct
|
||||
* @param u The user trying to identify, if applicable.
|
||||
* @param req The login request
|
||||
*/
|
||||
virtual void OnCheckAuthentication(User *u, IdentifyRequest *req) { throw NotImplementedException(); }
|
||||
virtual void OnCheckAuthentication(User *u, IdentifyRequest *req) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user does /ns update
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnNickUpdate(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnNickUpdate(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we get informed about a users SSL fingerprint
|
||||
* when we call this, the fingerprint should already be stored in the user struct
|
||||
* @param u pointer to the user
|
||||
*/
|
||||
virtual void OnFingerprint(User *u) { throw NotImplementedException(); }
|
||||
virtual void OnFingerprint(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user becomes (un)away
|
||||
* @param message The message, is .empty() if unaway
|
||||
*/
|
||||
virtual void OnUserAway(User *u, const Anope::string &message) { throw NotImplementedException(); }
|
||||
virtual void OnUserAway(User *u, const Anope::string &message) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user invites one of our users to a channel
|
||||
* @param source The user doing the inviting
|
||||
* @param c The channel the user is inviting to
|
||||
* @param targ The user being invited
|
||||
*/
|
||||
virtual void OnInvite(User *source, Channel *c, User *targ) { throw NotImplementedException(); }
|
||||
virtual void OnInvite(User *source, Channel *c, User *targ) ATTR_NOT_NULL(2, 3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a vhost is deleted
|
||||
* @param na The nickalias of the vhost
|
||||
*/
|
||||
virtual void OnDeleteVHost(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnDeleteVHost(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a vhost is set
|
||||
* @param na The nickalias of the vhost
|
||||
*/
|
||||
virtual void OnSetVHost(NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual void OnSetVHost(NickAlias *na) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a users host changes
|
||||
* @param u The user
|
||||
*/
|
||||
virtual void OnSetDisplayedHost(User *) { throw NotImplementedException(); }
|
||||
virtual void OnSetDisplayedHost(User *u) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a memo is sent
|
||||
* @param source The source of the memo
|
||||
@@ -856,23 +860,23 @@ public:
|
||||
* @param mi Memo info for target
|
||||
* @param m The memo
|
||||
*/
|
||||
virtual void OnMemoSend(const Anope::string &source, const Anope::string &target, MemoInfo *mi, Memo *m) { throw NotImplementedException(); }
|
||||
virtual void OnMemoSend(const Anope::string &source, const Anope::string &target, MemoInfo *mi, Memo *m) ATTR_NOT_NULL(4, 5) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a memo is deleted
|
||||
* @param target The target the memo is being deleted from (nick or channel)
|
||||
* @param mi The memo info
|
||||
* @param m The memo
|
||||
*/
|
||||
virtual void OnMemoDel(const Anope::string &target, MemoInfo *mi, const Memo *m) { throw NotImplementedException(); }
|
||||
virtual void OnMemoDel(const Anope::string &target, MemoInfo *mi, const Memo *m) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is set on a channel
|
||||
* @param c The channel
|
||||
* @param setter The user or server that is setting the mode
|
||||
* @param mode The mode
|
||||
* @param param The mode param, if there is one
|
||||
* @param data Data about the mode.
|
||||
* @return EVENT_STOP to make mlock/secureops etc checks not happen
|
||||
*/
|
||||
virtual EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnChannelModeSet(Channel *c, MessageSource &setter, ChannelMode *mode, const ModeData &data) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is unset on a channel
|
||||
* @param c The channel
|
||||
@@ -881,67 +885,67 @@ public:
|
||||
* @param param The mode param, if there is one
|
||||
* @return EVENT_STOP to make mlock/secureops etc checks not happen
|
||||
*/
|
||||
virtual EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnChannelModeUnset(Channel *c, MessageSource &setter, ChannelMode *mode, const Anope::string ¶m) ATTR_NOT_NULL(2, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is set on a user
|
||||
* @param setter who/what is setting the mode
|
||||
* @param u The user
|
||||
* @param mname The mode name
|
||||
*/
|
||||
virtual void OnUserModeSet(const MessageSource &setter, User *u, const Anope::string &mname) { throw NotImplementedException(); }
|
||||
virtual void OnUserModeSet(const MessageSource &setter, User *u, const Anope::string &mname) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is unset from a user
|
||||
* @param setter who/what is setting the mode
|
||||
* @param u The user
|
||||
* @param mname The mode name
|
||||
*/
|
||||
virtual void OnUserModeUnset(const MessageSource &setter, User *u, const Anope::string &mname) { throw NotImplementedException(); }
|
||||
virtual void OnUserModeUnset(const MessageSource &setter, User *u, const Anope::string &mname) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channel mode is introduced into Anope
|
||||
* @param cm The mode
|
||||
*/
|
||||
virtual void OnChannelModeAdd(ChannelMode *cm) { throw NotImplementedException(); }
|
||||
virtual void OnChannelModeAdd(ChannelMode *cm) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a user mode is introduced into Anope
|
||||
* @param um The mode
|
||||
*/
|
||||
virtual void OnUserModeAdd(UserMode *um) { throw NotImplementedException(); }
|
||||
virtual void OnUserModeAdd(UserMode *um) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is about to be mlocked
|
||||
* @param ci The channel the mode is being locked on
|
||||
* @param lock The mode lock
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.
|
||||
*/
|
||||
virtual EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnMLock(ChannelInfo *ci, ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a mode is about to be unlocked
|
||||
* @param ci The channel the mode is being unlocked from
|
||||
* @param lock The mode lock
|
||||
* @return EVENT_CONTINUE to let other modules decide, EVENT_STOP to deny the mlock.
|
||||
*/
|
||||
virtual EventReturn OnUnMLock(ChannelInfo *ci, ModeLock *lock) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnUnMLock(ChannelInfo *ci, ModeLock *lock) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called after a module is loaded
|
||||
* @param u The user loading the module, can be NULL
|
||||
* @param m The module
|
||||
*/
|
||||
virtual void OnModuleLoad(User *u, Module *m) { throw NotImplementedException(); }
|
||||
virtual void OnModuleLoad(User *u, Module *m) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called before a module is unloaded
|
||||
* @param u The user, can be NULL
|
||||
* @param m The module
|
||||
*/
|
||||
virtual void OnModuleUnload(User *u, Module *m) { throw NotImplementedException(); }
|
||||
virtual void OnModuleUnload(User *u, Module *m) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a server is synced
|
||||
* @param s The server, can be our uplink server
|
||||
*/
|
||||
virtual void OnServerSync(Server *s) { throw NotImplementedException(); }
|
||||
virtual void OnServerSync(Server *s) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we sync with our uplink
|
||||
* @param s Our uplink
|
||||
*/
|
||||
virtual void OnUplinkSync(Server *s) { throw NotImplementedException(); }
|
||||
virtual void OnUplinkSync(Server *s) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we receive a PRIVMSG for one of our clients
|
||||
* @param u The user sending the PRIVMSG
|
||||
@@ -950,7 +954,7 @@ public:
|
||||
* @param tags Message tags
|
||||
* @return EVENT_STOP to halt processing
|
||||
*/
|
||||
virtual EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnBotPrivmsg(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we receive a NOTICE for one of our clients
|
||||
* @param u The user sending the NOTICE
|
||||
@@ -958,7 +962,7 @@ public:
|
||||
* @param tags Message tags
|
||||
* @param message The message
|
||||
*/
|
||||
virtual void OnBotNotice(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) { throw NotImplementedException(); }
|
||||
virtual void OnBotNotice(User *u, BotInfo *bi, Anope::string &message, const Anope::map<Anope::string> &tags) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when we receive a PRIVMSG for a registered channel we are in
|
||||
* @param u The source of the message
|
||||
@@ -966,12 +970,12 @@ public:
|
||||
* @param msg The message
|
||||
* @param tags Message tags
|
||||
*/
|
||||
virtual void OnPrivmsg(User *u, Channel *c, Anope::string &msg, const Anope::map<Anope::string> &tags) { throw NotImplementedException(); }
|
||||
virtual void OnPrivmsg(User *u, Channel *c, Anope::string &msg, const Anope::map<Anope::string> &tags) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a message is logged
|
||||
* @param l The log message
|
||||
*/
|
||||
virtual void OnLog(Log *l) { throw NotImplementedException(); }
|
||||
virtual void OnLog(Log *l) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a log message is actually logged to a given log info
|
||||
* The message has already passed validation checks by the LogInfo
|
||||
@@ -979,13 +983,13 @@ public:
|
||||
* @param l The log message
|
||||
* @param msg The final formatted message, derived from 'l'
|
||||
*/
|
||||
virtual void OnLogMessage(LogInfo *li, const Log *l, const Anope::string &msg) { throw NotImplementedException(); }
|
||||
virtual void OnLogMessage(LogInfo *li, const Log *l, const Anope::string &msg) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a DNS request (question) is received.
|
||||
* @param req The dns request
|
||||
* @param reply The reply that will be sent
|
||||
*/
|
||||
virtual void OnDnsRequest(DNS::Query &req, DNS::Query *reply) { throw NotImplementedException(); }
|
||||
virtual void OnDnsRequest(DNS::Query &req, DNS::Query *reply) ATTR_NOT_NULL(3) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a channels modes are being checked to see if they are allowed,
|
||||
* mostly to ensure mlock/+r are set.
|
||||
@@ -998,7 +1002,7 @@ public:
|
||||
* for a newly created channel to set the correct modes, topic,
|
||||
* set.
|
||||
*/
|
||||
virtual void OnChannelSync(Channel *c) { throw NotImplementedException(); }
|
||||
virtual void OnChannelSync(Channel *c) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called to set the correct modes on the user on the given channel
|
||||
* @param user The user
|
||||
@@ -1007,13 +1011,13 @@ public:
|
||||
* @param give_modes If giving modes is desired
|
||||
* @param take_modes If taking modes is desired
|
||||
*/
|
||||
virtual void OnSetCorrectModes(User *user, Channel *chan, AccessGroup &access, bool &give_modes, bool &take_modes) { throw NotImplementedException(); }
|
||||
virtual void OnSetCorrectModes(User *user, Channel *chan, AccessGroup &access, bool &give_modes, bool &take_modes) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
virtual void OnSerializeCheck(Serialize::Type *) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableConstruct(Serializable *) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableDestruct(Serializable *) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableUpdate(Serializable *) { throw NotImplementedException(); }
|
||||
virtual void OnSerializeTypeCreate(Serialize::Type *) { throw NotImplementedException(); }
|
||||
virtual void OnSerializeCheck(Serialize::Type *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableConstruct(Serializable *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableDestruct(Serializable *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnSerializableUpdate(Serializable *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
virtual void OnSerializeTypeCreate(Serialize::Type *st) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a chanserv/set command is used
|
||||
* @param source The source of the command
|
||||
@@ -1022,7 +1026,7 @@ public:
|
||||
* @param setting The setting passed to the command. Probably ON/OFF.
|
||||
* @return EVENT_ALLOW to bypass access checks, EVENT_STOP to halt immediately.
|
||||
*/
|
||||
virtual EventReturn OnSetChannelOption(CommandSource &source, Command *cmd, ChannelInfo *ci, const Anope::string &setting) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnSetChannelOption(CommandSource &source, Command *cmd, ChannelInfo *ci, const Anope::string &setting) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called when a nickserv/set command is used.
|
||||
* @param source The source of the command
|
||||
@@ -1031,7 +1035,7 @@ public:
|
||||
* @param setting The setting passed to the command. Probably ON/OFF.
|
||||
* @return EVENT_STOP to halt immediately
|
||||
*/
|
||||
virtual EventReturn OnSetNickOption(CommandSource &source, Command *cmd, NickCore *nc, const Anope::string &setting) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnSetNickOption(CommandSource &source, Command *cmd, NickCore *nc, const Anope::string &setting) ATTR_NOT_NULL(3, 4) { throw NotImplementedException(); }
|
||||
|
||||
/** Called whenever a message is received from the uplink
|
||||
* @param source The source of the message
|
||||
@@ -1044,11 +1048,12 @@ public:
|
||||
|
||||
/** Called to determine if a channel mode can be set by a user
|
||||
* @param u The user
|
||||
* @param c The channel
|
||||
* @param cm The mode
|
||||
*/
|
||||
virtual EventReturn OnCanSet(User *u, const ChannelMode *cm) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnCanSet(User *u, Channel *c, const ChannelMode *cm) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
|
||||
virtual EventReturn OnCheckDelete(Channel *) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnCheckDelete(Channel *c) ATTR_NOT_NULL(2) { throw NotImplementedException(); }
|
||||
|
||||
/** Called every options:expiretimeout seconds. Should be used to expire nicks,
|
||||
* channels, etc.
|
||||
@@ -1061,33 +1066,144 @@ public:
|
||||
* @param na The nick they are on
|
||||
* @return EVENT_STOP to force the user off of the nick
|
||||
*/
|
||||
virtual EventReturn OnNickValidate(User *u, NickAlias *na) { throw NotImplementedException(); }
|
||||
virtual EventReturn OnNickValidate(User *u, NickAlias *na) ATTR_NOT_NULL(2, 3) { throw NotImplementedException(); }
|
||||
};
|
||||
|
||||
enum Implementation
|
||||
{
|
||||
I_IsServicesOper,
|
||||
I_OnAccessAdd,
|
||||
I_OnAccessClear,
|
||||
I_OnAccessDel,
|
||||
I_OnAddXLine,
|
||||
I_OnAkickAdd,
|
||||
I_OnAkickDel,
|
||||
I_OnBadWordAdd,
|
||||
I_OnBadWordDel,
|
||||
I_OnBotAssign,
|
||||
I_OnBotBan,
|
||||
I_OnBotChange,
|
||||
I_OnBotCreate,
|
||||
I_OnBotDelete,
|
||||
I_OnBotFantasy,
|
||||
I_OnBotInfo,
|
||||
I_OnBotKick,
|
||||
I_OnBotNoFantasyAccess,
|
||||
I_OnBotNotice,
|
||||
I_OnBotPrivmsg,
|
||||
I_OnBotUnAssign,
|
||||
I_OnCanSet,
|
||||
I_OnChanDrop,
|
||||
I_OnChanExpire,
|
||||
I_OnChangeCoreDisplay,
|
||||
I_OnChanInfo,
|
||||
I_OnChannelCreate,
|
||||
I_OnChannelDelete,
|
||||
I_OnChannelModeAdd,
|
||||
I_OnChannelModeSet,
|
||||
I_OnChannelModeUnset,
|
||||
I_OnChannelSync,
|
||||
I_OnChanRegistered,
|
||||
I_OnChanSuspend,
|
||||
I_OnChanUnsuspend,
|
||||
I_OnCheckAuthentication,
|
||||
I_OnCheckDelete,
|
||||
I_OnCheckKick,
|
||||
I_OnCheckModes,
|
||||
I_OnCheckPriv,
|
||||
I_OnCreateBot,
|
||||
I_OnCreateChan,
|
||||
I_OnDecrypt,
|
||||
I_OnDefconLevel,
|
||||
I_OnDelBot,
|
||||
I_OnDelChan,
|
||||
I_OnDelCore,
|
||||
I_OnDeleteVHost,
|
||||
I_OnDelNick,
|
||||
I_OnDelXLine,
|
||||
I_OnDnsRequest,
|
||||
I_OnEncrypt,
|
||||
I_OnExceptionAdd,
|
||||
I_OnExceptionDel,
|
||||
I_OnExpireTick,
|
||||
I_OnFingerprint,
|
||||
I_OnGroupCheckPriv,
|
||||
I_OnInvite,
|
||||
I_OnJoinChannel,
|
||||
I_OnLeaveChannel,
|
||||
I_OnLevelChange,
|
||||
I_OnLoadDatabase,
|
||||
I_OnLog,
|
||||
I_OnLogMessage,
|
||||
I_OnMemoDel,
|
||||
I_OnMemoSend,
|
||||
I_OnMessage,
|
||||
I_OnMLock,
|
||||
I_OnModuleLoad,
|
||||
I_OnModuleUnload,
|
||||
I_OnNewServer,
|
||||
I_OnNickAddCert,
|
||||
I_OnNickClearCert,
|
||||
I_OnNickConfirm,
|
||||
I_OnNickCoreCreate,
|
||||
I_OnNickDrop,
|
||||
I_OnNickEraseCert,
|
||||
I_OnNickExpire,
|
||||
I_OnNickGroup,
|
||||
I_OnNickIdentify,
|
||||
I_OnNickInfo,
|
||||
I_OnNickLogout,
|
||||
I_OnNickRegister,
|
||||
I_OnNickSuspend,
|
||||
I_OnNickUnsuspended,
|
||||
I_OnNickUpdate,
|
||||
I_OnNickValidate,
|
||||
I_OnPartChannel,
|
||||
I_OnPostCommand,
|
||||
I_OnPostHelp,
|
||||
I_OnPostInit,
|
||||
I_OnPreUserKicked, I_OnUserKicked, I_OnReload, I_OnPreBotAssign, I_OnBotAssign, I_OnBotUnAssign, I_OnUserConnect,
|
||||
I_OnNewServer, I_OnUserNickChange, I_OnPreHelp, I_OnPostHelp, I_OnPreCommand, I_OnPostCommand, I_OnSaveDatabase,
|
||||
I_OnLoadDatabase, I_OnEncrypt, I_OnDecrypt, I_OnBotFantasy, I_OnBotNoFantasyAccess, I_OnBotBan, I_OnBadWordAdd,
|
||||
I_OnBadWordDel, I_OnCreateBot, I_OnDelBot, I_OnBotKick, I_OnPrePartChannel, I_OnPartChannel, I_OnLeaveChannel,
|
||||
I_OnJoinChannel, I_OnTopicUpdated, I_OnPreChanExpire, I_OnChanExpire, I_OnPreServerConnect, I_OnServerConnect,
|
||||
I_OnPreUplinkSync, I_OnServerDisconnect, I_OnRestart, I_OnShutdown, I_OnPreNickExpire, I_OnNickExpire, I_OnDefconLevel,
|
||||
I_OnExceptionAdd, I_OnExceptionDel, I_OnAddXLine, I_OnDelXLine, I_IsServicesOper, I_OnServerQuit, I_OnUserQuit,
|
||||
I_OnPreUserLogoff, I_OnPostUserLogoff, I_OnBotCreate, I_OnBotChange, I_OnBotDelete, I_OnAccessDel, I_OnAccessAdd,
|
||||
I_OnAccessClear, I_OnLevelChange, I_OnChanDrop, I_OnChanRegistered, I_OnChanSuspend, I_OnChanUnsuspend,
|
||||
I_OnCreateChan, I_OnDelChan, I_OnChannelCreate, I_OnChannelDelete, I_OnAkickAdd, I_OnAkickDel, I_OnCheckKick,
|
||||
I_OnChanInfo, I_OnCheckPriv, I_OnGroupCheckPriv, I_OnNickDrop, I_OnNickGroup, I_OnNickIdentify,
|
||||
I_OnUserLogin, I_OnNickLogout, I_OnNickRegister, I_OnNickConfirm, I_OnNickSuspend, I_OnNickUnsuspended, I_OnDelNick, I_OnNickCoreCreate,
|
||||
I_OnDelCore, I_OnChangeCoreDisplay, I_OnNickClearCert,
|
||||
I_OnNickAddCert, I_OnNickEraseCert, I_OnNickInfo, I_OnBotInfo, I_OnCheckAuthentication, I_OnNickUpdate,
|
||||
I_OnFingerprint, I_OnUserAway, I_OnInvite, I_OnDeleteVHost, I_OnSetVHost, I_OnSetDisplayedHost, I_OnMemoSend, I_OnMemoDel,
|
||||
I_OnChannelModeSet, I_OnChannelModeUnset, I_OnUserModeSet, I_OnUserModeUnset, I_OnChannelModeAdd, I_OnUserModeAdd,
|
||||
I_OnMLock, I_OnUnMLock, I_OnModuleLoad, I_OnModuleUnload, I_OnServerSync, I_OnUplinkSync, I_OnBotPrivmsg, I_OnBotNotice,
|
||||
I_OnPrivmsg, I_OnLog, I_OnLogMessage, I_OnDnsRequest, I_OnCheckModes, I_OnChannelSync, I_OnSetCorrectModes,
|
||||
I_OnSerializeCheck, I_OnSerializableConstruct, I_OnSerializableDestruct, I_OnSerializableUpdate,
|
||||
I_OnSerializeTypeCreate, I_OnSetChannelOption, I_OnSetNickOption, I_OnMessage, I_OnCanSet, I_OnCheckDelete,
|
||||
I_OnExpireTick, I_OnNickValidate,
|
||||
I_OnPostUserLogoff,
|
||||
I_OnPreBotAssign,
|
||||
I_OnPreChanExpire,
|
||||
I_OnPreCommand,
|
||||
I_OnPreHelp,
|
||||
I_OnPreNickExpire,
|
||||
I_OnPrePartChannel,
|
||||
I_OnPreServerConnect,
|
||||
I_OnPreUplinkSync,
|
||||
I_OnPreUserKicked,
|
||||
I_OnPreUserLogoff,
|
||||
I_OnPrivmsg,
|
||||
I_OnReload,
|
||||
I_OnRestart,
|
||||
I_OnSaveDatabase,
|
||||
I_OnSerializableConstruct,
|
||||
I_OnSerializableDestruct,
|
||||
I_OnSerializableUpdate,
|
||||
I_OnSerializeCheck,
|
||||
I_OnSerializeTypeCreate,
|
||||
I_OnServerConnect,
|
||||
I_OnServerDisconnect,
|
||||
I_OnServerQuit,
|
||||
I_OnServerSync,
|
||||
I_OnSetChannelOption,
|
||||
I_OnSetCorrectModes,
|
||||
I_OnSetDisplayedHost,
|
||||
I_OnSetNickOption,
|
||||
I_OnSetVHost,
|
||||
I_OnShutdown,
|
||||
I_OnTopicUpdated,
|
||||
I_OnUnMLock,
|
||||
I_OnUplinkSync,
|
||||
I_OnUserAway,
|
||||
I_OnUserConnect,
|
||||
I_OnUserKicked,
|
||||
I_OnUserLogin,
|
||||
I_OnUserModeAdd,
|
||||
I_OnUserModeSet,
|
||||
I_OnUserModeUnset,
|
||||
I_OnUserNickChange,
|
||||
I_OnUserQuit,
|
||||
I_SIZE
|
||||
};
|
||||
|
||||
@@ -1132,9 +1248,10 @@ public:
|
||||
|
||||
/** Find the first module of a certain type
|
||||
* @param type The module type
|
||||
* @param ignoredeprecated Whether to ignore deprecated modules.
|
||||
* @return The module
|
||||
*/
|
||||
static Module *FindFirstOf(ModType type);
|
||||
static Module *FindFirstOf(ModType type, bool ignoredeprecated = false);
|
||||
|
||||
/** Checks whether this version of Anope is at least major.minor.patch.build
|
||||
* Throws a ModuleException if not
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -1,6 +1,6 @@
|
||||
/* BotServ core functions
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -1,6 +1,6 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -1,6 +1,6 @@
|
||||
/* ChanServ core functions
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2024 Anope Team
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
+19
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -11,6 +11,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace DNS
|
||||
{
|
||||
/** Valid query types
|
||||
@@ -29,8 +31,12 @@ namespace DNS
|
||||
QUERY_SOA = 6,
|
||||
/* Reverse DNS lookup */
|
||||
QUERY_PTR = 12,
|
||||
/* TXT lookup */
|
||||
QUERY_TXT = 16,
|
||||
/* IPv6 AAAA lookup */
|
||||
QUERY_AAAA = 28,
|
||||
/** SRV lookup */
|
||||
QUERY_SRV = 33,
|
||||
/* Zone transfer */
|
||||
QUERY_AXFR = 252,
|
||||
/* A lookup for any record */
|
||||
@@ -88,11 +94,23 @@ namespace DNS
|
||||
};
|
||||
};
|
||||
|
||||
namespace Record
|
||||
{
|
||||
struct SRV final
|
||||
{
|
||||
uint16_t priority = UINT16_MAX;
|
||||
uint16_t weight = 0;
|
||||
uint16_t port = 0;
|
||||
Anope::string host;
|
||||
};
|
||||
}
|
||||
|
||||
struct ResourceRecord final
|
||||
: Question
|
||||
{
|
||||
unsigned int ttl = 0;
|
||||
Anope::string rdata;
|
||||
std::shared_ptr<void> rdataobj;
|
||||
time_t created;
|
||||
|
||||
ResourceRecord(const Anope::string &n, QueryType t, unsigned short c = 1) : Question(n, t, c), created(Anope::CurTime) { }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2024 Anope Team
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -18,6 +18,8 @@ public:
|
||||
Anope::string ident;
|
||||
Anope::string host;
|
||||
time_t time = 0;
|
||||
Anope::string validation_token;
|
||||
time_t last_validation = 0;
|
||||
|
||||
virtual ~HostRequest() = default;
|
||||
};
|
||||
+60
-35
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2012-2024 Anope Team
|
||||
* (C) 2012-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -8,28 +8,39 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
enum HTTPError
|
||||
namespace HTTP
|
||||
{
|
||||
HTTP_ERROR_OK = 200,
|
||||
HTTP_FOUND = 302,
|
||||
HTTP_BAD_REQUEST = 400,
|
||||
HTTP_PAGE_NOT_FOUND = 404,
|
||||
HTTP_NOT_SUPPORTED = 505
|
||||
};
|
||||
struct Reply;
|
||||
struct Message;
|
||||
class Page;
|
||||
class Client;
|
||||
class Provider;
|
||||
|
||||
enum Error
|
||||
{
|
||||
OK = 200,
|
||||
FOUND = 302,
|
||||
BAD_REQUEST = 400,
|
||||
PAGE_NOT_FOUND = 404,
|
||||
NOT_SUPPORTED = 505,
|
||||
};
|
||||
}
|
||||
|
||||
/* A message to someone */
|
||||
struct HTTPReply final
|
||||
struct HTTP::Reply final
|
||||
{
|
||||
HTTPError error = HTTP_ERROR_OK;
|
||||
HTTP::Error error = HTTP::OK;
|
||||
Anope::string content_type;
|
||||
std::map<Anope::string, Anope::string, ci::less> headers;
|
||||
typedef std::list<std::pair<Anope::string, Anope::string> > cookie;
|
||||
std::vector<cookie> cookies;
|
||||
|
||||
HTTPReply() = default;
|
||||
HTTPReply &operator=(const HTTPReply &) = default;
|
||||
Reply() = default;
|
||||
Reply &operator=(const HTTP::Reply &) = default;
|
||||
|
||||
HTTPReply(const HTTPReply &other) : error(other.error), length(other.length)
|
||||
Reply(const HTTP::Reply &other)
|
||||
: error(other.error)
|
||||
, length(other.length)
|
||||
{
|
||||
content_type = other.content_type;
|
||||
headers = other.headers;
|
||||
@@ -39,7 +50,7 @@ struct HTTPReply final
|
||||
out.push_back(new Data(datum->buf, datum->len));
|
||||
}
|
||||
|
||||
~HTTPReply()
|
||||
~Reply()
|
||||
{
|
||||
for (const auto *datum : out)
|
||||
delete datum;
|
||||
@@ -81,26 +92,27 @@ struct HTTPReply final
|
||||
};
|
||||
|
||||
/* A message from someone */
|
||||
struct HTTPMessage final
|
||||
struct HTTP::Message final
|
||||
{
|
||||
std::map<Anope::string, Anope::string> headers;
|
||||
std::map<Anope::string, Anope::string> cookies;
|
||||
std::map<Anope::string, Anope::string> get_data;
|
||||
std::map<Anope::string, Anope::string> post_data;
|
||||
std::map<Anope::string, Anope::string, ci::less> headers;
|
||||
std::map<Anope::string, Anope::string, ci::less> cookies;
|
||||
std::map<Anope::string, Anope::string, ci::less> get_data;
|
||||
std::map<Anope::string, Anope::string, ci::less> post_data;
|
||||
Anope::string content;
|
||||
};
|
||||
|
||||
class HTTPClient;
|
||||
class HTTPProvider;
|
||||
|
||||
class HTTPPage
|
||||
class HTTP::Page
|
||||
: public virtual Base
|
||||
{
|
||||
Anope::string url;
|
||||
Anope::string content_type;
|
||||
|
||||
public:
|
||||
HTTPPage(const Anope::string &u, const Anope::string &ct = "text/html") : url(u), content_type(ct) { }
|
||||
Page(const Anope::string &u, const Anope::string &ct = "text/html")
|
||||
: url(u)
|
||||
, content_type(ct)
|
||||
{
|
||||
}
|
||||
|
||||
const Anope::string &GetURL() const { return this->url; }
|
||||
|
||||
@@ -113,10 +125,10 @@ public:
|
||||
* @param The HTTP header sent from the client to request the page
|
||||
* @param The HTTP header that will be sent back to the client
|
||||
*/
|
||||
virtual bool OnRequest(HTTPProvider *, const Anope::string &, HTTPClient *, HTTPMessage &, HTTPReply &) = 0;
|
||||
virtual bool OnRequest(HTTP::Provider *, const Anope::string &, HTTP::Client *, HTTP::Message &, HTTP::Reply &) = 0;
|
||||
};
|
||||
|
||||
class HTTPClient
|
||||
class HTTP::Client
|
||||
: public ClientSocket
|
||||
, public BinarySocket
|
||||
, public Base
|
||||
@@ -128,18 +140,24 @@ protected:
|
||||
}
|
||||
|
||||
public:
|
||||
HTTPClient(ListenSocket *l, int f, const sockaddrs &a) : ClientSocket(l, a), BinarySocket() { }
|
||||
Client(ListenSocket *l, int f, const sockaddrs &a)
|
||||
: ClientSocket(l, a)
|
||||
, BinarySocket()
|
||||
{
|
||||
}
|
||||
|
||||
virtual const Anope::string GetIP()
|
||||
{
|
||||
return this->clientaddr.addr();
|
||||
}
|
||||
|
||||
virtual void SendError(HTTPError err, const Anope::string &msg) = 0;
|
||||
virtual void SendReply(HTTPReply *) = 0;
|
||||
virtual void SendError(HTTP::Error err, const Anope::string &msg) = 0;
|
||||
virtual void SendReply(HTTP::Reply *) = 0;
|
||||
};
|
||||
|
||||
class HTTPProvider
|
||||
#define HTTP_PROVIDER "HTTP::Provider"
|
||||
|
||||
class HTTP::Provider
|
||||
: public ListenSocket
|
||||
, public Service
|
||||
{
|
||||
@@ -150,7 +168,14 @@ public:
|
||||
std::vector<Anope::string> ext_ips;
|
||||
std::vector<Anope::string> ext_headers;
|
||||
|
||||
HTTPProvider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, bool s) : ListenSocket(i, p, i.find(':') != Anope::string::npos), Service(c, "HTTPProvider", n), ip(i), port(p), ssl(s) { }
|
||||
Provider(Module *c, const Anope::string &n, const Anope::string &i, const unsigned short p, bool s)
|
||||
: ListenSocket(i, p, i.find(':') != Anope::string::npos)
|
||||
, Service(c, HTTP_PROVIDER, n)
|
||||
, ip(i)
|
||||
, port(p)
|
||||
, ssl(s)
|
||||
{
|
||||
}
|
||||
|
||||
const Anope::string &GetIP() const
|
||||
{
|
||||
@@ -167,12 +192,12 @@ public:
|
||||
return this->ssl;
|
||||
}
|
||||
|
||||
virtual bool RegisterPage(HTTPPage *page) = 0;
|
||||
virtual void UnregisterPage(HTTPPage *page) = 0;
|
||||
virtual HTTPPage *FindPage(const Anope::string &name) = 0;
|
||||
virtual bool RegisterPage(HTTP::Page *page) = 0;
|
||||
virtual void UnregisterPage(HTTP::Page *page) = 0;
|
||||
virtual HTTP::Page *FindPage(const Anope::string &name) = 0;
|
||||
};
|
||||
|
||||
namespace HTTPUtils
|
||||
namespace HTTP
|
||||
{
|
||||
inline Anope::string URLDecode(const Anope::string &url)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2024 Anope Team
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2024 Anope Team
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -1,6 +1,6 @@
|
||||
/* NickServ core functions
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -79,4 +79,5 @@ public:
|
||||
CertService(Module *c) : Service(c, "CertService", "certs") { }
|
||||
|
||||
virtual NickCore *FindAccountFromCert(const Anope::string &cert) = 0;
|
||||
virtual void ReplaceCert(const Anope::string &oldcert, const Anope::string &newcert) = 0;
|
||||
};
|
||||
@@ -0,0 +1,195 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2014-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace SASL
|
||||
{
|
||||
class Mechanism;
|
||||
struct Message;
|
||||
class ProtocolInterface;
|
||||
struct Service;
|
||||
struct Session;
|
||||
|
||||
/** The SASL interface implemented by the protocol modules. */
|
||||
static ServiceReference<SASL::ProtocolInterface> protocol_interface("SASL::ProtocolInterface", "sasl");
|
||||
|
||||
/** The SASL interface implemented by ns_sasl. */
|
||||
static ServiceReference<SASL::Service> service("SASL::Service", "sasl");
|
||||
}
|
||||
|
||||
/** Represents a single SASL message. */
|
||||
struct SASL::Message final
|
||||
{
|
||||
/** The source UID or name. */
|
||||
Anope::string source;
|
||||
|
||||
/** The target UID or name. */
|
||||
Anope::string target;
|
||||
|
||||
/** The type of message. */
|
||||
Anope::string type;
|
||||
|
||||
/** One or more data parameters. */
|
||||
std::vector<Anope::string> data;
|
||||
};
|
||||
|
||||
/** Sends IRCd messages used by the SASL module. */
|
||||
class SASL::ProtocolInterface
|
||||
: public ::Service
|
||||
{
|
||||
protected:
|
||||
ProtocolInterface(Module *o)
|
||||
: ::Service(o, "SASL::ProtocolInterface", "sasl")
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
/** Sends the list of SASL mechanisms to the IRCd
|
||||
* @param mechs The list of SASL mechanisms.
|
||||
*/
|
||||
virtual void SendSASLMechanisms(std::vector<Anope::string> &mechs) { };
|
||||
|
||||
/** Sends a SASL message to the IRCd.
|
||||
* @param message The SASL message to send.
|
||||
*/
|
||||
virtual void SendSASLMessage(const SASL::Message &message) = 0;
|
||||
|
||||
/** Sends a login or logout for \p uid to \p na.
|
||||
* @param uid The uid of the user to log in.
|
||||
* @param na The nick alias to log the user in as or logout if nullptr.
|
||||
*/
|
||||
virtual void SendSVSLogin(const Anope::string &uid, NickAlias *na) = 0;
|
||||
};
|
||||
|
||||
/** SASL service interface. */
|
||||
struct SASL::Service
|
||||
: ::Service
|
||||
{
|
||||
Service(Module *o)
|
||||
: ::Service(o, "SASL::Service", "sasl")
|
||||
{
|
||||
}
|
||||
|
||||
virtual void DeleteSessions(Mechanism *mech, bool da = false) = 0;
|
||||
|
||||
/** Fails a SASL session. This notifies the client and increments the
|
||||
* failed attempt counter which may kill the client if the bad password
|
||||
* limit has been reached.
|
||||
*
|
||||
* @param sess The session to fail.
|
||||
*/
|
||||
virtual void Fail(Session *sess) = 0;
|
||||
|
||||
/** Retrieves the session for the specified user identifier. */
|
||||
virtual Session *GetSession(const Anope::string &uid) = 0;
|
||||
|
||||
/** Processes a SASL authentication message from the uplink.
|
||||
* @param m The message to process.
|
||||
*/
|
||||
virtual void ProcessMessage(const Message &m) = 0;
|
||||
|
||||
/** Removes the specified SASL session from the service.
|
||||
* @param sess The session to remove.
|
||||
*/
|
||||
virtual void RemoveSession(Session *sess) = 0;
|
||||
|
||||
/** Sends a SASL message for the specified session.
|
||||
* @param type The type of message to send.
|
||||
* @param data The contents of the SASL message.
|
||||
*/
|
||||
virtual void SendMessage(SASL::Session *sess, const Anope::string &type, const Anope::string &data) = 0;
|
||||
|
||||
/** Completes a successful authentication.
|
||||
* @param sess The session which finished authentication.
|
||||
* @param nc The account which has been logged into.
|
||||
*/
|
||||
virtual void Succeed(Session *sess, NickCore *nc) = 0;
|
||||
};
|
||||
|
||||
/** Represents a single SASL session. */
|
||||
struct SASL::Session
|
||||
{
|
||||
/** The time at which the session was created. */
|
||||
const time_t created;
|
||||
|
||||
/** The hostname and IP address of the authenticating user. */
|
||||
Anope::string hostname, ip;
|
||||
|
||||
/** A reference to the mechanism that the session is authenticating using. */
|
||||
Reference<Mechanism> mech;
|
||||
|
||||
/** The unique identifier of the authenticating user. */
|
||||
const Anope::string uid;
|
||||
|
||||
/** Creates a new authentication session.
|
||||
* @param m The mechanism that the session is authenticating with.
|
||||
* @param u The unique identifier of the authenticating user.
|
||||
*/
|
||||
Session(Mechanism *m, const Anope::string &u)
|
||||
: created(Anope::CurTime)
|
||||
, mech(m)
|
||||
, uid(u)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~Session()
|
||||
{
|
||||
if (service)
|
||||
service->RemoveSession(this);
|
||||
}
|
||||
|
||||
/** Retrieves a description of the user this session is associated with. */
|
||||
inline Anope::string GetUserInfo()
|
||||
{
|
||||
auto *u = User::Find(uid);
|
||||
if (u)
|
||||
return u->GetMask();
|
||||
if (!hostname.empty() && !ip.empty())
|
||||
return Anope::Format("%s (%s)", hostname.c_str(), ip.c_str());
|
||||
return "A user";
|
||||
};
|
||||
};
|
||||
|
||||
/* Represents an authentication mechanism. */
|
||||
class SASL::Mechanism
|
||||
: public ::Service
|
||||
{
|
||||
protected:
|
||||
/** Creates a new authentication mechanism.
|
||||
* @param o The module that owns this instance.
|
||||
* @param sname The name of the authentication mechanism (e.g. PLAIN).
|
||||
*/
|
||||
Mechanism(Module *o, const Anope::string &sname)
|
||||
: Service(o, "SASL::Mechanism", sname)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~Mechanism()
|
||||
{
|
||||
if (service)
|
||||
service->DeleteSessions(this, true);
|
||||
}
|
||||
|
||||
/** Creates a new SASL session.
|
||||
* @param uid The unique identifier of the authenticating user.
|
||||
*/
|
||||
virtual Session *CreateSession(const Anope::string &uid)
|
||||
{
|
||||
return new Session(this, uid);
|
||||
}
|
||||
|
||||
/** Processes an authentication message from the authenticating user.
|
||||
* @param session The session for which the message applies.
|
||||
* @param m The message sent by the user.
|
||||
* @return True if the message was processed successfully or false if
|
||||
* the session should be aborted.
|
||||
*/
|
||||
virtual bool ProcessMessage(Session *sess, const Message &m) = 0;
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2024 Anope Team
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -19,4 +19,5 @@ public:
|
||||
virtual void Validate(User *u) = 0;
|
||||
virtual void Collide(User *u, NickAlias *na) = 0;
|
||||
virtual void Release(NickAlias *na) = 0;
|
||||
virtual bool IsGuestNick(const Anope::string &nick) const = 0;
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2024 Anope Team
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -1,6 +1,6 @@
|
||||
/* OperServ ignore interface
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2024 Anope Team
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -15,13 +15,6 @@ enum NewsType
|
||||
NEWS_OPER
|
||||
};
|
||||
|
||||
struct NewsMessages final
|
||||
{
|
||||
NewsType type;
|
||||
Anope::string name;
|
||||
const char *msgs[10];
|
||||
};
|
||||
|
||||
struct NewsItem
|
||||
: Serializable
|
||||
{
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
struct MyOper final
|
||||
: Oper
|
||||
, Serializable
|
||||
{
|
||||
MyOper(const Anope::string &n, OperType *o) : Oper(n, o), Serializable("Oper") { }
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2011-2024 Anope Team
|
||||
* (C) 2011-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -28,8 +28,6 @@ struct Exception final
|
||||
time_t expires; /* Time when it expires. 0 == no expiry */
|
||||
|
||||
Exception() : Serializable("Exception") { }
|
||||
void Serialize(Serialize::Data &data) const override;
|
||||
static Serializable *Unserialize(Serializable *obj, Serialize::Data &data);
|
||||
};
|
||||
|
||||
class SessionService
|
||||
@@ -59,35 +57,3 @@ public:
|
||||
};
|
||||
|
||||
static ServiceReference<SessionService> session_service("SessionService", "session");
|
||||
|
||||
void Exception::Serialize(Serialize::Data &data) const
|
||||
{
|
||||
data["mask"] << this->mask;
|
||||
data["limit"] << this->limit;
|
||||
data["who"] << this->who;
|
||||
data["reason"] << this->reason;
|
||||
data["time"] << this->time;
|
||||
data["expires"] << this->expires;
|
||||
}
|
||||
|
||||
Serializable *Exception::Unserialize(Serializable *obj, Serialize::Data &data)
|
||||
{
|
||||
if (!session_service)
|
||||
return NULL;
|
||||
|
||||
Exception *ex;
|
||||
if (obj)
|
||||
ex = anope_dynamic_static_cast<Exception *>(obj);
|
||||
else
|
||||
ex = new Exception;
|
||||
data["mask"] >> ex->mask;
|
||||
data["limit"] >> ex->limit;
|
||||
data["who"] >> ex->who;
|
||||
data["reason"] >> ex->reason;
|
||||
data["time"] >> ex->time;
|
||||
data["expires"] >> ex->expires;
|
||||
|
||||
if (!obj)
|
||||
session_service->AddException(ex);
|
||||
return ex;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -0,0 +1,282 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2010-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "encryption.h"
|
||||
#include "httpd.h"
|
||||
|
||||
#include <variant>
|
||||
|
||||
namespace RPC
|
||||
{
|
||||
class Array;
|
||||
class Event;
|
||||
class Map;
|
||||
class Request;
|
||||
class ServiceInterface;
|
||||
struct Token;
|
||||
class Value;
|
||||
|
||||
/** Represents possible types of RPC value. */
|
||||
using ValueUnion = std::variant<Array, Map, Anope::string, std::nullptr_t, bool, double, int64_t, uint64_t>;
|
||||
|
||||
/** Represents standard RPC errors from the JSON-RPC and XML-RPC specifications. */
|
||||
enum Error
|
||||
: int64_t
|
||||
{
|
||||
ERR_CUSTOM_END = -32000,
|
||||
ERR_CUSTOM_START = -32099,
|
||||
ERR_PARSE_ERROR = -32700,
|
||||
ERR_INVALID_REQUEST = -32600,
|
||||
ERR_METHOD_NOT_FOUND = -32601,
|
||||
ERR_INVALID_PARAMS = -32602,
|
||||
};
|
||||
}
|
||||
|
||||
class RPC::Array final
|
||||
{
|
||||
private:
|
||||
std::vector<Value> replies;
|
||||
|
||||
public:
|
||||
/** Retrieves the list of RPC replies. */
|
||||
inline const auto &GetReplies() const { return this->replies; }
|
||||
|
||||
template <typename T>
|
||||
inline Array &Reply(const T &t)
|
||||
{
|
||||
this->replies.emplace_back(RPC::Value(t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline Array &ReplyArray();
|
||||
|
||||
inline Map &ReplyMap();
|
||||
};
|
||||
|
||||
class RPC::Map final
|
||||
{
|
||||
private:
|
||||
Anope::map<Value> replies;
|
||||
|
||||
public:
|
||||
/** Retrieves the list of RPC replies. */
|
||||
inline const auto &GetReplies() const { return this->replies; }
|
||||
|
||||
template <typename T>
|
||||
inline Map &Reply(const Anope::string &key, const T &t)
|
||||
{
|
||||
this->replies.emplace(key, RPC::Value(t));
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline Array &ReplyArray(const Anope::string &key);
|
||||
|
||||
inline Map &ReplyMap(const Anope::string &key);
|
||||
};
|
||||
|
||||
class RPC::Value final
|
||||
{
|
||||
private:
|
||||
RPC::ValueUnion value;
|
||||
|
||||
public:
|
||||
explicit Value(const ValueUnion &v)
|
||||
: value(v)
|
||||
{
|
||||
}
|
||||
|
||||
explicit Value(const Array &a)
|
||||
: value(a)
|
||||
{
|
||||
}
|
||||
|
||||
explicit Value(const Map &m)
|
||||
: value(m)
|
||||
{
|
||||
}
|
||||
|
||||
explicit Value(std::nullptr_t)
|
||||
: value(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
explicit Value(bool b)
|
||||
: value(b)
|
||||
{
|
||||
}
|
||||
|
||||
Value(double d)
|
||||
: value(d)
|
||||
{
|
||||
}
|
||||
|
||||
Value(int64_t i)
|
||||
: value(i)
|
||||
{
|
||||
}
|
||||
|
||||
Value(uint64_t u)
|
||||
: value(u)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
Value(const T &t)
|
||||
: value(Anope::ToString(t))
|
||||
{
|
||||
}
|
||||
|
||||
inline auto &Get() { return this->value; }
|
||||
|
||||
inline const auto &Get() const { return this->value; }
|
||||
};
|
||||
|
||||
class RPC::Request final
|
||||
{
|
||||
private:
|
||||
std::optional<std::pair<int64_t, Anope::string>> error;
|
||||
std::optional<Value> root;
|
||||
|
||||
public:
|
||||
Anope::string name;
|
||||
Anope::string id;
|
||||
std::deque<Anope::string> data;
|
||||
HTTP::Reply &reply;
|
||||
|
||||
Request(HTTP::Reply &r)
|
||||
: reply(r)
|
||||
{
|
||||
}
|
||||
|
||||
inline void Error(uint64_t errcode, const Anope::string &errstr)
|
||||
{
|
||||
this->error.emplace(errcode, errstr);
|
||||
}
|
||||
|
||||
template<typename T = Map>
|
||||
inline T &Root();
|
||||
|
||||
inline const auto &GetError() const { return this->error; }
|
||||
|
||||
inline const auto &GetRoot() const { return this->root; }
|
||||
};
|
||||
|
||||
#define RPC_EVENT "RPC::Event"
|
||||
|
||||
class RPC::Event
|
||||
: public Service
|
||||
{
|
||||
private:
|
||||
size_t minparams;
|
||||
|
||||
protected:
|
||||
Event(Module *o, const Anope::string& e, size_t mp = 0)
|
||||
: Service(o, RPC_EVENT, e)
|
||||
, minparams(mp)
|
||||
{
|
||||
}
|
||||
|
||||
public:
|
||||
virtual ~Event() = default;
|
||||
|
||||
const auto &GetMinParams() const { return minparams; }
|
||||
|
||||
virtual bool Run(ServiceInterface *iface, HTTP::Client *client, Request &request) = 0;
|
||||
};
|
||||
|
||||
struct RPC::Token final
|
||||
{
|
||||
std::vector<Anope::string> methods;
|
||||
Anope::string token;
|
||||
Anope::string token_hash;
|
||||
};
|
||||
|
||||
class RPC::ServiceInterface
|
||||
: public Service
|
||||
{
|
||||
private:
|
||||
bool CompareToken(const RPC::Token &token, const Anope::string &rawtoken) const
|
||||
{
|
||||
if (token.token_hash.empty())
|
||||
return token.token.equals_cs(rawtoken); // Plaintext token.
|
||||
|
||||
auto *service = Service::FindService("Encryption::Provider", token.token_hash);
|
||||
if (!service)
|
||||
return false; // Malformed hash.
|
||||
|
||||
auto *hashprov = static_cast<Encryption::Provider *>(service);
|
||||
return hashprov->Compare(token.token, rawtoken);
|
||||
}
|
||||
|
||||
public:
|
||||
std::vector<Token> tokens;
|
||||
|
||||
ServiceInterface(Module *creator)
|
||||
: Service(creator, "RPC::ServiceInterface", "rpc")
|
||||
{
|
||||
}
|
||||
|
||||
bool CanExecute(const Anope::string &header, const Anope::string &method) const
|
||||
{
|
||||
if (header.compare(0, 7, "Bearer ", 7) != 0)
|
||||
return false; // No token provided.
|
||||
|
||||
auto rawtoken = Anope::B64Decode(header.substr(7));
|
||||
for (const auto &token : tokens)
|
||||
{
|
||||
if (!CompareToken(token, rawtoken))
|
||||
continue; // No valid token.
|
||||
|
||||
for (const auto &glob : token.methods)
|
||||
{
|
||||
if (glob[0] == '~' && Anope::Match(method, glob.substr(1)))
|
||||
return false; // Negative match.
|
||||
|
||||
if (Anope::Match(method, glob))
|
||||
return true; // Positive match.
|
||||
}
|
||||
}
|
||||
return false; // No match.
|
||||
}
|
||||
|
||||
virtual void Reply(Request &request) = 0;
|
||||
};
|
||||
|
||||
inline RPC::Array &RPC::Array::ReplyArray()
|
||||
{
|
||||
auto &reply = this->replies.emplace_back(RPC::Array());
|
||||
return std::get<RPC::Array>(reply.Get());
|
||||
}
|
||||
|
||||
inline RPC::Map &RPC::Array::ReplyMap()
|
||||
{
|
||||
auto &reply = this->replies.emplace_back(RPC::Map());
|
||||
return std::get<RPC::Map>(reply.Get());
|
||||
}
|
||||
|
||||
inline RPC::Array &RPC::Map::ReplyArray(const Anope::string &key)
|
||||
{
|
||||
auto it = this->replies.emplace(key, RPC::Array());
|
||||
return std::get<RPC::Array>(it.first->second.Get());
|
||||
}
|
||||
|
||||
inline RPC::Map &RPC::Map::ReplyMap(const Anope::string &key)
|
||||
{
|
||||
auto it = this->replies.emplace(key, RPC::Map());
|
||||
return std::get<RPC::Map>(it.first->second.Get());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline T &RPC::Request::Root()
|
||||
{
|
||||
if (!this->root.has_value())
|
||||
this->root = RPC::Value(T());
|
||||
return std::get<T>(this->root.value().Get());
|
||||
}
|
||||
@@ -1,144 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2014-2024 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace SASL
|
||||
{
|
||||
struct Message final
|
||||
{
|
||||
Anope::string source;
|
||||
Anope::string target;
|
||||
Anope::string type;
|
||||
Anope::string data;
|
||||
Anope::string ext;
|
||||
};
|
||||
|
||||
class Mechanism;
|
||||
struct Session;
|
||||
|
||||
class Service
|
||||
: public ::Service
|
||||
{
|
||||
public:
|
||||
Service(Module *o) : ::Service(o, "SASL::Service", "sasl") { }
|
||||
|
||||
virtual void ProcessMessage(const Message &) = 0;
|
||||
|
||||
virtual Anope::string GetAgent() = 0;
|
||||
|
||||
virtual Session *GetSession(const Anope::string &uid) = 0;
|
||||
|
||||
virtual void SendMessage(SASL::Session *session, const Anope::string &type, const Anope::string &data) = 0;
|
||||
|
||||
virtual void Succeed(Session *, NickCore *) = 0;
|
||||
virtual void Fail(Session *) = 0;
|
||||
virtual void SendMechs(Session *) = 0;
|
||||
virtual void DeleteSessions(Mechanism *, bool = false) = 0;
|
||||
virtual void RemoveSession(Session *) = 0;
|
||||
};
|
||||
|
||||
static ServiceReference<SASL::Service> sasl("SASL::Service", "sasl");
|
||||
|
||||
struct Session
|
||||
{
|
||||
time_t created;
|
||||
Anope::string uid;
|
||||
Anope::string hostname, ip;
|
||||
Reference<Mechanism> mech;
|
||||
|
||||
Session(Mechanism *m, const Anope::string &u) : created(Anope::CurTime), uid(u), mech(m) { }
|
||||
virtual ~Session()
|
||||
{
|
||||
if (sasl)
|
||||
sasl->RemoveSession(this);
|
||||
}
|
||||
};
|
||||
|
||||
/* PLAIN, EXTERNAL, etc */
|
||||
class Mechanism
|
||||
: public ::Service
|
||||
{
|
||||
public:
|
||||
Mechanism(Module *o, const Anope::string &sname) : Service(o, "SASL::Mechanism", sname) { }
|
||||
|
||||
virtual Session *CreateSession(const Anope::string &uid) { return new Session(this, uid); }
|
||||
|
||||
virtual void ProcessMessage(Session *session, const Message &) = 0;
|
||||
|
||||
virtual ~Mechanism()
|
||||
{
|
||||
if (sasl)
|
||||
sasl->DeleteSessions(this, true);
|
||||
}
|
||||
};
|
||||
|
||||
class IdentifyRequest
|
||||
: public ::IdentifyRequest
|
||||
{
|
||||
Anope::string uid;
|
||||
Anope::string hostname, ip;
|
||||
|
||||
public:
|
||||
IdentifyRequest(Module *m, const Anope::string &id, const Anope::string &acc, const Anope::string &pass, const Anope::string &h, const Anope::string &i) : ::IdentifyRequest(m, acc, pass), uid(id), hostname(h), ip(i) { }
|
||||
|
||||
void OnSuccess() override
|
||||
{
|
||||
if (!sasl)
|
||||
return;
|
||||
|
||||
NickAlias *na = NickAlias::Find(GetAccount());
|
||||
if (!na || na->nc->HasExt("NS_SUSPENDED") || na->nc->HasExt("UNCONFIRMED"))
|
||||
return OnFail();
|
||||
|
||||
unsigned int maxlogins = Config->GetModule("ns_identify")->Get<unsigned int>("maxlogins");
|
||||
if (maxlogins && na->nc->users.size() >= maxlogins)
|
||||
return OnFail();
|
||||
|
||||
Session *s = sasl->GetSession(uid);
|
||||
if (s)
|
||||
{
|
||||
Anope::string user = "A user";
|
||||
if (!hostname.empty() && !ip.empty())
|
||||
user = hostname + " (" + ip + ")";
|
||||
|
||||
Log(this->GetOwner(), "sasl", Config->GetClient("NickServ")) << user << " identified to account " << this->GetAccount() << " using SASL";
|
||||
sasl->Succeed(s, na->nc);
|
||||
delete s;
|
||||
}
|
||||
}
|
||||
|
||||
void OnFail() override
|
||||
{
|
||||
if (!sasl)
|
||||
return;
|
||||
|
||||
Session *s = sasl->GetSession(uid);
|
||||
if (s)
|
||||
{
|
||||
sasl->Fail(s);
|
||||
delete s;
|
||||
}
|
||||
|
||||
Anope::string accountstatus;
|
||||
NickAlias *na = NickAlias::Find(GetAccount());
|
||||
if (!na)
|
||||
accountstatus = "nonexistent ";
|
||||
else if (na->nc->HasExt("NS_SUSPENDED"))
|
||||
accountstatus = "suspended ";
|
||||
else if (na->nc->HasExt("UNCONFIRMED"))
|
||||
accountstatus = "unconfirmed ";
|
||||
|
||||
Anope::string user = "A user";
|
||||
if (!hostname.empty() && !ip.empty())
|
||||
user = hostname + " (" + ip + ")";
|
||||
|
||||
Log(this->GetOwner(), "sasl", Config->GetClient("NickServ")) << user << " failed to identify for " << accountstatus << "account " << this->GetAccount() << " using SASL";
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+1
-23
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -19,7 +19,6 @@ namespace SQL
|
||||
public:
|
||||
typedef std::map<Anope::string, std::stringstream *> Map;
|
||||
Map data;
|
||||
std::map<Anope::string, Type> types;
|
||||
|
||||
~Data()
|
||||
{
|
||||
@@ -34,14 +33,6 @@ namespace SQL
|
||||
return *ss;
|
||||
}
|
||||
|
||||
std::set<Anope::string> KeySet() const override
|
||||
{
|
||||
std::set<Anope::string> keys;
|
||||
for (const auto &[key, _] : this->data)
|
||||
keys.insert(key);
|
||||
return keys;
|
||||
}
|
||||
|
||||
size_t Hash() const override
|
||||
{
|
||||
size_t hash = 0;
|
||||
@@ -67,19 +58,6 @@ namespace SQL
|
||||
delete value;
|
||||
this->data.clear();
|
||||
}
|
||||
|
||||
void SetType(const Anope::string &key, Type t) override
|
||||
{
|
||||
this->types[key] = t;
|
||||
}
|
||||
|
||||
Type GetType(const Anope::string &key) const override
|
||||
{
|
||||
std::map<Anope::string, Type>::const_iterator it = this->types.find(key);
|
||||
if (it != this->types.end())
|
||||
return it->second;
|
||||
return DT_TEXT;
|
||||
}
|
||||
};
|
||||
|
||||
/** A SQL exception, can be thrown at various points
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2010-2024 Anope Team
|
||||
* (C) 2010-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2010-2024 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "httpd.h"
|
||||
|
||||
class XMLRPCRequest final
|
||||
{
|
||||
std::map<Anope::string, Anope::string> replies;
|
||||
|
||||
public:
|
||||
Anope::string name;
|
||||
Anope::string id;
|
||||
std::deque<Anope::string> data;
|
||||
HTTPReply &r;
|
||||
|
||||
XMLRPCRequest(HTTPReply &_r) : r(_r) { }
|
||||
inline void reply(const Anope::string &dname, const Anope::string &ddata) { this->replies.emplace(dname, ddata); }
|
||||
inline const std::map<Anope::string, Anope::string> &get_replies() { return this->replies; }
|
||||
};
|
||||
|
||||
class XMLRPCServiceInterface;
|
||||
|
||||
class XMLRPCEvent
|
||||
{
|
||||
public:
|
||||
virtual ~XMLRPCEvent() = default;
|
||||
virtual bool Run(XMLRPCServiceInterface *iface, HTTPClient *client, XMLRPCRequest &request) = 0;
|
||||
};
|
||||
|
||||
class XMLRPCServiceInterface
|
||||
: public Service
|
||||
{
|
||||
public:
|
||||
XMLRPCServiceInterface(Module *creator, const Anope::string &sname) : Service(creator, "XMLRPCServiceInterface", sname) { }
|
||||
|
||||
virtual void Register(XMLRPCEvent *event) = 0;
|
||||
|
||||
virtual void Unregister(XMLRPCEvent *event) = 0;
|
||||
|
||||
virtual Anope::string Sanitize(const Anope::string &string) = 0;
|
||||
|
||||
virtual void Reply(XMLRPCRequest &request) = 0;
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
|
||||
+2
-1
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
|
||||
* (C) 2008-2024 Anope Team <team@anope.org>
|
||||
* (C) 2008-2025 Anope Team <team@anope.org>
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
*/
|
||||
@@ -23,6 +23,7 @@ struct CoreExport Oper
|
||||
/* Whether the user must be an IRC operator (umode +o) to be considered a services operator */
|
||||
bool require_oper = true;
|
||||
Anope::string password;
|
||||
Anope::string password_hash;
|
||||
std::vector<Anope::string> certfp;
|
||||
/* Hosts allowed to use this operator block */
|
||||
std::vector<Anope::string> hosts;
|
||||
|
||||
+22
-35
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) 2003-2024 Anope Team
|
||||
* (C) 2003-2025 Anope Team
|
||||
* Contact us at team@anope.org
|
||||
*
|
||||
* Please read COPYING and README for further details.
|
||||
@@ -41,9 +41,9 @@ public:
|
||||
|
||||
virtual ~IRCDProto();
|
||||
|
||||
virtual void SendNoticeInternal(const MessageSource &, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendPrivmsgInternal(const MessageSource &, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendCTCPInternal(const MessageSource &, const Anope::string &dest, const Anope::string &buf);
|
||||
virtual void SendNotice(const MessageSource &source, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendPrivmsg(const MessageSource &source, const Anope::string &dest, const Anope::string &msg, const Anope::map<Anope::string> &tags = {});
|
||||
virtual void SendTagmsg(const MessageSource &source, const Anope::string &dest, const Anope::map<Anope::string> &tags);
|
||||
|
||||
/** Parses an incoming message from the IRC server.
|
||||
* @param message The message to parse.
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
/* Can we set vidents on users? */
|
||||
bool CanSetVIdent = false;
|
||||
|
||||
/* Can we ban specific gecos from being used? */
|
||||
/* Can we ban specific realname from being used? */
|
||||
bool CanSNLine = false;
|
||||
|
||||
/* Can we ban specific nicknames from being used? */
|
||||
@@ -101,17 +101,17 @@ public:
|
||||
/* See ns_cert */
|
||||
bool CanCertFP = false;
|
||||
|
||||
/* Can users log out before being fully connected? */
|
||||
bool CanSVSLogout = false;
|
||||
|
||||
/* Whether this IRCd requires unique IDs for each user or server. See TS6/P10. */
|
||||
bool RequiresID = false;
|
||||
|
||||
/* If this IRCd has unique ids, whether the IDs and nicknames are ambiguous */
|
||||
bool AmbiguousID = false;
|
||||
|
||||
/** Can we ask the server to unban a user? */
|
||||
bool CanClearBans = false;
|
||||
/** Can we ask the server to remove list modes matching a user? */
|
||||
std::set<Anope::string> CanClearModes;
|
||||
|
||||
/** Can we send tag messages? */
|
||||
bool CanTagMessage = false;
|
||||
|
||||
/* The maximum length of a channel name. */
|
||||
size_t MaxChannel = 0;
|
||||
@@ -131,11 +131,15 @@ public:
|
||||
/* The maximum length of a username. */
|
||||
size_t MaxUser = 0;
|
||||
|
||||
|
||||
/* Retrieves the next free UID or SID */
|
||||
virtual Anope::string UID_Retrieve();
|
||||
virtual Anope::string SID_Retrieve();
|
||||
|
||||
/** Retrieves advice on what might be the problem when a link fails.
|
||||
* @param advice The location to store the advice.
|
||||
*/
|
||||
virtual void GetLinkAdvice(std::vector<Anope::string> &advice) { }
|
||||
|
||||
/** Extracts a timestamp from a string. */
|
||||
virtual time_t ExtractTimestamp(const Anope::string &str);
|
||||
|
||||
@@ -195,19 +199,11 @@ public:
|
||||
*/
|
||||
virtual void SendSVSKill(const MessageSource &source, User *user, const Anope::string &msg);
|
||||
|
||||
virtual void SendMode(const MessageSource &source, Channel *chan, const ModeManager::Change &change);
|
||||
virtual void SendModeInternal(const MessageSource &source, Channel *chan, const Anope::string &modes, const std::vector<Anope::string> &values);
|
||||
template <typename... Args>
|
||||
void SendMode(const MessageSource &source, Channel *chan, const Anope::string &modes, Args &&...args)
|
||||
{
|
||||
SendModeInternal(source, chan, modes, { Anope::ToString(args)... });
|
||||
}
|
||||
|
||||
virtual void SendMode(const MessageSource &source, User *u, const ModeManager::Change &change);
|
||||
virtual void SendModeInternal(const MessageSource &source, User *u, const Anope::string &modes, const std::vector<Anope::string> &values);
|
||||
template <typename... Args>
|
||||
void SendMode(const MessageSource &source, User *u, const Anope::string &modes, Args &&...args)
|
||||
{
|
||||
SendModeInternal(source, u, modes, { Anope::ToString(args)... });
|
||||
}
|
||||
|
||||
/** Introduces a client to the rest of the network
|
||||
* @param u The client to introduce
|
||||
@@ -216,18 +212,13 @@ public:
|
||||
|
||||
virtual void SendKick(const MessageSource &source, const Channel *chan, User *user, const Anope::string &msg);
|
||||
|
||||
virtual void SendNotice(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
|
||||
virtual void SendPrivmsg(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
|
||||
virtual void SendAction(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
|
||||
virtual void SendCTCP(const MessageSource &source, const Anope::string &dest, const char *fmt, ...) ATTR_FORMAT(4, 5);
|
||||
|
||||
virtual void SendGlobalNotice(BotInfo *bi, const Server *dest, const Anope::string &msg) = 0;
|
||||
virtual void SendGlobalPrivmsg(BotInfo *bi, const Server *desc, const Anope::string &msg) = 0;
|
||||
|
||||
virtual void SendContextNotice(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
|
||||
virtual void SendContextPrivmsg(BotInfo *bi, User *target, Channel *context, const Anope::string &msg);
|
||||
|
||||
virtual void SendQuit(User *u, const Anope::string &msg);
|
||||
virtual void SendQuit(User *u, const Anope::string &msg = "", const Anope::string &opermsg = "");
|
||||
virtual void SendPing(const Anope::string &servname, const Anope::string &who);
|
||||
virtual void SendPong(const Anope::string &servname, const Anope::string &who);
|
||||
|
||||
@@ -245,9 +236,9 @@ public:
|
||||
* @param bi The source of the message
|
||||
* @param u The user to join
|
||||
* @param chan The channel to join the user to
|
||||
* @param param Channel key?
|
||||
* @param key Channel key
|
||||
*/
|
||||
virtual void SendSVSJoin(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string ¶m) { }
|
||||
virtual void SendSVSJoin(const MessageSource &source, User *u, const Anope::string &chan, const Anope::string &key) { }
|
||||
|
||||
/** Force parts a user that isn't ours from a channel.
|
||||
* @param source The source of the message
|
||||
@@ -309,11 +300,7 @@ public:
|
||||
*/
|
||||
virtual void SendOper(User *u);
|
||||
|
||||
virtual void SendClearBans(const MessageSource &user, Channel *c, User* u) { }
|
||||
|
||||
virtual void SendSASLMechanisms(std::vector<Anope::string> &) { }
|
||||
virtual void SendSASLMessage(const SASL::Message &) { }
|
||||
virtual void SendSVSLogin(const Anope::string &uid, NickAlias *na) { }
|
||||
virtual void SendClearModes(const MessageSource &user, Channel *c, User* u, const Anope::string &mode) { }
|
||||
|
||||
virtual bool IsNickValid(const Anope::string &);
|
||||
virtual bool IsChannelValid(const Anope::string &);
|
||||
@@ -371,7 +358,7 @@ public:
|
||||
FLAG_MAX,
|
||||
};
|
||||
|
||||
private:
|
||||
protected:
|
||||
/** The name of the message (e.g. PRIVMSG). */
|
||||
const Anope::string name;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user