Compare commits
918 commits
Author | SHA1 | Date | |
---|---|---|---|
b4754f1311 | |||
86522d6b3e | |||
31e882eb42 | |||
749334493b | |||
9e49da5d56 | |||
ef9bbe6e1f | |||
491f451acb | |||
82b40a49b2 | |||
abc33d05f7 | |||
fedebc7ed4 | |||
310687cdce | |||
eed8277ed6 | |||
75ccf1a0ed | |||
6173639cdd | |||
7e58e5840f | |||
48b92c33fd | |||
599d819dc9 | |||
93d761b13b | |||
1f5903c5e9 | |||
6f1aa72ad0 | |||
45f602fbe2 | |||
4b7f41660f | |||
5f1eb63c4f | |||
8537c8a436 | |||
23797a2a04 | |||
068ba7b6e5 | |||
e974f3f4bc | |||
daf5cad807 | |||
00178b4e16 | |||
bfc468de5b | |||
4d2f1e7978 | |||
765279c887 | |||
1a1195ca28 | |||
f589518466 | |||
f05ab97513 | |||
16ac7937fa | |||
67de345c25 | |||
4f0f4214c5 | |||
700369d7c9 | |||
64bd5c92af | |||
83b4b18be7 | |||
f27501634c | |||
fcbfe63aee | |||
4b908d596e | |||
97e1e5e73b | |||
ff98e39b0c | |||
863de0c219 | |||
c60531f617 | |||
ebc3da70e4 | |||
3cbe44c1c0 | |||
2905dec49f | |||
ebf05fa398 | |||
8d9acd8184 | |||
c3a8018cc3 | |||
db0e4d30f1 | |||
3419e12f06 | |||
3f7fb10343 | |||
cd873acc24 | |||
8959a13444 | |||
48d7953580 | |||
6db8a9c8e3 | |||
2118c6122c | |||
d2dd66fb4b | |||
b020ae4c0d | |||
833421976e | |||
e83e12bd11 | |||
c43d4c6dec | |||
4f9ff1b641 | |||
33a3e3c7ef | |||
0405c69d98 | |||
8321c2ea48 | |||
f311399c2f | |||
7c1dec5c5e | |||
a58dc67caf | |||
aa15e98d29 | |||
6fca32451f | |||
d150f079b8 | |||
3ae568a23b | |||
b2aae15c79 | |||
ee5b5ad11a | |||
0cf4a0a763 | |||
b46b305c38 | |||
eea0eea5fa | |||
cf0bafff94 | |||
7931e4adbe | |||
2a9bb44fec | |||
0d37c7b152 | |||
8aa4dcbcce | |||
26f1a2da1d | |||
69c18841bc | |||
6da6783395 | |||
6c2338b8b6 | |||
d371bf5a01 | |||
3c4e76e5b9 | |||
c684332b9d | |||
356f62990d | |||
a10104dd9d | |||
4a4e702d9f | |||
8412a8c26d | |||
3a773f7d46 | |||
e34ea334d6 | |||
44c1e8db3e | |||
a40d20458b | |||
208f3a82d9 | |||
f8de100dde | |||
c68c25aa95 | |||
1cd7c5a79e | |||
4c90870f4a | |||
d700aa06df | |||
adaff5ec38 | |||
acaa27f20d | |||
abebca5079 | |||
8e37c3912a | |||
86b35874bf | |||
105850990b | |||
5a3b1d3f19 | |||
b562b674a7 | |||
bc8bf6bf57 | |||
8b63846270 | |||
8fb872ad6f | |||
65fa55d51f | |||
c99debd740 | |||
2313d36584 | |||
5834a23b7e | |||
d8291e2156 | |||
66b8adb743 | |||
945c763768 | |||
1825b13a23 | |||
e94b1aa97d | |||
37b4eb4343 | |||
e57f80f9d9 | |||
207c1b7e02 | |||
c2c5f8beae | |||
db84691691 | |||
d67cf4ace7 | |||
1d85a1c516 | |||
d9d5dd2e47 | |||
f06ba4a6f5 | |||
1b55736ee1 | |||
a43d4e0b5d | |||
6f3b84a7c0 | |||
6ec39c6d6d | |||
a1ea25ae74 | |||
c3d1930592 | |||
4fcdce5229 | |||
66ca972b9b | |||
6894e05610 | |||
8c13276556 | |||
d9e5016689 | |||
b20783a18e | |||
7f7fd43b8d | |||
db931f1f23 | |||
0fba4445f8 | |||
e510a77af1 | |||
2b2d046835 | |||
6fd59e9487 | |||
6a3caa84ce | |||
cef750497b | |||
c2e11743c6 | |||
b6e1888e70 | |||
a2646ceb9f | |||
c4cf7b10d5 | |||
c24fcb8ef5 | |||
ae9e24cded | |||
7d54bfe756 | |||
ed971a4e7a | |||
c0f5a8bad3 | |||
2f7b98c064 | |||
acf56b2178 | |||
9bb7b34c69 | |||
b9deb55de6 | |||
6e8726ea55 | |||
c025117f44 | |||
94dc07fb4f | |||
951fdaa5f7 | |||
2a2ab39b5f | |||
f394362ce1 | |||
5f224edf6d | |||
9b595490bd | |||
646682e2a9 | |||
893d554136 | |||
cc6cd6aed3 | |||
7581c26d59 | |||
40ee593c3b | |||
f35313bf62 | |||
145749408b | |||
29d73f20cf | |||
3ba2dfba4a | |||
0880d53894 | |||
3d49ebbd5f | |||
d5000fa3c1 | |||
af839918a1 | |||
aa0c3dd81c | |||
3f7ed4792b | |||
d6c0b99869 | |||
afece310d2 | |||
5465baf59a | |||
359e9d4b28 | |||
0aa2136fec | |||
8e03eda655 | |||
2aa551bfcd | |||
d7d1f09f28 | |||
bcdd8c10cf | |||
c138971230 | |||
55f279c9b1 | |||
78a0df8a8e | |||
a18c15e172 | |||
2eb1c314cf | |||
92634031a8 | |||
070d29c7dd | |||
a33b8354b8 | |||
e1cc59449b | |||
c3763a1444 | |||
eb02ede6a4 | |||
c5c1e939c0 | |||
a90db36fe2 | |||
a3eada1727 | |||
7bda64b5de | |||
61248387d8 | |||
c26d5f53d2 | |||
fa34f47dab | |||
4972e8e5d8 | |||
7aaa46e9f4 | |||
cbc69be517 | |||
4abdb268ef | |||
ea40d71f14 | |||
0dd02d7039 | |||
25d7a74568 | |||
fe6ddf267d | |||
0cf98c6ca4 | |||
8c13c44731 | |||
adb7a8c692 | |||
881bd716b0 | |||
a70f22d402 | |||
c99d2ce805 | |||
e4dd6d5254 | |||
12bc76406b | |||
dfc711b180 | |||
bc2a427f48 | |||
2573c7d596 | |||
8903d67e9c | |||
99a27c2769 | |||
db8e1c198c | |||
5dd1f89105 | |||
0e80f22b4f | |||
562adec177 | |||
fd39c25c7d | |||
db6f322ce5 | |||
db1a1a9474 | |||
54e6e6dd87 | |||
65e221a4f6 | |||
35d8be009e | |||
97a9fd1597 | |||
10f1ee8518 | |||
4e1e09b069 | |||
7c270ed872 | |||
e462a70147 | |||
ede05c39df | |||
655889d2b9 | |||
aab95fb040 | |||
2963e747be | |||
bc75d1eb73 | |||
ba9d79ce60 | |||
3ea0e4b3ac | |||
29eae2e7ee | |||
9b8caaa4a8 | |||
29b8888eca | |||
f1b50d741c | |||
8efb09cea8 | |||
0a6b84fa2b | |||
5dd8b36f92 | |||
f53f43082a | |||
9fb870648e | |||
2a46761dc5 | |||
611420757a | |||
95823db1d9 | |||
0d144d4b10 | |||
384331b287 | |||
22bf1cfed5 | |||
d7bdcd66d0 | |||
48b5c8a345 | |||
25a0850b71 | |||
f4c6bf48fa | |||
6f575bf921 | |||
e0a51d21f9 | |||
1db47a0b22 | |||
d130957c6f | |||
c7961c2817 | |||
d11f32189e | |||
2784af626b | |||
ef6c600dbc | |||
abd34bde80 | |||
aab28b5979 | |||
79efd005d1 | |||
6f297a0d6b | |||
9f82690ec7 | |||
1d15d669b1 | |||
d05499a76f | |||
00caee4bc1 | |||
04e88264cd | |||
af9546e3d1 | |||
1535290290 | |||
d8930a9520 | |||
5d90571843 | |||
663f7d682a | |||
a8a4500125 | |||
7c2ad09ff1 | |||
fdd1fb7e42 | |||
05ef252bf7 | |||
e35d112b28 | |||
b2dcf781c2 | |||
3f628e58f0 | |||
e873d01338 | |||
2c1ea56e79 | |||
05b7ca8a41 | |||
43615f253c | |||
1263160924 | |||
d2c0e12e1a | |||
e4d3f3f2c4 | |||
b8c3bf9615 | |||
30f2ef7273 | |||
381887d937 | |||
98ed1d5042 | |||
9270f5f8b4 | |||
5b9d8911e1 | |||
48c2ad65c0 | |||
6644400a23 | |||
484f11664e | |||
082b430ee2 | |||
8681dea66f | |||
81cee7b00f | |||
2de9dc66bd | |||
8098a4855d | |||
2e1c6e7732 | |||
790bd3159e | |||
11a75a7179 | |||
694cc119ed | |||
0d3dc268ca | |||
b98879bd7d | |||
ad3a9907a3 | |||
a798800198 | |||
273ac60c7d | |||
faf40d3048 | |||
22e29d5ce3 | |||
56b8114b93 | |||
eff93791d1 | |||
ec049c7485 | |||
f580f0f7f2 | |||
1f965a1833 | |||
35399c3f78 | |||
87cb58102a | |||
df7384570e | |||
bf985d5626 | |||
bd14a1e15e | |||
c99210f624 | |||
d6df365e4b | |||
9f3dc273f0 | |||
67f618da71 | |||
864bf99c8e | |||
b58cd6b11e | |||
f92f7d26b1 | |||
8a945b2dc6 | |||
2c78d713eb | |||
b8cecdad1d | |||
21cbecff8e | |||
2f4e6bdb2d | |||
ae6220d421 | |||
8b8cbb39f8 | |||
7b2b496a94 | |||
3f75d60c5f | |||
aaf44db38a | |||
c950d7349a | |||
844253f2bc | |||
6b5e8ab1ff | |||
8815cde78f | |||
e825f0e658 | |||
d33210c594 | |||
19894dce1f | |||
aaecc8a9b4 | |||
4b52ab8c28 | |||
629e26b292 | |||
e01de36909 | |||
7146bfcc60 | |||
d5634d7418 | |||
a0530a8dc2 | |||
f9edff4813 | |||
b24c0ebe54 | |||
1c2234a9a2 | |||
f6656f1166 | |||
250c52b7d5 | |||
625ef1368c | |||
b109ce2de5 | |||
5a831f2c7c | |||
ece6ae98a0 | |||
5a669601da | |||
69441f7006 | |||
a44b0c1f49 | |||
92e703b68a | |||
274c711dc2 | |||
8178744f85 | |||
0e8db3440f | |||
2d24f5fc97 | |||
ca2939629f | |||
fb05647b7b | |||
7759e278e8 | |||
310ffb91da | |||
d83ce652e7 | |||
550e7a0bfb | |||
9c1ab833da | |||
fa4457a6f6 | |||
3bd66fb1c4 | |||
549810b4bb | |||
44de253040 | |||
d7bfd70fa9 | |||
8cd309e3a3 | |||
70d99a028d | |||
94871a4df8 | |||
6d556afa40 | |||
9552dd1373 | |||
71a3bb4dba | |||
ec066d6298 | |||
fd9a5f83fe | |||
64d2328618 | |||
c65204414d | |||
aea73acce5 | |||
62417e76f7 | |||
8b4b0d7dd1 | |||
044f1b85b7 | |||
1749a081de | |||
52c5e2dba7 | |||
8f35d050df | |||
875269f5a6 | |||
8d33ddc252 | |||
6b615cf141 | |||
c88be2b4e5 | |||
dcd6996c39 | |||
b729eb2729 | |||
d6a85ef4af | |||
d843c65f6f | |||
ea21cd5383 | |||
6c394c373d | |||
2461504888 | |||
eecc2f093f | |||
b55bfb45b7 | |||
8bc04b0940 | |||
725937bf61 | |||
1a5ae72d6e | |||
6787b0dcbe | |||
5c3b2074ba | |||
e2faa55c9f | |||
aba2633dc4 | |||
34636ea9f9 | |||
bcf659c5a8 | |||
e022bc90ff | |||
c9366d856f | |||
fc35b6bfc8 | |||
b73ffc061d | |||
b99a2f568e | |||
4048636696 | |||
bde70343b7 | |||
2ffa5f29b9 | |||
e3cbc4e808 | |||
df38680226 | |||
2067a228aa | |||
d2339044e6 | |||
559634fbfe | |||
37f3c49413 | |||
0ec1e75106 | |||
d9b1cbceff | |||
cfdbfca0a2 | |||
30b7a80c49 | |||
9da2638475 | |||
b0b881e22b | |||
08260a632b | |||
1035f5ba05 | |||
968823828a | |||
ced0aa97f8 | |||
07ab869388 | |||
0fda50b4e1 | |||
89eac6b025 | |||
363a7cda40 | |||
b7a0072db5 | |||
fbe36d50b7 | |||
02fae4d8e4 | |||
4aeb17ecef | |||
6bf2d6fdb1 | |||
f16508dae4 | |||
887ab8c959 | |||
78260381cf | |||
abbb322b5d | |||
9b2dc8587f | |||
f7e2651619 | |||
4b95b0bbe2 | |||
0d913eca4d | |||
e0d1919808 | |||
a435f0be49 | |||
68ddcd1ccc | |||
72961dadc9 | |||
5bf6901ce2 | |||
a381b06a0a | |||
2f50c6c1c3 | |||
c078a51ebf | |||
fd6c1309e3 | |||
92576f9496 | |||
d8da21b0ef | |||
c261c48931 | |||
3a6d2d1071 | |||
fa2eb27a1a | |||
b4345015c3 | |||
4aa8cc2df6 | |||
acc7c42112 | |||
17aa4f4bd6 | |||
93b40fae55 | |||
f8834501e7 | |||
4877c7ab12 | |||
12a1655d3f | |||
fffc51ca15 | |||
5a39d3ee23 | |||
78808c0f15 | |||
0c32333c75 | |||
e74b87d371 | |||
5a40c1886e | |||
f9d86c3cf0 | |||
330bdb2a2d | |||
ec8d4754e4 | |||
9c4eaa6cff | |||
d7e1cf9132 | |||
4ccdcb95c3 | |||
2166e166e8 | |||
f161ac2e79 | |||
2775cca3aa | |||
8931405ee9 | |||
c0ba4cefd5 | |||
1cabb74eb8 | |||
8484e2fc0c | |||
44e8d91603 | |||
e6ced56e1b | |||
349ed0e671 | |||
167670c86e | |||
0e04a40a76 | |||
65dcbcc4e3 | |||
65b61aa5a3 | |||
6a1b3976ed | |||
34c7adddff | |||
351f117d38 | |||
b73e9597c1 | |||
9a95980e4c | |||
b8539a7295 | |||
106accdcf5 | |||
2d3d13f360 | |||
be9a146440 | |||
2dc206dadb | |||
c276c8f42c | |||
47e7ab38dd | |||
19898d2c1c | |||
43e31ddf63 | |||
8976686286 | |||
af090e7940 | |||
82f4cf7cfb | |||
da85ecfeb2 | |||
0ed3207a31 | |||
ad4701060d | |||
7e16f1cb3f | |||
f4afbcaaa5 | |||
7f06e8b348 | |||
f6234f6db3 | |||
8e78731924 | |||
ae02320478 | |||
612c358d26 | |||
eec6741a2f | |||
214180491f | |||
e785fd6852 | |||
063e23358b | |||
5417bc1717 | |||
1ba412d1f0 | |||
bc4399f798 | |||
1d7f8eb86b | |||
bd9bb8d47e | |||
be0c1c4cd4 | |||
bb23d7e79d | |||
c3d4eb1ab8 | |||
59626b1d94 | |||
bae9c82ba8 | |||
c016b92db0 | |||
86ca904c9e | |||
a43ef4f0e3 | |||
57a02f9ffb | |||
0732a0ff91 | |||
ee7111d91d | |||
48a6c29fc9 | |||
7ff30c1ce8 | |||
e5398d73ec | |||
8047266f13 | |||
f38f9ce74e | |||
6518969031 | |||
72dce163e9 | |||
8e8e530181 | |||
8f408d1f46 | |||
474a31bdee | |||
7cede1d560 | |||
90af2d9f6e | |||
64ffd95aba | |||
7c724db67e | |||
316061e69b | |||
8bbeb8d7c8 | |||
4b772f0564 | |||
d08f9a2d0f | |||
3f5d011719 | |||
6460976a9c | |||
32e827d50a | |||
a4907ce111 | |||
2b4f1af63c | |||
9b2866e30c | |||
07944f6530 | |||
723e5d712c | |||
76e7651f7c | |||
b1641eba06 | |||
70f6781e56 | |||
0ce160c905 | |||
bdf0ca3006 | |||
518703b826 | |||
f5863f88ac | |||
3a2954b2cf | |||
2d5fc4c0cb | |||
799cf697d4 | |||
8843d2cfa6 | |||
43ba8e3774 | |||
844507ea9e | |||
3def574940 | |||
d85624b067 | |||
8c2c351222 | |||
56b54912b3 | |||
34028479e8 | |||
614e45ab63 | |||
1ea99bc622 | |||
267b858cbd | |||
7085f3a294 | |||
dabdf9ae34 | |||
f18fab2d67 | |||
9c9547a75e | |||
c114473368 | |||
21ec7b9526 | |||
07af8b2957 | |||
24a7d5ad56 | |||
d592536aca | |||
1d7fcbd6ad | |||
df6567ad1c | |||
4b0ef573bc | |||
59869fcdc3 | |||
0d716b0bb3 | |||
1bbc710897 | |||
8f5860af35 | |||
e3e11c7998 | |||
03b932d502 | |||
e77ccf3211 | |||
4e26666823 | |||
4e21123820 | |||
015c8fcd14 | |||
6fe36dbe8e | |||
d04ed1a6ab | |||
ecfba4720e | |||
5d42c3eb3f | |||
398f4559cf | |||
95899c2840 | |||
be94c6ebbf | |||
53f0f7df8c | |||
2918c48a3e | |||
cb70995f08 | |||
d4e9121ca6 | |||
fbcad6e611 | |||
b68048a2af | |||
dcc21a5544 | |||
d86f84583c | |||
2088a07ab5 | |||
ed81885af6 | |||
dfee57d411 | |||
61827e731a | |||
13fbd3d7f2 | |||
05c043c3ac | |||
c6766941a3 | |||
74b5c4fcc9 | |||
6d3e3f2c6e | |||
20ff7ed62b | |||
06c8217ab1 | |||
e16a58be08 | |||
09ab2d5f8e | |||
2a9eccc632 | |||
c70fbc331f | |||
76f7212672 | |||
35f9fec5a9 | |||
30adb67fed | |||
f0faf1fc02 | |||
92fd9c5b0d | |||
71e70884ce | |||
3011075f9c | |||
a99eb5d5f6 | |||
406de816cd | |||
9c8a2a61dd | |||
290bf5cf93 | |||
f501e6c073 | |||
2dc748be75 | |||
e953f1962e | |||
8c3d850f54 | |||
7db6d76eea | |||
ec753fdbd6 | |||
47b5ebc462 | |||
545b682035 | |||
3e4700edfc | |||
c0893eec5d | |||
a9d5fe74f3 | |||
8941f9f636 | |||
a375af1352 | |||
b1ff19ac20 | |||
6128a3d8c9 | |||
987a8f9d2f | |||
46768519e7 | |||
81a36cdf46 | |||
f8f4995ad9 | |||
5c224b4723 | |||
4fea576345 | |||
0a7b56a46f | |||
fa54c5beff | |||
2b84150c00 | |||
8a83b07ce7 | |||
c2ff3fce66 | |||
e65dcfa5b5 | |||
641f11767d | |||
d07069a001 | |||
22ff6cd7be | |||
a070956a58 | |||
75118c5a50 | |||
291e5488af | |||
473f6a5c85 | |||
7102d4e90b | |||
8f29277ded | |||
d39a2d5938 | |||
f2a7f6c95b | |||
abb704cfba | |||
ac53321f8f | |||
b9643bdfd8 | |||
9c25eab0c6 | |||
afed3fcbe9 | |||
a70683b76f | |||
c69048d935 | |||
30f06d97ce | |||
b5fdbe66af | |||
0eca6aa660 | |||
e12fceb406 | |||
ec780ff0fc | |||
4f47bed348 | |||
3803bec28e | |||
7e1c78b92b | |||
cf2d964b6e | |||
f9f219abe5 | |||
dfcef78db6 | |||
30c29f1a53 | |||
32f0585a3c | |||
06789a80a1 | |||
73dbd6c0d8 | |||
16953c8f98 | |||
80d7f7c9db | |||
b58121d9e6 | |||
090746abb4 | |||
a9364be3e3 | |||
20af9efc17 | |||
940f10bf60 | |||
7076c928a1 | |||
a45a514542 | |||
bc985dbed4 | |||
8a8de137d1 | |||
492bf96e02 | |||
8ac439d047 | |||
88169c111b | |||
67884791f4 | |||
4de4d00141 | |||
57a71a8ea5 | |||
f8906aaf63 | |||
87dc05d392 | |||
bbbe8930a7 | |||
8aaf9f1246 | |||
312c0b572f | |||
38852c29ed | |||
3d753f1927 | |||
e14357c295 | |||
4dfdb19636 | |||
ef59258eec | |||
5e5f0d84d1 | |||
cb24ebbfe2 | |||
80302ce179 | |||
88115b6ee8 | |||
89f64cd9f5 | |||
ad36c18124 | |||
e90992a7f6 | |||
5c8951a0a8 | |||
9e601d45ef | |||
ebc012ab14 | |||
7a50ac88ac | |||
01a53b0ed0 | |||
86fdde261d | |||
e89d633744 | |||
3f0c9102cd | |||
95c7c416cb | |||
d4e4672952 | |||
85c7fe14fd | |||
f318f830ce | |||
36d109fbb3 | |||
3e11fd9ee6 | |||
015a368bd1 | |||
b120e1da87 | |||
7c42064561 | |||
de50cbd10e | |||
33c820a140 | |||
7fce4e009d | |||
9b8ba57e68 | |||
e5064f0e0e | |||
62c011234e | |||
77f2f5c218 | |||
a048fec8a0 | |||
e1685ba706 | |||
2c1602f331 | |||
9cf5ee8fbc | |||
b71c488977 | |||
ef7dd954a5 | |||
cdb50c576d | |||
30f432390e | |||
edf97b3e1c | |||
c5c5e94b7b | |||
3e0bef10d7 | |||
9d67b34354 | |||
9684726ee5 | |||
12e3a57836 | |||
284d1f5dfe | |||
b7e6cbe8ca | |||
80921e2aea | |||
0255fa537f | |||
d02377a491 | |||
ad6a0e25d8 | |||
2518945cfc | |||
b720927061 | |||
85ed19f259 | |||
e31a22af11 | |||
153363a320 | |||
5858e12b1a | |||
3b9c5d6431 | |||
af780428d4 | |||
b2496618bf | |||
d5669d4cdb | |||
cb885254b2 | |||
9b9fe1329d | |||
59cb187041 | |||
ff091e03bf | |||
a70a0629c3 | |||
dc3b4bb675 | |||
d566780730 | |||
2dcde65fd4 | |||
733e570925 | |||
4d31ef0132 | |||
2380e02c7a | |||
4bded0453e | |||
4a6e02cd18 | |||
388b8e0236 | |||
67cfd6f83e | |||
6480a5d799 | |||
907c4c371b | |||
64656550eb | |||
26dae0eb8a | |||
f2cea94844 | |||
a1fed6df63 | |||
3386138fff | |||
563f58db1e | |||
72750c75f9 | |||
fe5d226640 | |||
8f6aab302d | |||
7dbc83ef1c | |||
4d1995ff2c | |||
760a2074e5 | |||
65c1263cbf | |||
23f7bbd403 | |||
baf9c2f977 | |||
f64a194f25 | |||
c1129adbf5 | |||
7c8deae99a | |||
e93d046b94 | |||
8af0c93774 | |||
0fbb32420f | |||
f08c9c58d6 | |||
12ca2b11b6 | |||
dc52db689c | |||
494333ddde | |||
c7dcbcc36c | |||
0ebd570de7 | |||
6755d959a1 | |||
85be0ce22b | |||
a36b1cdd61 | |||
65ac90edbf | |||
f8d0a80c2c | |||
2f11c58c62 | |||
2386906e33 | |||
c43e3200e9 | |||
833b6d3c1e | |||
4c15aa29ca | |||
a488d95ecb | |||
851c8e80a5 | |||
0dc976514f | |||
94fd3d558a | |||
30fd40caf0 | |||
50bd9f9a10 | |||
d8c915bc4e | |||
ba2ec39dd6 | |||
0d64f2f08f | |||
d27fe4a666 | |||
354d2b11d2 | |||
0ecc52ae22 | |||
cd36c7a221 | |||
8b44a73d4d | |||
365bc27e7d | |||
d8a7b966fd | |||
ba20eb9ae7 |
188 changed files with 12672 additions and 5872 deletions
62
.circleci/config.yml
Normal file
62
.circleci/config.yml
Normal file
|
@ -0,0 +1,62 @@
|
|||
version: 2.1
|
||||
|
||||
orbs:
|
||||
sdkman: joshdholtz/sdkman@0.2.0
|
||||
|
||||
defaults: &defaults
|
||||
working_directory: ~/repo
|
||||
environment:
|
||||
JVM_OPTS: -Xmx3200m
|
||||
TERM: dumb
|
||||
CI_NAME: "CircleCI"
|
||||
|
||||
commands:
|
||||
build_and_test:
|
||||
parameters:
|
||||
reports-dir:
|
||||
type: string
|
||||
default: "build/reports/test_results"
|
||||
steps:
|
||||
- checkout
|
||||
- sdkman/setup-sdkman
|
||||
- sdkman/sdkman-install:
|
||||
candidate: kotlin
|
||||
version: 2.1.10
|
||||
- run:
|
||||
name: Download dependencies
|
||||
command: ./bld download
|
||||
- run:
|
||||
name: Compile source
|
||||
command: ./bld compile
|
||||
- run:
|
||||
name: Run tests
|
||||
command: ./bld jacoco -reports-dir=<< parameters.reports-dir >>
|
||||
- store_test_results:
|
||||
path: << parameters.reports-dir >>
|
||||
- store_artifacts:
|
||||
path: build/reports/jacoco/test/html
|
||||
|
||||
jobs:
|
||||
bld_jdk17:
|
||||
<<: *defaults
|
||||
|
||||
docker:
|
||||
- image: cimg/openjdk:17.0
|
||||
|
||||
steps:
|
||||
- build_and_test
|
||||
|
||||
bld_jdk21:
|
||||
<<: *defaults
|
||||
|
||||
docker:
|
||||
- image: cimg/openjdk:21.0
|
||||
|
||||
steps:
|
||||
- build_and_test
|
||||
|
||||
workflows:
|
||||
bld:
|
||||
jobs:
|
||||
- bld_jdk17
|
||||
- bld_jdk21
|
|
@ -1,6 +0,0 @@
|
|||
build
|
||||
dist
|
||||
log4j.properties
|
||||
mobibot.properties
|
||||
mobibot.ser
|
||||
logs
|
2
.editorconfig
Normal file
2
.editorconfig
Normal file
|
@ -0,0 +1,2 @@
|
|||
[*]
|
||||
insert_final_newline = true
|
5
.gitattributes
vendored
Normal file
5
.gitattributes
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# batch files are specific to windows and always crlf
|
||||
*.bat eol=crlf
|
58
.github/workflows/bld.yml
vendored
Normal file
58
.github/workflows/bld.yml
vendored
Normal file
|
@ -0,0 +1,58 @@
|
|||
name: bld-ci
|
||||
|
||||
on: [push, pull_request, workflow_dispatch]
|
||||
|
||||
env:
|
||||
ALPHAVANTAGE_API_KEY: ${{ secrets.ALPHAVANTAGE_API_KEY }}
|
||||
CHATGPT_API_KEY: ${{ secrets.CHATGPT_API_KEY }}
|
||||
CI_NAME: "GitHub CI"
|
||||
COVERAGE_JDK: "21"
|
||||
COVERAGE_KOTLIN: "2.1.0"
|
||||
EXCHANGERATE_API_KEY: ${{ secrets.EXCHANGERATE_API_KEY }}
|
||||
KOTLIN_HOME: /usr/share/kotlinc
|
||||
MASTODON_ACCESS_TOKEN: ${{ secrets.MASTODON_ACCESS_TOKEN }}
|
||||
MASTODON_HANDLE: ${{ secrets.MASTODON_HANDLE }}
|
||||
MASTODON_INSTANCE: ${{ secrets.MASTODON_INSTANCE }}
|
||||
OWM_API_KEY: ${{ secrets.OWM_API_KEY }}
|
||||
PINBOARD_API_TOKEN: ${{ secrets.PINBOARD_API_TOKEN }}
|
||||
|
||||
jobs:
|
||||
build-bld-project:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
java-version: [17, 21, 24]
|
||||
kotlin-version: [1.9.25, 2.0.20, 2.1.20]
|
||||
|
||||
steps:
|
||||
- name: Checkout source repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK ${{ matrix.java-version }} with Kotlin ${{ matrix.kotlin-version }}
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: "zulu"
|
||||
java-version: ${{ matrix.java-version }}
|
||||
|
||||
- name: Download dependencies
|
||||
run: ./bld download
|
||||
|
||||
- name: Compile source
|
||||
run: ./bld compile
|
||||
|
||||
- name: Run tests
|
||||
run: ./bld jacoco
|
||||
|
||||
- name: Remove pom.xml
|
||||
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
|
||||
run: rm -rf pom.xml
|
||||
|
||||
- name: SonarCloud Scan
|
||||
uses: sonarsource/sonarcloud-github-action@master
|
||||
if: success() && matrix.java-version == env.COVERAGE_JDK && matrix.kotlin-version == env.COVERAGE_KOTLIN
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
63
.gitignore
vendored
Normal file
63
.gitignore
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
.gradle
|
||||
.DS_Store
|
||||
build
|
||||
lib/bld/**
|
||||
!lib/bld/bld-wrapper.jar
|
||||
!lib/bld/bld-wrapper.properties
|
||||
lib/compile/
|
||||
lib/runtime/
|
||||
lib/standalone/
|
||||
lib/test/
|
||||
|
||||
# IDEA ignores
|
||||
|
||||
# User-specific
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# SonarLint plugin
|
||||
.idea/sonarlint/
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
bin
|
||||
deploy
|
||||
local.properties
|
||||
logs
|
||||
mobibot.properties
|
||||
out
|
||||
/target/
|
24
.gitlab-ci.yml
Normal file
24
.gitlab-ci.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
image: fedora:latest
|
||||
|
||||
variables:
|
||||
CI_NAME: "GitLab CI"
|
||||
|
||||
stages:
|
||||
- test
|
||||
|
||||
before_script:
|
||||
- dnf -qy update && dnf -y install zip
|
||||
- curl -s "https://get.sdkman.io" | bash
|
||||
- echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config
|
||||
- echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
|
||||
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
- sdk install java
|
||||
- sdk install kotlin
|
||||
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- ./bld download
|
||||
- ./bld compile
|
||||
- ./bld test
|
30
.idea/app.iml
generated
Normal file
30
.idea/app.iml
generated
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<output url="file://$MODULE_DIR$/build/main" />
|
||||
<output-test url="file://$MODULE_DIR$/build/test" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" relativeOutputPath="resources" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library" scope="RUNTIME">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/src/main/resources/templates" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="library" name="compile" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="runtime" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="test" level="project" />
|
||||
</component>
|
||||
</module>
|
14
.idea/bld.iml
generated
Normal file
14
.idea/bld.iml
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<output url="file://$MODULE_DIR$/build/bld" />
|
||||
<output-test url="file://$MODULE_DIR$/build/bld" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$/src/bld">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/bld/java" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="bld" level="project" />
|
||||
</component>
|
||||
</module>
|
6
.idea/bld.xml
generated
Normal file
6
.idea/bld.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="BldConfiguration">
|
||||
<events />
|
||||
</component>
|
||||
</project>
|
6
.idea/copyright/BSD_3.xml
generated
Normal file
6
.idea/copyright/BSD_3.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
|||
<component name="CopyrightManager">
|
||||
<copyright>
|
||||
<option name="notice" value="&#36;file.fileName Copyright 2004-&#36;today.year Erik C. Thauvin (erik@thauvin.net) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of this project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." />
|
||||
<option name="myName" value="BSD-3" />
|
||||
</copyright>
|
||||
</component>
|
3
.idea/copyright/profiles_settings.xml
generated
Normal file
3
.idea/copyright/profiles_settings.xml
generated
Normal file
|
@ -0,0 +1,3 @@
|
|||
<component name="CopyrightManager">
|
||||
<settings default="BSD-3" />
|
||||
</component>
|
8
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
8
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
|
@ -0,0 +1,8 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="JavadocDeclaration" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ADDITIONAL_TAGS" value="created" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
204
.idea/intellij-javadocs-4.0.1.xml
generated
Normal file
204
.idea/intellij-javadocs-4.0.1.xml
generated
Normal file
|
@ -0,0 +1,204 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="JavaDocConfiguration">
|
||||
<GENERAL>
|
||||
<MODE>UPDATE</MODE>
|
||||
<OVERRIDDEN_METHODS>false</OVERRIDDEN_METHODS>
|
||||
<SPLITTED_CLASS_NAME>true</SPLITTED_CLASS_NAME>
|
||||
<LEVELS>
|
||||
<LEVEL>FIELD</LEVEL>
|
||||
<LEVEL>METHOD</LEVEL>
|
||||
<LEVEL>TYPE</LEVEL>
|
||||
</LEVELS>
|
||||
<VISIBILITIES>
|
||||
<VISIBILITY>PROTECTED</VISIBILITY>
|
||||
<VISIBILITY>DEFAULT</VISIBILITY>
|
||||
<VISIBILITY>PUBLIC</VISIBILITY>
|
||||
</VISIBILITIES>
|
||||
</GENERAL>
|
||||
<TEMPLATES>
|
||||
<CLASSES>
|
||||
<CLASS>
|
||||
<KEY>^.*(public|protected|private)*.+interface\s+\w+.*</KEY>
|
||||
<VALUE>/**\n
|
||||
* The interface ${name}.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</CLASS>
|
||||
<CLASS>
|
||||
<KEY>^.*(public|protected|private)*.+enum\s+\w+.*</KEY>
|
||||
<VALUE>/**\n
|
||||
* The enum ${name}.\n
|
||||
*/</VALUE>
|
||||
</CLASS>
|
||||
<CLASS>
|
||||
<KEY>^.*(public|protected|private)*.+class\s+\w+.*</KEY>
|
||||
<VALUE>/**\n
|
||||
* The type ${name}.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</CLASS>
|
||||
<CLASS>
|
||||
<KEY>.+</KEY>
|
||||
<VALUE>/**\n
|
||||
* The type ${name}.\n
|
||||
*/</VALUE>
|
||||
</CLASS>
|
||||
</CLASSES>
|
||||
<CONSTRUCTORS>
|
||||
<CONSTRUCTOR>
|
||||
<KEY>.+</KEY>
|
||||
<VALUE>/**\n
|
||||
* Instantiates a new ${name}.\n
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.parameterList.parameters as parameter>
|
||||
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||
</#list>
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</CONSTRUCTOR>
|
||||
</CONSTRUCTORS>
|
||||
<METHODS>
|
||||
<METHOD>
|
||||
<KEY>^.*(public|protected|private)*\s*.*(\w(\s*<.+>)*)+\s+get\w+\s*\(.*\).+</KEY>
|
||||
<VALUE>/**\n
|
||||
* Gets ${partName}.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.parameterList.parameters as parameter>
|
||||
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||
</#list>
|
||||
<#if isNotVoid>
|
||||
*\n
|
||||
* @return the ${partName}\n
|
||||
</#if>
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</METHOD>
|
||||
<METHOD>
|
||||
<KEY>^.*(public|protected|private)*\s*.*(void|\w(\s*<.+>)*)+\s+set\w+\s*\(.*\).+</KEY>
|
||||
<VALUE>/**\n
|
||||
* Sets ${partName}.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.parameterList.parameters as parameter>
|
||||
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||
</#list>
|
||||
<#if isNotVoid>
|
||||
*\n
|
||||
* @return the ${partName}\n
|
||||
</#if>
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</METHOD>
|
||||
<METHOD>
|
||||
<KEY>^.*((public\s+static)|(static\s+public))\s+void\s+main\s*\(\s*String\s*(\[\s*\]|\.\.\.)\s+\w+\s*\).+</KEY>
|
||||
<VALUE>/**\n
|
||||
* The entry point of application.\n
|
||||
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
* @param ${element.parameterList.parameters[0].name} the input arguments\n
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</METHOD>
|
||||
<METHOD>
|
||||
<KEY>.+</KEY>
|
||||
<VALUE>/**\n
|
||||
* ${name}<#if isNotVoid> ${return}</#if>.\n
|
||||
<#if element.typeParameters?has_content> * \n
|
||||
</#if>
|
||||
<#list element.typeParameters as typeParameter>
|
||||
* @param <${typeParameter.name}> the type parameter\n
|
||||
</#list>
|
||||
<#if element.parameterList.parameters?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.parameterList.parameters as parameter>
|
||||
* @param ${parameter.name} the ${paramNames[parameter.name]}\n
|
||||
</#list>
|
||||
<#if isNotVoid>
|
||||
*\n
|
||||
* @return the ${return}\n
|
||||
</#if>
|
||||
<#if element.throwsList.referenceElements?has_content>
|
||||
*\n
|
||||
</#if>
|
||||
<#list element.throwsList.referenceElements as exception>
|
||||
* @throws ${exception.referenceName} the ${exceptionNames[exception.referenceName]}\n
|
||||
</#list>
|
||||
*/</VALUE>
|
||||
</METHOD>
|
||||
</METHODS>
|
||||
<FIELDS>
|
||||
<FIELD>
|
||||
<KEY>^.*(public|protected|private)*.+static.*(\w\s\w)+.+</KEY>
|
||||
<VALUE>/**\n
|
||||
* The constant ${element.getName()}.\n
|
||||
*/</VALUE>
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<KEY>^.*(public|protected|private)*.*(\w\s\w)+.+</KEY>
|
||||
<VALUE>/**\n
|
||||
<#if element.parent.isInterface()>
|
||||
* The constant ${element.getName()}.\n
|
||||
<#else>
|
||||
* The ${name}.\n
|
||||
</#if> */</VALUE>
|
||||
</FIELD>
|
||||
<FIELD>
|
||||
<KEY>.+</KEY>
|
||||
<VALUE>/**\n
|
||||
<#if element.parent.isEnum()>
|
||||
*${name} ${typeName}.\n
|
||||
<#else>
|
||||
* The ${name}.\n
|
||||
</#if>*/</VALUE>
|
||||
</FIELD>
|
||||
</FIELDS>
|
||||
</TEMPLATES>
|
||||
</component>
|
||||
</project>
|
16
.idea/kotlinc.xml
generated
Normal file
16
.idea/kotlinc.xml
generated
Normal file
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Kotlin2JsCompilerArguments">
|
||||
<option name="moduleKind" value="plain" />
|
||||
</component>
|
||||
<component name="Kotlin2JvmCompilerArguments">
|
||||
<option name="jvmTarget" value="17" />
|
||||
</component>
|
||||
<component name="KotlinCommonCompilerArguments">
|
||||
<option name="apiVersion" value="2.0" />
|
||||
<option name="languageVersion" value="2.0" />
|
||||
</component>
|
||||
<component name="KotlinJpsPluginSettings">
|
||||
<option name="version" value="2.1.0" />
|
||||
</component>
|
||||
</project>
|
18
.idea/libraries/bld.xml
generated
Normal file
18
.idea/libraries/bld.xml
generated
Normal file
|
@ -0,0 +1,18 @@
|
|||
<component name="libraryTable">
|
||||
<library name="bld">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/bld" />
|
||||
<root url="jar://$USER_HOME$/.bld/dist/bld-2.2.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
<excluded>
|
||||
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />
|
||||
</excluded>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/bld" recursive="false" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
13
.idea/libraries/compile.xml
generated
Normal file
13
.idea/libraries/compile.xml
generated
Normal file
|
@ -0,0 +1,13 @@
|
|||
<component name="libraryTable">
|
||||
<library name="compile">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/compile" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
14
.idea/libraries/runtime.xml
generated
Normal file
14
.idea/libraries/runtime.xml
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
<component name="libraryTable">
|
||||
<library name="runtime">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||
<root url="file://$PROJECT_DIR$/src/main/resources" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/runtime" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
14
.idea/libraries/test.xml
generated
Normal file
14
.idea/libraries/test.xml
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
<component name="libraryTable">
|
||||
<library name="test">
|
||||
<CLASSES>
|
||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||
<root url="file://$PROJECT_DIR$/src/test/resources" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="file://$PROJECT_DIR$/lib/test" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
|
||||
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
|
||||
</library>
|
||||
</component>
|
14
.idea/misc.xml
generated
Normal file
14
.idea/misc.xml
generated
Normal file
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<pattern value="net.thauvin.erik.MobibotBuild" method="deploy" />
|
||||
<pattern value="net.thauvin.erik.MobibotBuild" method="jacoco" />
|
||||
<pattern value="net.thauvin.erik.MobibotBuild" />
|
||||
<pattern value="net.thauvin.erik.MobibotBuild" method="detekt" />
|
||||
<pattern value="net.thauvin.erik.MobibotBuild" method="detektBaseline" />
|
||||
<pattern value="net.thauvin.erik.MobibotBuild" method="rootPom" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build" />
|
||||
</component>
|
||||
</project>
|
9
.idea/modules.xml
generated
Normal file
9
.idea/modules.xml
generated
Normal file
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/app.iml" filepath="$PROJECT_DIR$/.idea/app.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/bld.iml" filepath="$PROJECT_DIR$/.idea/bld.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
9
.idea/runConfigurations/Run Tests.xml
generated
Normal file
9
.idea/runConfigurations/Run Tests.xml
generated
Normal file
|
@ -0,0 +1,9 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run Tests" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="net.thauvin.erik.MobibotTest" />
|
||||
<module name="app" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
3
.vscode/settings.json
vendored
Normal file
3
.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"java.compile.nullAnalysis.mode": "automatic"
|
||||
}
|
26
LICENSE.txt
Normal file
26
LICENSE.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
33
README.md
Normal file
33
README.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# mobibot
|
||||
|
||||
[](https://opensource.org/licenses/BSD-3-Clause)
|
||||
[](https://kotlinlang.org)
|
||||
[](https://rife2.com/bld)
|
||||
[](https://sonarcloud.io/summary/new_code?id=ethauvin_mobibot)
|
||||
[](https://github.com/ethauvin/mobibot/actions/workflows/bld.yml)
|
||||
[](https://circleci.com/gh/ethauvin/mobibot/tree/master)
|
||||
|
||||
Some very basic instructions:
|
||||
|
||||
```sh
|
||||
# clone with git or download the ZIP
|
||||
git clone https://github.com/ethauvin/mobibot.git
|
||||
|
||||
cd mobibot
|
||||
|
||||
# build JAR and deploy
|
||||
./bld jar deploy
|
||||
|
||||
cd deploy
|
||||
|
||||
# configure the properties
|
||||
vi *.properties *.xml
|
||||
|
||||
# help
|
||||
java -jar mobibot.jar -h
|
||||
|
||||
# launch
|
||||
/usr/bin/nohup java -jar mobibot.jar &
|
||||
```
|
||||
|
||||
For a listing of features, see the [website](https://mobitopia.org/mobibot/).
|
20
bitbucket-pipelines.yml
Normal file
20
bitbucket-pipelines.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
image: ubuntu:latest
|
||||
|
||||
pipelines:
|
||||
default:
|
||||
- step:
|
||||
name: Test with bld
|
||||
script:
|
||||
# Install latest Java & Kotlin via SDKMAN!
|
||||
- apt-get update -qq && apt-get install -y curl zip
|
||||
- curl -s "https://get.sdkman.io" | bash
|
||||
- echo sdkman_auto_answer=true > $HOME/.sdkman/etc/config
|
||||
- echo sdkman_auto_selfupdate=true >> $HOME/.sdkman/etc/config
|
||||
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
- sdk install java
|
||||
- sdk install kotlin
|
||||
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
# Download, compile and test with bld
|
||||
- ./bld download
|
||||
- ./bld compile
|
||||
- ./bld test
|
2
bld
Executable file
2
bld
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/usr/bin/env sh
|
||||
java -jar "$(dirname "$0")/lib/bld/bld-wrapper.jar" "$0" --build net.thauvin.erik.MobibotBuild "$@"
|
4
bld.bat
Normal file
4
bld.bat
Normal file
|
@ -0,0 +1,4 @@
|
|||
@echo off
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
java -jar "%DIRNAME%/lib/bld/bld-wrapper.jar" "%0" --build net.thauvin.erik.MobibotBuild %*
|
|
@ -1 +0,0 @@
|
|||
main.class=net.thauvin.erik.mobibot.Mobibot
|
49
build.xml
49
build.xml
|
@ -1,49 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="mobibot" default="build" basedir=".">
|
||||
<property file="${basedir}/build.properties" />
|
||||
<property name="path.classes" value="build" />
|
||||
<property name="path.src" value="src" />
|
||||
<property name="path.dist" value="dist" />
|
||||
<property name="path.lib" value="lib" />
|
||||
<path id="path.source">
|
||||
<pathelement location="${path.src}" />
|
||||
</path>
|
||||
<path id="path.class">
|
||||
<fileset dir="${path.lib}">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
<target name="init">
|
||||
<tstamp />
|
||||
<mkdir dir="${path.classes}"/>
|
||||
<mkdir dir="${path.dist}"/>
|
||||
</target>
|
||||
<target name="compile" depends="init" description="Compiles sources">
|
||||
<mkdir dir="${path.classes}" />
|
||||
<javac sourcepathref="path.source" classpathref="path.class" destdir="${path.classes}" debug="off" deprecation="on">
|
||||
<src refid="path.source" />
|
||||
</javac>
|
||||
</target>
|
||||
<target name="build" depends="compile" description="Rebuilds project" />
|
||||
<target name="jar" depends="compile" description="Builds the JAR">
|
||||
<copy todir="${path.classes}">
|
||||
<fileset dir="${path.src}" includes="*.properties" />
|
||||
</copy>
|
||||
<pathconvert targetos="unix" pathsep=" " property="mf.lib" refid="path.class">
|
||||
<map from="${basedir}" to="."/>
|
||||
</pathconvert>
|
||||
<jar destfile="${basedir}/${path.dist}/${ant.project.name}.jar" basedir="${path.classes}" excludes="**/.dependency-info/**">
|
||||
<manifest>
|
||||
<attribute name="Main-Class" value="${main.class}"/>
|
||||
<attribute name="Class-Path" value=". ${mf.lib}"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
<target name="clean" depends="init" description="Removes classses">
|
||||
<delete quiet="true" includeEmptyDirs="true">
|
||||
<fileset dir="${path.classes}" includes="*,*/**"/>
|
||||
<fileset dir="${path.dist}" includes="*,*/**"/>
|
||||
</delete>
|
||||
</target>
|
||||
</project>
|
||||
|
112
config/detekt/baseline.xml
Normal file
112
config/detekt/baseline.xml
Normal file
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" ?>
|
||||
<SmellBaseline>
|
||||
<ManuallySuppressedIssues></ManuallySuppressedIssues>
|
||||
<CurrentIssues>
|
||||
<ID>CyclomaticComplexMethod:FeedsManager.kt$FeedsManager.Companion$@JvmStatic fun saveFeed(entries: Entries, currentFile: String = CURRENT_XML)</ID>
|
||||
<ID>CyclomaticComplexMethod:Weather2.kt$Weather2.Companion$@JvmStatic @Throws(ModuleException::class) fun getWeather(query: String, apiKey: String?): List<Message></ID>
|
||||
<ID>LongMethod:FeedsManager.kt$FeedsManager.Companion$@JvmStatic fun saveFeed(entries: Entries, currentFile: String = CURRENT_XML)</ID>
|
||||
<ID>LongMethod:Mobibot.kt$Mobibot.Companion$@JvmStatic @Throws(Exception::class) fun main(args: Array<String>)</ID>
|
||||
<ID>LongMethod:StockQuote.kt$StockQuote.Companion$@JvmStatic @Throws(ModuleException::class) fun getQuote(symbol: String, apiKey: String?): List<Message></ID>
|
||||
<ID>LongMethod:Weather2.kt$Weather2.Companion$@JvmStatic @Throws(ModuleException::class) fun getWeather(query: String, apiKey: String?): List<Message></ID>
|
||||
<ID>LongParameterList:Comment.kt$Comment$( channel: String, cmd: String, entry: EntryLink, entryIndex: Int, commentIndex: Int, event: GenericMessageEvent )</ID>
|
||||
<ID>LongParameterList:EntryLink.kt$EntryLink$( // Link's comments val comments: MutableList<EntryComment> = mutableListOf(), // Tags/categories val tags: MutableList<SyndCategory> = mutableListOf(), // Channel var channel: String, // Creation date var date: Date = Calendar.getInstance().time, // Link's URL var link: String, // Author's login var login: String = "", // Author's nickname var nick: String, // Link's title var title: String )</ID>
|
||||
<ID>MagicNumber:ChatGpt.kt$ChatGpt.Companion$200</ID>
|
||||
<ID>MagicNumber:ChatGpt.kt$ChatGpt.Companion$429</ID>
|
||||
<ID>MagicNumber:Comment.kt$Comment$3</ID>
|
||||
<ID>MagicNumber:CryptoPrices.kt$CryptoPrices$10</ID>
|
||||
<ID>MagicNumber:CurrencyConverter.kt$CurrencyConverter$11</ID>
|
||||
<ID>MagicNumber:CurrencyConverter.kt$CurrencyConverter.Companion$3</ID>
|
||||
<ID>MagicNumber:CurrencyConverter.kt$CurrencyConverter.Companion$4</ID>
|
||||
<ID>MagicNumber:Cycle.kt$Cycle$10</ID>
|
||||
<ID>MagicNumber:Cycle.kt$Cycle$1000L</ID>
|
||||
<ID>MagicNumber:Ignore.kt$Ignore$8</ID>
|
||||
<ID>MagicNumber:Info.kt$Info.Companion$30</ID>
|
||||
<ID>MagicNumber:Info.kt$Info.Companion$365</ID>
|
||||
<ID>MagicNumber:Info.kt$Info.Companion$7</ID>
|
||||
<ID>MagicNumber:Mastodon.kt$Mastodon.Companion$200</ID>
|
||||
<ID>MagicNumber:Mobibot.kt$Mobibot$8</ID>
|
||||
<ID>MagicNumber:Modules.kt$Modules$7</ID>
|
||||
<ID>MagicNumber:Seen.kt$Seen$7</ID>
|
||||
<ID>MagicNumber:SocialManager.kt$SocialManager$1000L</ID>
|
||||
<ID>MagicNumber:SocialManager.kt$SocialManager$60L</ID>
|
||||
<ID>MagicNumber:StockQuote.kt$StockQuote.Companion$10</ID>
|
||||
<ID>MagicNumber:Tell.kt$Tell$50</ID>
|
||||
<ID>MagicNumber:Tell.kt$Tell$7</ID>
|
||||
<ID>MagicNumber:Users.kt$Users$8</ID>
|
||||
<ID>MagicNumber:Utils.kt$Utils$200</ID>
|
||||
<ID>MagicNumber:Utils.kt$Utils$399</ID>
|
||||
<ID>MagicNumber:Weather2.kt$Weather2.Companion$1.60934</ID>
|
||||
<ID>MagicNumber:Weather2.kt$Weather2.Companion$32</ID>
|
||||
<ID>MagicNumber:Weather2.kt$Weather2.Companion$404</ID>
|
||||
<ID>MagicNumber:Weather2.kt$Weather2.Companion$5</ID>
|
||||
<ID>MagicNumber:Weather2.kt$Weather2.Companion$9</ID>
|
||||
<ID>MagicNumber:WorldTime.kt$WorldTime$14</ID>
|
||||
<ID>MagicNumber:WorldTime.kt$WorldTime$4</ID>
|
||||
<ID>MagicNumber:WorldTime.kt$WorldTime.Companion$3600</ID>
|
||||
<ID>MagicNumber:WorldTime.kt$WorldTime.Companion$60</ID>
|
||||
<ID>MagicNumber:WorldTime.kt$WorldTime.Companion$86.4</ID>
|
||||
<ID>NestedBlockDepth:Addons.kt$Addons$fun add(command: AbstractCommand): Boolean</ID>
|
||||
<ID>NestedBlockDepth:Addons.kt$Addons$fun add(module: AbstractModule): Boolean</ID>
|
||||
<ID>NestedBlockDepth:ChatGpt.kt$ChatGpt.Companion$@JvmStatic @Throws(ModuleException::class) fun chat(query: String, apiKey: String?, maxTokens: Int): String</ID>
|
||||
<ID>NestedBlockDepth:Comment.kt$Comment$override fun commandResponse(channel: String, args: String, event: GenericMessageEvent)</ID>
|
||||
<ID>NestedBlockDepth:CurrencyConverter.kt$CurrencyConverter.Companion$@JvmStatic @Throws(ModuleException::class) fun loadSymbols(apiKey: String?)</ID>
|
||||
<ID>NestedBlockDepth:CurrencyConverter.kt$CurrencyConverter.Companion$@JvmStatic fun convertCurrency(apiKey: String?, query: String): Message</ID>
|
||||
<ID>NestedBlockDepth:EntryLink.kt$EntryLink$private fun setTags(tags: List<String?>)</ID>
|
||||
<ID>NestedBlockDepth:FeedsManager.kt$FeedsManager.Companion$@JvmStatic @Throws(IOException::class, FeedException::class) fun loadFeed(entries: Entries, currentFile: String = CURRENT_XML): String</ID>
|
||||
<ID>NestedBlockDepth:FeedsManager.kt$FeedsManager.Companion$@JvmStatic fun saveFeed(entries: Entries, currentFile: String = CURRENT_XML)</ID>
|
||||
<ID>NestedBlockDepth:GoogleSearch.kt$GoogleSearch$override fun commandResponse(channel: String, cmd: String, args: String, event: GenericMessageEvent)</ID>
|
||||
<ID>NestedBlockDepth:GoogleSearch.kt$GoogleSearch.Companion$@JvmStatic @Throws(ModuleException::class) fun searchGoogle( query: String, apiKey: String?, cseKey: String?, quotaUser: String = ReleaseInfo.PROJECT ): List<Message></ID>
|
||||
<ID>NestedBlockDepth:LinksManager.kt$LinksManager$override fun commandResponse(channel: String, args: String, event: GenericMessageEvent)</ID>
|
||||
<ID>NestedBlockDepth:Lookup.kt$Lookup$override fun commandResponse(channel: String, cmd: String, args: String, event: GenericMessageEvent)</ID>
|
||||
<ID>NestedBlockDepth:Mastodon.kt$Mastodon.Companion$@JvmStatic @Throws(ModuleException::class) fun toot(apiKey: String?, instance: String?, handle: String?, message: String, isDm: Boolean): String</ID>
|
||||
<ID>NestedBlockDepth:Posting.kt$Posting$override fun commandResponse(channel: String, args: String, event: GenericMessageEvent)</ID>
|
||||
<ID>NestedBlockDepth:Seen.kt$Seen$override fun commandResponse(channel: String, args: String, event: GenericMessageEvent)</ID>
|
||||
<ID>NestedBlockDepth:StockQuote.kt$StockQuote.Companion$@JvmStatic @Throws(ModuleException::class) fun getQuote(symbol: String, apiKey: String?): List<Message></ID>
|
||||
<ID>NestedBlockDepth:Tell.kt$Tell$fun send(event: GenericUserEvent)</ID>
|
||||
<ID>NestedBlockDepth:Utils.kt$Utils$@JvmStatic fun loadSerialData(file: String, default: Any, logger: Logger, description: String): Any</ID>
|
||||
<ID>NestedBlockDepth:Utils.kt$Utils$@JvmStatic fun saveSerialData(file: String, data: Any, logger: Logger, description: String)</ID>
|
||||
<ID>NestedBlockDepth:Weather2.kt$Weather2$override fun commandResponse(channel: String, cmd: String, args: String, event: GenericMessageEvent)</ID>
|
||||
<ID>NestedBlockDepth:Weather2.kt$Weather2.Companion$@JvmStatic @Throws(ModuleException::class) fun getWeather(query: String, apiKey: String?): List<Message></ID>
|
||||
<ID>ReturnCount:Addons.kt$Addons$fun exec(channel: String, cmd: String, args: String, event: GenericMessageEvent): Boolean</ID>
|
||||
<ID>ReturnCount:Addons.kt$Addons$fun help(channel: String, topic: String, event: GenericMessageEvent): Boolean</ID>
|
||||
<ID>ReturnCount:ExceptionSanitizer.kt$ExceptionSanitizer$fun ModuleException.sanitize(vararg sanitize: String): ModuleException</ID>
|
||||
<ID>ReturnCount:Seen.kt$Seen$override fun commandResponse(channel: String, args: String, event: GenericMessageEvent)</ID>
|
||||
<ID>ThrowsCount:ChatGpt.kt$ChatGpt.Companion$@JvmStatic @Throws(ModuleException::class) fun chat(query: String, apiKey: String?, maxTokens: Int): String</ID>
|
||||
<ID>ThrowsCount:GoogleSearch.kt$GoogleSearch.Companion$@JvmStatic @Throws(ModuleException::class) fun searchGoogle( query: String, apiKey: String?, cseKey: String?, quotaUser: String = ReleaseInfo.PROJECT ): List<Message></ID>
|
||||
<ID>ThrowsCount:Joke.kt$Joke.Companion$@JvmStatic @Throws(ModuleException::class) fun randomJoke(): List<Message></ID>
|
||||
<ID>ThrowsCount:Mastodon.kt$Mastodon.Companion$@JvmStatic @Throws(ModuleException::class) fun toot(apiKey: String?, instance: String?, handle: String?, message: String, isDm: Boolean): String</ID>
|
||||
<ID>ThrowsCount:StockQuote.kt$StockQuote.Companion$@JvmStatic @Throws(ModuleException::class) fun getQuote(symbol: String, apiKey: String?): List<Message></ID>
|
||||
<ID>ThrowsCount:StockQuote.kt$StockQuote.Companion$@Throws(ModuleException::class) private fun getJsonResponse(response: String, debugMessage: String): JSONObject</ID>
|
||||
<ID>ThrowsCount:Weather2.kt$Weather2.Companion$@JvmStatic @Throws(ModuleException::class) fun getWeather(query: String, apiKey: String?): List<Message></ID>
|
||||
<ID>ThrowsCount:WolframAlpha.kt$WolframAlpha.Companion$@JvmStatic @Throws(ModuleException::class) fun queryWolfram(query: String, units: String = IMPERIAL, appId: String?): String</ID>
|
||||
<ID>TooGenericExceptionCaught:ChatGpt2.kt$ChatGpt2.Companion$e: Exception</ID>
|
||||
<ID>TooGenericExceptionCaught:Gemini.kt$Gemini.Companion$e: Exception</ID>
|
||||
<ID>TooGenericExceptionCaught:Gemini2.kt$Gemini2.Companion$e: Exception</ID>
|
||||
<ID>TooGenericExceptionCaught:StockQuote.kt$StockQuote.Companion$e: NullPointerException</ID>
|
||||
<ID>TooGenericExceptionCaught:Weather2.kt$Weather2.Companion$e: NullPointerException</ID>
|
||||
<ID>TooManyFunctions:EntryLink.kt$EntryLink : Serializable</ID>
|
||||
<ID>TooManyFunctions:Mobibot.kt$Mobibot : ListenerAdapter</ID>
|
||||
<ID>TooManyFunctions:Tell.kt$Tell : AbstractCommand</ID>
|
||||
<ID>UtilityClassWithPublicConstructor:LocalProperties.kt$LocalProperties</ID>
|
||||
<ID>WildcardImport:AddonsTest.kt$import net.thauvin.erik.mobibot.modules.*</ID>
|
||||
<ID>WildcardImport:EntryLinkTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:FeedMgrTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:FeedReaderTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:FeedsManager.kt$import com.rometools.rome.feed.synd.*</ID>
|
||||
<ID>WildcardImport:Gemini2Test.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:GeminiTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:GoogleSearchTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:JokeTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:Mobibot.kt$import java.io.*</ID>
|
||||
<ID>WildcardImport:Mobibot.kt$import net.thauvin.erik.mobibot.commands.*</ID>
|
||||
<ID>WildcardImport:Mobibot.kt$import net.thauvin.erik.mobibot.commands.links.*</ID>
|
||||
<ID>WildcardImport:Mobibot.kt$import net.thauvin.erik.mobibot.modules.*</ID>
|
||||
<ID>WildcardImport:Mobibot.kt$import org.pircbotx.hooks.events.*</ID>
|
||||
<ID>WildcardImport:ModuleExceptionTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:SeenTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:StockQuoteTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:TellMessagesMgrTest.kt$import assertk.assertions.*</ID>
|
||||
<ID>WildcardImport:Utils.kt$import java.io.*</ID>
|
||||
<ID>WildcardImport:Weather2Test.kt$import assertk.assertions.*</ID>
|
||||
</CurrentIssues>
|
||||
</SmellBaseline>
|
11
deploy.fish
Executable file
11
deploy.fish
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
./bld clean jar deploy
|
||||
if test $status -eq 0
|
||||
echo "cd /home/mobibot/mobitopia/mobibot
|
||||
lcd deploy
|
||||
put *.jar
|
||||
cd lib
|
||||
rm *.jar
|
||||
put lib/*.jar" | sftp nix4
|
||||
end
|
BIN
lib/EXML.jar
BIN
lib/EXML.jar
Binary file not shown.
Binary file not shown.
BIN
lib/bld/bld-wrapper.jar
Normal file
BIN
lib/bld/bld-wrapper.jar
Normal file
Binary file not shown.
10
lib/bld/bld-wrapper.properties
Normal file
10
lib/bld/bld-wrapper.properties
Normal file
|
@ -0,0 +1,10 @@
|
|||
bld.downloadExtensionJavadoc=false
|
||||
bld.downloadExtensionSources=true
|
||||
bld.downloadLocation=
|
||||
bld.extension-detekt=com.uwyn.rife2:bld-detekt:0.9.10-SNAPSHOT
|
||||
bld.extension-gv=com.uwyn.rife2:bld-generated-version:1.0.1
|
||||
bld.extension-jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.10
|
||||
bld.extension-kotlin=com.uwyn.rife2:bld-kotlin:1.1.0-SNAPSHOT
|
||||
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||
bld.sourceDirectories=
|
||||
bld.version=2.2.1
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/fetchrss.jar
BIN
lib/fetchrss.jar
Binary file not shown.
BIN
lib/google.jar
BIN
lib/google.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/jdom.jar
BIN
lib/jdom.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
lib/pircbot.jar
BIN
lib/pircbot.jar
Binary file not shown.
BIN
lib/rsslibj.jar
BIN
lib/rsslibj.jar
Binary file not shown.
201
licenses/Apache License.txt
Normal file
201
licenses/Apache License.txt
Normal file
|
@ -0,0 +1,201 @@
|
|||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
|
@ -1,56 +0,0 @@
|
|||
/*
|
||||
* ====================================================================
|
||||
*
|
||||
* The Apache Software License, Version 1.1
|
||||
*
|
||||
* Copyright (c) 1999-2001 The Apache Software Foundation. All rights
|
||||
* reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if
|
||||
* any, must include the following acknowlegement:
|
||||
* "This product includes software developed by the
|
||||
* Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowlegement may appear in the software itself,
|
||||
* if and wherever such third-party acknowlegements normally appear.
|
||||
*
|
||||
* 4. The names "The Jakarta Project", "Commons", and "Apache Software
|
||||
* Foundation" must not be used to endorse or promote products derived
|
||||
* from this software without prior written permission. For written
|
||||
* permission, please contact apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache"
|
||||
* nor may "Apache" appear in their names without prior written
|
||||
* permission of the Apache Group.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
||||
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
||||
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
* ====================================================================
|
||||
*
|
||||
* This software consists of voluntary contributions made by many
|
||||
* individuals on behalf of the Apache Software Foundation. For more
|
||||
* information on the Apache Software Foundation, please see
|
||||
* <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
|
@ -1,57 +0,0 @@
|
|||
TERMS AND CONDITIONS FOR ELECTRIC XML
|
||||
Please read this license agreement carefully. Your use of Electric XML or any
|
||||
related documentation indicates your acceptance of the following terms and
|
||||
conditions. If you do not agree to these terms and conditions, you may not
|
||||
install or use Electric XML. The term Electric XML refers to both the basic
|
||||
Electric XML software and Electric XML+.
|
||||
1. Ownership and License. Electric XML is owned by The Mind Electric and is
|
||||
copyrighted and licensed, not sold. The Mind Electric grants you a
|
||||
non-exclusive, non-transferable license to use, modify and distribute Electric
|
||||
XML in both binary and source form as long as all of the following conditions
|
||||
are met:
|
||||
You are not bundling Electric XML or a derivative of it as part of a software
|
||||
development environment such as JBuilder, WebGain or VisualAge. Note that this
|
||||
restriction is targeted at IDE vendors, and does not prevent developers from
|
||||
loading Electric XML into an IDE and using it during everyday development.
|
||||
You are not integrating Electric XML or a derivative of it into a distributed
|
||||
computing infrastructure or database platform such as WebLogic, Apache SOAP,
|
||||
WebSphere, Oracle application server, or HP e-speak. Note that this
|
||||
restriction is targeted at software infrastructure vendors, and does not
|
||||
prevent developers from using and bundling Electric XML with applications that
|
||||
run on these platforms.
|
||||
You are not integrating Electric XML or a derivative of it into an alternative
|
||||
to Electric XML such as Xerces or JDOM.
|
||||
You must not remove any of the copyright information from the Electric XML
|
||||
source code or documentation.
|
||||
If you cannot meet all of these conditions, please contact us to arrange a
|
||||
special custom license.
|
||||
2. Term and Termination
|
||||
This Agreement is effective until terminated. You may terminate this Agreement
|
||||
at any time by destroying all copies of Electric XML. This Agreement will
|
||||
terminate immediately without notice from The Mind Electric if you fail to
|
||||
comply with any provision of this Agreement. Upon termination, you must destroy
|
||||
all copies of Electric XML.
|
||||
3. Warranty Disclaimer and Limitation of Liability
|
||||
The Mind Electric licenses the Software to you on an "as is" basis, without
|
||||
warranty of any kind. The Mind Electric hereby expressly disclaims all
|
||||
warranties or conditions, either express or implied, including, but not limited
|
||||
to, the implied warranties or conditions of merchantability and fitness for a
|
||||
particular purpose. You are solely responsible for determining the
|
||||
appropriateness of using Electric XML and assume all risks associated with the
|
||||
use of it, including but not limited to the risks of program errors, damage to
|
||||
or loss of data, programs or equipment, and unavailability or interruption of
|
||||
operations. Some jurisdictions do not allow for the exclusion or limitation of
|
||||
implied warranties, so the above limitations or exclusions may not apply to you.
|
||||
The Mind Electric will not be liable for any direct damages or for any special,
|
||||
incidental, or indirect damages or for any economic consequential damages
|
||||
(including lost profits or savings), even if The Mind Electric has been advised
|
||||
of the possibility of such damages. The Mind Electric will not be liable for the
|
||||
loss of, or damage to, your records or data, or any damages claimed by you based
|
||||
on a third party claim. Some jurisdictions do not allow for the exclusion or
|
||||
limitation of incidental or consequential damages, so the above limitations or
|
||||
exclusions may not apply to you.
|
||||
4. General
|
||||
This Agreement is governed by the laws of the State of Texas. This Agreement is
|
||||
the only understanding and agreement we have regarding your use of Electric XML.
|
||||
It supersedes all other communications, understandings or agreements we may have
|
||||
had prior to this Agreement.
|
|
@ -1,150 +0,0 @@
|
|||
Thank you for using the Google Web APIs (TM) service! By using this
|
||||
service ("Google Web APIs") you agree to be bound by the following
|
||||
terms and conditions (the "Terms and Conditions").
|
||||
|
||||
PERSONAL AND LEGITIMATE USES ONLY
|
||||
|
||||
The Google Web APIs service is made available to you for your
|
||||
personal, non-commercial use only (at home or at work). You may only
|
||||
create a single account and must provide accurate identification,
|
||||
contact, and other information required as part of the registration
|
||||
process. You may not create any script or other automated tool that
|
||||
attempts to create multiple Google Web APIs accounts. And you may not
|
||||
use the search results provided by the Google Web APIs service with an
|
||||
existing product or service that competes with products or services
|
||||
offered by Google.
|
||||
|
||||
If you are interested in doing anything different than the foregoing,
|
||||
you must first obtain Google's written consent. If you fail to do so,
|
||||
Google reserves the right to take legal action against you.
|
||||
|
||||
Furthermore, you may not use Google Web APIs in any manner that either
|
||||
directly or indirectly violates any laws or proprietary rights. This
|
||||
includes laws and proprietary rights in the United States as well as
|
||||
in other countries.
|
||||
|
||||
If you have questions on your contemplated use or if you have comments
|
||||
on Google Web APIs or ideas on how to improve it, please email
|
||||
api-support@google.com. Please note that by doing so, you also grant
|
||||
Google permission to use and incorporate your ideas or comments into
|
||||
Google Web APIs without further compensation.
|
||||
|
||||
INTELLECTUAL PROPERTY
|
||||
|
||||
You agree not to remove, obscure, or alter Google's copyright notice,
|
||||
trademarks, or other proprietary rights notices affixed to or
|
||||
contained within Google Web APIs. You also acknowledge that Google
|
||||
owns all right, title and interest in and to Google Web APIs,
|
||||
including without limitation all intellectual property rights (the
|
||||
"Google Rights"). The Google Rights include rights to the following:
|
||||
(1) the APIs developed and provided by Google, (2) all software
|
||||
associated with the Google Web APIs server, and (3) the search results
|
||||
and spell checking you obtain when you use Google Web APIs. The Google
|
||||
Rights do not include the following: (1) third party components used
|
||||
as part of Google Web APIs; or (2) software developed by you in
|
||||
conjunction with using Google Web APIs.
|
||||
|
||||
PUBLICITY
|
||||
|
||||
So long as you comply with your obligations under this Agreement, you
|
||||
may indicate that a product or service that you created either used or
|
||||
is based on Google Web APIs provided that those products or services
|
||||
do not in Google's reasonable opinion (1) tarnish, infringe, or dilute
|
||||
Google's trademarks, (2) violate any applicable law, and (3) infringe
|
||||
any third party rights. If you wish to use the GOOGLE trademark and/or
|
||||
logo in any other manner, you must first obtain Google's written
|
||||
consent.
|
||||
|
||||
DISCLAIMER OF WARRANTIES
|
||||
|
||||
The Google Web APIs service is presently in Beta form and has not been
|
||||
fully tested or debugged. Accordingly, Google disclaims any
|
||||
responsibility for any harm resulting from your use of Google Web APIs.
|
||||
|
||||
The Google Web APIs service is provided "as is," with no warranties
|
||||
whatsoever. Google expressly disclaims to the fullest extent permitted
|
||||
by law all express, implied, and statutory warranties, including,
|
||||
without limitation, the warranties of merchantability, fitness for a
|
||||
particular purpose, and non-infringement of proprietary rights. Google
|
||||
disclaims any warranties regarding the security, reliability,
|
||||
timeliness, availability, and performance of Google Web APIs.
|
||||
|
||||
You understand and agree that you use Google Web APIs at your own
|
||||
discretion and risk and that you will be solely responsible for any
|
||||
damages to your computer system or loss of data that results from the
|
||||
download or use of Google Web APIs.
|
||||
|
||||
Some states or other jurisdictions do not allow the exclusion of
|
||||
implied warranties, so the above exclusions may not apply to you. You
|
||||
may also have other rights that vary from state to state and
|
||||
jurisdiction to jurisdiction.
|
||||
|
||||
LIMITATION OF LIABILITY
|
||||
|
||||
The Google Web APIs service is being provided free of charge.
|
||||
Accordingly, you agree that Google shall have no liability arising
|
||||
from or based on your use of Google Web APIs.
|
||||
|
||||
Under no circumstances shall Google be liable to any user on account
|
||||
of that user's use or misuse of Google Web APIs. Such limitation of
|
||||
liability shall apply to prevent recovery of direct, indirect,
|
||||
incidental, consequential, special, exemplary, and punitive damages
|
||||
whether such claim is based on warranty, contract, tort (including
|
||||
negligence), or otherwise, even if Google has been advised of the
|
||||
possibility of such damages). Such limitation of liability shall apply
|
||||
whether the damages arise from use or misuse of and reliance on the
|
||||
Google Web APIs, from inability to use Google Web APIs, or from the
|
||||
interruption, suspension, or termination of Google Web APIs (including
|
||||
such damages incurred by third parties). Such limitation shall apply
|
||||
notwithstanding a failure of essential purpose of any limited remedy
|
||||
and to the fullest extent permitted by law.
|
||||
|
||||
Some states or other jurisdictions do not allow the exclusion or
|
||||
limitation of liability for incidental or consequential damages, so
|
||||
the above limitations and exclusions may not apply to you.
|
||||
|
||||
INDEMNIFICATION
|
||||
|
||||
You hereby agree to indemnify, defend and hold Google, and its
|
||||
officers, directors, agents, licensors and licensees (collectively,
|
||||
the "Indemnified Parties") harmless from and against any and all
|
||||
liability and costs incurred by the Indemnified Parties in connection
|
||||
with any claim arising out of your use of Google Web APIs, including,
|
||||
without limitation, reasonable attorneys' fees. You shall cooperate as
|
||||
fully as reasonably required in the defense of any claim. Google
|
||||
reserves the right, at its own expense, to assume the exclusive
|
||||
defense and control of any matter subject to indemnification by you.
|
||||
|
||||
GOOGLE'S SEARCH SERVICE
|
||||
|
||||
The Google Web APIs service is designed to be used in conjunction with
|
||||
Google's search services. Accordingly, your use of Google Web APIs is
|
||||
also defined by Google's Terms of Service and Privacy Policy. In the
|
||||
event of a conflict between these Terms and Conditions and Google's
|
||||
Terms of Service, these Terms and Conditions shall prevail.
|
||||
|
||||
TERM AND TERMINATION
|
||||
|
||||
If you wish to terminate this Agreement, you may simply cease using
|
||||
the Google Web APIs service. In such a case, you must delete any
|
||||
search result information that you may have obtained from the Google
|
||||
Web APIs service. Google may terminate this Agreement (and your
|
||||
account) at any time, with or without cause.
|
||||
|
||||
GENERAL PROVISIONS
|
||||
|
||||
These Terms and Conditions will be governed by and construed in
|
||||
accordance with the laws of the State of California, without giving
|
||||
effect to the conflict of laws provisions of California or your actual
|
||||
state or country of residence. Any dispute arising from these Terms
|
||||
and Conditions shall be adjudicated in the federal or state courts
|
||||
located in Santa Clara County, California. If for any reason a court
|
||||
of competent jurisdiction finds any provision or portion of these
|
||||
Terms and Conditions to be unenforceable, the remainder of these Terms
|
||||
and Conditions will continue in full force and effect. These Terms and
|
||||
Conditions constitute the entire agreement between the parties with
|
||||
respect to the subject matter hereof and supersede and replace all
|
||||
prior or contemporaneous understandings or agreements, written or
|
||||
oral, regarding such subject matter. Any waiver of any provision of
|
||||
these Terms and Conditions will be effective only if in writing and
|
||||
signed by Google.
|
|
@ -1,29 +0,0 @@
|
|||
Google Tag Library License
|
||||
|
||||
Copyright (c) 2002-2003, Erik C. Thauvin (erik@thauvin.net)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
Neither the name of the author nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,6 +1,6 @@
|
|||
/*--
|
||||
|
||||
Copyright (C) 2000-2004 Jason Hunter & Brett McLaughlin.
|
||||
Copyright (C) 2000-2012 Jason Hunter & Brett McLaughlin.
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
@ -51,4 +51,3 @@
|
|||
on the JDOM Project, please see <http://www.jdom.org/>.
|
||||
|
||||
*/
|
||||
|
||||
|
|
21
licenses/JSON License.txt
Normal file
21
licenses/JSON License.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
Copyright (c) 2002 JSON.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
The Software shall be used for Good, not Evil.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,340 +0,0 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
27
licenses/LICENSE.txt
Normal file
27
licenses/LICENSE.txt
Normal file
|
@ -0,0 +1,27 @@
|
|||
Copyright (c) 2004-2022, Erik C. Thauvin (erik@thauvin.net)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
used to endorse or promote products derived from this software without
|
||||
specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,29 +0,0 @@
|
|||
Mobibot License
|
||||
|
||||
Copyright (c) 2004, Erik C. Thauvin (erik@thauvin.net)
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer.
|
||||
|
||||
Redistributions in binary form must reproduce the above copyright notice, this
|
||||
list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
Neither the name of the author nor the names of its contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* ============================================================================
|
||||
* The Apache Software License, Version 1.1
|
||||
* ============================================================================
|
||||
*
|
||||
* Copyright (C) 1999 The Apache Software Foundation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modifica-
|
||||
* tion, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The end-user documentation included with the redistribution, if any, must
|
||||
* include the following acknowledgment: "This product includes software
|
||||
* developed by the Apache Software Foundation (http://www.apache.org/)."
|
||||
* Alternately, this acknowledgment may appear in the software itself, if
|
||||
* and wherever such third-party acknowledgments normally appear.
|
||||
*
|
||||
* 4. The names "log4j" and "Apache Software Foundation" must not be used to
|
||||
* endorse or promote products derived from this software without prior
|
||||
* written permission. For written permission, please contact
|
||||
* apache@apache.org.
|
||||
*
|
||||
* 5. Products derived from this software may not be called "Apache", nor may
|
||||
* "Apache" appear in their name, without prior written permission of the
|
||||
* Apache Software Foundation.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
|
||||
* DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* This software consists of voluntary contributions made by many individuals
|
||||
* on behalf of the Apache Software Foundation. For more information on the
|
||||
* Apache Software Foundation, please see <http://www.apache.org/>.
|
||||
*
|
||||
*/
|
19
licenses/OWM JAPIs License.txt
Normal file
19
licenses/OWM JAPIs License.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
Copyright (c) 2013- Ashutosh Kumar Singh <ashutosh@aksingh.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
|
@ -1,60 +0,0 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title>The GNU General Public License (GPL)</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>The GNU General Public License (GPL)</h1>
|
||||
<h2>Version 2, June 1991</h2>
|
||||
<p> Copyright (C) 1989, 1991 Free Software Foundation, Inc.<br />
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</p>
|
||||
<p> Everyone is permitted to copy and distribute verbatim copies<br />
|
||||
of this license document, but changing it is not allowed.</p>
|
||||
<p><strong>Preamble</strong></p>
|
||||
<p>The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.</p>
|
||||
<p>When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.</p>
|
||||
<p> To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.</p>
|
||||
<p>For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.</p>
|
||||
<p>We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.</p>
|
||||
<p>Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.</p>
|
||||
<p>Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.</p>
|
||||
<p>The precise terms and conditions for copying, distribution and modification follow.</p>
|
||||
<p><strong>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</strong></p>
|
||||
<p><strong>0</strong>. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".</p>
|
||||
<p>Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.</p>
|
||||
<p><strong>1</strong>. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.</p>
|
||||
<p>You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.</p>
|
||||
<p> <strong>2</strong>. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:</p>
|
||||
<blockquote>
|
||||
<p>a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.</p>
|
||||
<p>b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.</p>
|
||||
<p>c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)</p>
|
||||
</blockquote>
|
||||
<p>These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.</p>
|
||||
<p>Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.</p>
|
||||
<p>In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.</p>
|
||||
<p><strong>3</strong>. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:</p>
|
||||
<blockquote>
|
||||
<p>a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,</p>
|
||||
<p> b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,</p>
|
||||
<p>c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)</p>
|
||||
</blockquote>
|
||||
<p>The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.</p>
|
||||
<p>If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.</p>
|
||||
<p><strong>4</strong>. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.</p>
|
||||
<p> <strong>5</strong>. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.</p>
|
||||
<p><strong>6</strong>. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.</p>
|
||||
<p><strong>7</strong>. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.</p>
|
||||
<p>If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.</p>
|
||||
<p>It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.</p>
|
||||
<p> This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.</p>
|
||||
<p> <strong>8</strong>. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.</p>
|
||||
<p> <strong>9</strong>. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.</p>
|
||||
<p>Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.</p>
|
||||
<p><strong>10</strong>. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.</p>
|
||||
<p><strong>NO WARRANTY</strong></p>
|
||||
<p><strong>11</strong>. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.</p>
|
||||
<p><strong>12</strong>. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.</p>
|
||||
<p>END OF TERMS AND CONDITIONS</p>
|
||||
</body>
|
||||
</html>
|
13
licenses/PircBotX.txt
Normal file
13
licenses/PircBotX.txt
Normal file
|
@ -0,0 +1,13 @@
|
|||
Copyright (C) 2010-2014 Leon Blakey <lord.quackstar at gmail.com>
|
||||
|
||||
PircBotX is free software: you can redistribute it and/or modify it under the
|
||||
terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
|
||||
PircBotX is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
PircBotX. If not, see <http://www.gnu.org/licenses/>.
|
|
@ -1,83 +0,0 @@
|
|||
Apache Software License
|
||||
Version 1.1
|
||||
|
||||
Copyright (c) 2000 The Apache Software Foundation. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation and/or
|
||||
other materials provided with the distribution.
|
||||
|
||||
3. The end-user documentation included with the redistribution, if any, must
|
||||
include the following acknowledgment:
|
||||
|
||||
"This product includes software developed by the Apache Software Foundation
|
||||
(http://www.apache.org/)."
|
||||
|
||||
Alternately, this acknowledgment may appear in the software itself, if and
|
||||
wherever such third-party acknowledgments normally appear.
|
||||
|
||||
4. The names "Apache" and "Apache Software Foundation" must not be used to
|
||||
endorse or promote products derived from this software without prior written
|
||||
permission. For written permission, please contact apache@apache.org.
|
||||
|
||||
5. Products derived from this software may not be called "Apache", nor may
|
||||
"Apache" appear in their name, without prior written permission of the Apache
|
||||
Software Foundation.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
|
||||
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE
|
||||
SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
This software consists of voluntary contributions made by many individuals on
|
||||
behalf of the Apache Software Foundation. For more information on the Apache
|
||||
Software Foundation, please see <http://www.apache.org/>.
|
||||
|
||||
Portions of this software are based upon public domain software originally
|
||||
written at the National Center for Supercomputing Applications, University of
|
||||
Illinois, Urbana-Champaign.
|
||||
|
||||
Electric XML is owned by The Mind Electric and is copyrighted and licensed, not
|
||||
sold. The Mind Electric grants you a non-exclusive, non-transferable license to
|
||||
use, modify and distribute Electric XML in both binary and source form as long
|
||||
as all of the following conditions are met:
|
||||
|
||||
You are not bundling Electric XML or a derivative of it as part of a software
|
||||
development environment such as JBuilder, WebGain or VisualAge. Note that this
|
||||
restriction is targeted at IDE vendors, and does not prevent developers from
|
||||
loading Electric XML into an IDE and using it during everyday development.
|
||||
|
||||
|
||||
You are not integrating Electric XML or a derivative of it into a distributed
|
||||
computing infrastructure or database platform such as WebLogic, Apache SOAP,
|
||||
WebSphere, Oracle application server, or HP e-speak. Note that this restriction
|
||||
is targeted at software infrastructure vendors, and does not prevent developers
|
||||
from using and bundling Electric XML with applications that run on these
|
||||
platforms.
|
||||
|
||||
|
||||
You are not integrating Electric XML or a derivative of it into an alternative
|
||||
to Electric XML such as Xerces or JDOM.
|
||||
|
||||
|
||||
You must not remove any of the copyright information from the Electric XML
|
||||
source code or documentation.
|
||||
|
||||
|
21
licenses/SLF4J License.txt
Normal file
21
licenses/SLF4J License.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
Copyright (c) 2004-2017 QOS.ch
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,502 +0,0 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it becomes
|
||||
a de-facto standard. To achieve this, non-free programs must be
|
||||
allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control compilation
|
||||
and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at
|
||||
least three years, to give the same user the materials
|
||||
specified in Subsection 6a, above, for a charge no more
|
||||
than the cost of performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any
|
||||
particular circumstance, the balance of the section is intended to apply,
|
||||
and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License may add
|
||||
an explicit geographical distribution limitation excluding those countries,
|
||||
so that distribution is permitted only in or among countries not thus
|
||||
excluded. In such case, this License incorporates the limitation as if
|
||||
written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms of the
|
||||
ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library. It is
|
||||
safest to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least the
|
||||
"copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the library, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
21
licenses/jsoup License.txt
Normal file
21
licenses/jsoup License.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License
|
||||
|
||||
Copyright (c) 2009-2022 Jonathan Hedley <jonathan@hedley.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
20
mobibot.fb
20
mobibot.fb
|
@ -1,20 +0,0 @@
|
|||
[Jar files]
|
||||
D:\projects\java\mobibot\build
|
||||
[Source dirs]
|
||||
D:\projects\java\mobibot\src
|
||||
[Aux classpath entries]
|
||||
D:\projects\java\mobibot\lib\commons-httpclient-2.0-final.jar
|
||||
D:\projects\java\mobibot\lib\commons-logging.jar
|
||||
D:\projects\java\mobibot\lib\commons-net-1.1.0.jar
|
||||
D:\projects\java\mobibot\lib\EXML.jar
|
||||
D:\projects\java\mobibot\lib\fetchrss.jar
|
||||
D:\projects\java\mobibot\lib\google.jar
|
||||
D:\projects\java\mobibot\lib\googleapi.jar
|
||||
D:\projects\java\mobibot\lib\jakarta-oro-2.0.7.jar
|
||||
D:\projects\java\mobibot\lib\jakarta-oro-2.0.8.jar
|
||||
D:\projects\java\mobibot\lib\jdom.jar
|
||||
D:\projects\java\mobibot\lib\jweather-0.2.3.jar
|
||||
D:\projects\java\mobibot\lib\log4j-1.2.8.jar
|
||||
D:\projects\java\mobibot\lib\MathEvaluator.jar
|
||||
D:\projects\java\mobibot\lib\pircbot.jar
|
||||
D:\projects\java\mobibot\lib\rsslibj.jar
|
149
mobibot.iml
149
mobibot.iml
|
@ -1,149 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4" relativePaths="false">
|
||||
<component name="ModuleRootManager" />
|
||||
<component name="NewModuleRootManager">
|
||||
<output url="file://$MODULE_DIR$/build" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/fetchrss.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/jdom.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/pircbot.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/commons-logging.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/google.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/googleapi.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/EXML.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/rsslibj.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/jweather-0.2.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/log4j-1.2.8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/MathEvaluator.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/commons-net-1.1.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/commons-httpclient-2.0-final.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/lib/jakarta-oro-2.0.8.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
|
119
mobibot.ipr
119
mobibot.ipr
|
@ -1,119 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4" relativePaths="false">
|
||||
<component name="AntConfiguration">
|
||||
<buildFile url="file://$PROJECT_DIR$/build.xml">
|
||||
<useEmacsModeOutput value="true" />
|
||||
<maximumHeapSize value="128" />
|
||||
<useCustomJdk value="false" />
|
||||
<useJavaw value="false" />
|
||||
<includeProjectClasspath value="false" />
|
||||
<includeParser value="true" />
|
||||
</buildFile>
|
||||
</component>
|
||||
<component name="BSFConsole">
|
||||
<restoresystemstreams>false</restoresystemstreams>
|
||||
<outwaitsforerr>false</outwaitsforerr>
|
||||
<errwaitsforout>false</errwaitsforout>
|
||||
<languages>
|
||||
<language name="ant" engine="org.kos.bsfconsoleplugin.AntConsoleBSFEngine" />
|
||||
<language name="beanshell" engine="bsh.util.BeanShellBSFEngine" />
|
||||
<language name="netrexx" engine="org.apache.bsf.engines.netrexx.NetRexxEngine" />
|
||||
<language name="xslt" engine="org.apache.bsf.engines.xslt.XSLTEngine" />
|
||||
<language name="beanbasic" engine="org.apache.bsf.engines.beanbasic.BeanBasicEngine" />
|
||||
<language name="bml" engine="org.apache.bml.ext.BMLEngine" />
|
||||
<language name="groovy" engine="org.codehaus.groovy.bsf.GroovyEngine" />
|
||||
<language name="jacl" engine="org.apache.bsf.engines.jacl.JaclEngine" />
|
||||
<language name="java" engine="org.apache.bsf.engines.java.JavaEngine" />
|
||||
<language name="javaclass" engine="org.apache.bsf.engines.javaclass.JavaClassEngine" />
|
||||
<language name="javascript" engine="org.apache.bsf.engines.javascript.JavaScriptEngine" />
|
||||
<language name="jpython" engine="org.apache.bsf.engines.jpython.JPythonEngine" />
|
||||
<language name="jscript" engine="org.apache.bsf.engines.activescript.ActiveScriptEngine" />
|
||||
<language name="judoscript" engine="com.judoscript.BSFJudoEngine" />
|
||||
<language name="jython" engine="org.apache.bsf.engines.jython.JythonEngine" />
|
||||
<language name="lotusscript" engine="org.apache.bsf.engines.lotusscript.LsEngine" />
|
||||
<language name="perl" engine="org.apache.bsf.engines.perl.PerlEngine" />
|
||||
<language name="perlscript" engine="org.apache.bsf.engines.activescript.ActiveScriptEngine" />
|
||||
<language name="pnuts" engine="pnuts.ext.PnutsBSFEngine" />
|
||||
<language name="ruby" engine="org.jruby.javasupport.bsf.JRubyEngine" />
|
||||
<language name="vbscript" engine="org.apache.bsf.engines.activescript.ActiveScriptEngine" />
|
||||
</languages>
|
||||
<startupscripts />
|
||||
<BSFConsoleSearchOptions searchfromcursor="false">
|
||||
<recentsearches />
|
||||
</BSFConsoleSearchOptions>
|
||||
</component>
|
||||
<component name="CodeStyleSettingsManager">
|
||||
<option name="PER_PROJECT_SETTINGS" />
|
||||
<option name="USE_PER_PROJECT_SETTINGS" value="false" />
|
||||
</component>
|
||||
<component name="CompilerConfiguration">
|
||||
<option name="DEFAULT_COMPILER" value="Javac" />
|
||||
<option name="CLEAR_OUTPUT_DIRECTORY" value="false" />
|
||||
<resourceExtensions>
|
||||
<entry name=".+\.(properties|xml|html|dtd|tld)" />
|
||||
<entry name=".+\.(gif|png|jpeg|jpg)" />
|
||||
</resourceExtensions>
|
||||
</component>
|
||||
<component name="DataSourceManager" />
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points />
|
||||
</component>
|
||||
<component name="ExportToHTMLSettings">
|
||||
<option name="PRINT_LINE_NUMBERS" value="false" />
|
||||
<option name="OPEN_IN_BROWSER" value="false" />
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
</component>
|
||||
<component name="GUI Designer component loader factory" />
|
||||
<component name="JavacSettings">
|
||||
<option name="DEBUGGING_INFO" value="true" />
|
||||
<option name="GENERATE_NO_WARNINGS" value="false" />
|
||||
<option name="DEPRECATION" value="true" />
|
||||
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
|
||||
<option name="MAXIMUM_HEAP_SIZE" value="128" />
|
||||
<option name="USE_GENERICS_COMPILER" value="false" />
|
||||
</component>
|
||||
<component name="JavadocGenerationManager">
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
<option name="OPTION_SCOPE" value="protected" />
|
||||
<option name="OPTION_HIERARCHY" value="true" />
|
||||
<option name="OPTION_NAVIGATOR" value="true" />
|
||||
<option name="OPTION_INDEX" value="true" />
|
||||
<option name="OPTION_SEPARATE_INDEX" value="true" />
|
||||
<option name="OPTION_DOCUMENT_TAG_USE" value="true" />
|
||||
<option name="OPTION_DOCUMENT_TAG_AUTHOR" value="true" />
|
||||
<option name="OPTION_DOCUMENT_TAG_VERSION" value="true" />
|
||||
<option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
|
||||
<option name="OPTION_DEPRECATED_LIST" value="true" />
|
||||
<option name="OTHER_OPTIONS" />
|
||||
<option name="HEAP_SIZE" />
|
||||
<option name="OPEN_IN_BROWSER" value="true" />
|
||||
</component>
|
||||
<component name="JikesSettings">
|
||||
<option name="JIKES_PATH" value="" />
|
||||
<option name="DEBUGGING_INFO" value="true" />
|
||||
<option name="DEPRECATION" value="true" />
|
||||
<option name="GENERATE_NO_WARNINGS" value="false" />
|
||||
<option name="IS_EMACS_ERRORS_MODE" value="true" />
|
||||
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
|
||||
</component>
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/mobibot.iml" filepath="$PROJECT_DIR$/mobibot.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" assert-keyword="false" project-jdk-name="1.4.x" />
|
||||
<component name="Regex">
|
||||
<option name="pos1" value="218" />
|
||||
<option name="pos2" value="218" />
|
||||
<option name="pos3" value="116" />
|
||||
<option name="pos4" value="444" />
|
||||
<option name="pos5" value="117" />
|
||||
<option name="pos6" value="707" />
|
||||
</component>
|
||||
<component name="libraryTable" />
|
||||
<component name="uidesigner-configuration">
|
||||
<option name="INSTRUMENT_CLASSES" value="true" />
|
||||
<option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
|
588
mobibot.iws
588
mobibot.iws
|
@ -1,588 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4" relativePaths="false">
|
||||
<component name="AspectsView" />
|
||||
<component name="BookmarkManager" />
|
||||
<component name="CheckinPanelState" />
|
||||
<component name="Commander">
|
||||
<leftPanel />
|
||||
<rightPanel />
|
||||
<splitter proportion="0.5" />
|
||||
</component>
|
||||
<component name="CompilerWorkspaceConfiguration">
|
||||
<option name="COMPILE_IN_BACKGROUND" value="false" />
|
||||
<option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" />
|
||||
</component>
|
||||
<component name="Cvs2Configuration">
|
||||
<option name="ON_FILE_ADDING" value="0" />
|
||||
<option name="ON_FILE_REMOVING" value="0" />
|
||||
<option name="PRUNE_EMPTY_DIRECTORIES" value="true" />
|
||||
<option name="SHOW_UPDATE_OPTIONS" value="true" />
|
||||
<option name="SHOW_ADD_OPTIONS" value="true" />
|
||||
<option name="SHOW_REMOVE_OPTIONS" value="true" />
|
||||
<option name="MERGING_MODE" value="0" />
|
||||
<option name="MERGE_WITH_BRANCH1_NAME" value="HEAD" />
|
||||
<option name="MERGE_WITH_BRANCH2_NAME" value="HEAD" />
|
||||
<option name="RESET_STICKY" value="false" />
|
||||
<option name="CREATE_NEW_DIRECTORIES" value="true" />
|
||||
<option name="DEFAULT_TEXT_FILE_SUBSTITUTION" value="v" />
|
||||
<option name="PROCESS_UNKNOWN_FILES" value="false" />
|
||||
<option name="PROCESS_DELETED_FILES" value="false" />
|
||||
<option name="SHOW_EDIT_DIALOG" value="false" />
|
||||
<option name="RESERVED_EDIT" value="false" />
|
||||
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
|
||||
<option name="SHOW_CHECKOUT_OPTIONS" value="true" />
|
||||
<option name="CHECKOUT_DATE_OR_REVISION_SETTINGS">
|
||||
<value>
|
||||
<option name="BRANCH" value="" />
|
||||
<option name="DATE" value="" />
|
||||
<option name="USE_BRANCH" value="false" />
|
||||
<option name="USE_DATE" value="false" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="UPDATE_DATE_OR_REVISION_SETTINGS">
|
||||
<value>
|
||||
<option name="BRANCH" value="" />
|
||||
<option name="DATE" value="" />
|
||||
<option name="USE_BRANCH" value="false" />
|
||||
<option name="USE_DATE" value="false" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="SHOW_CHANGES_REVISION_SETTINGS">
|
||||
<value>
|
||||
<option name="BRANCH" value="" />
|
||||
<option name="DATE" value="" />
|
||||
<option name="USE_BRANCH" value="false" />
|
||||
<option name="USE_DATE" value="false" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="SHOW_OUTPUT" value="false" />
|
||||
<option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
|
||||
<option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
|
||||
<option name="ADD_WATCH_INDEX" value="0" />
|
||||
<option name="REMOVE_WATCH_INDEX" value="0" />
|
||||
<option name="UPDATE_KEYWORD_SUBSTITUTION" />
|
||||
<option name="MAKE_NEW_FILES_READONLY" value="false" />
|
||||
<option name="PUT_FOCUS_INTO_COMMENT" value="false" />
|
||||
<option name="SHOW_CHECKIN_OPTIONS" value="true" />
|
||||
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="" />
|
||||
<option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
|
||||
<option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_FILE_COMMIT" value="false" />
|
||||
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
|
||||
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
||||
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
||||
</component>
|
||||
<component name="DaemonCodeAnalyzer">
|
||||
<disable_hints />
|
||||
</component>
|
||||
<component name="DebuggerManager">
|
||||
<line_breakpoints />
|
||||
<exception_breakpoints>
|
||||
<breakpoint_any>
|
||||
<option name="NOTIFY_CAUGHT" value="true" />
|
||||
<option name="NOTIFY_UNCAUGHT" value="true" />
|
||||
<option name="ENABLED" value="false" />
|
||||
<option name="SUSPEND_VM" value="true" />
|
||||
<option name="LOG_ENABLED" value="false" />
|
||||
<option name="LOG_EXPRESSION_ENABLED" value="false" />
|
||||
<option name="LOG_MESSAGE" value="" />
|
||||
<option name="COUNT_FILTER_ENABLED" value="false" />
|
||||
<option name="COUNT_FILTER" value="0" />
|
||||
<option name="CONDITION_ENABLED" value="false" />
|
||||
<option name="CONDITION" value="" />
|
||||
<option name="CLASS_FILTERS_ENABLED" value="false" />
|
||||
<option name="INSTANCE_FILTERS_ENABLED" value="false" />
|
||||
</breakpoint_any>
|
||||
</exception_breakpoints>
|
||||
<field_breakpoints />
|
||||
<method_breakpoints />
|
||||
</component>
|
||||
<component name="ErrorTreeViewConfiguration">
|
||||
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
|
||||
<option name="HIDE_WARNINGS" value="false" />
|
||||
</component>
|
||||
<component name="FileEditorManager" split-orientation="vertical" split-proportion="0.5">
|
||||
<first-group selected-file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="66" column="13" selection-start="2138" selection-end="2138" vertical-scroll-proportion="1.518732">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryComment.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="45" column="66" selection-start="1803" selection-end="1803" vertical-scroll-proportion="0.4364641">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="47" column="40" selection-start="1825" selection-end="1825" vertical-scroll-proportion="0.160221">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/FeedReader.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="64" column="13" selection-start="2145" selection-end="2145" vertical-scroll-proportion="0.6023055">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleSearch.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="54" column="13" selection-start="1958" selection-end="1958" vertical-scroll-proportion="0.6023055">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="1441" column="47" selection-start="37111" selection-end="37111" vertical-scroll-proportion="67.129684">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="53" column="13" selection-start="1948" selection-end="1948" vertical-scroll-proportion="0.5821326">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java" pinned="false">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="54" column="13" selection-start="1981" selection-end="1981" vertical-scroll-proportion="0.556196">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</first-group>
|
||||
<second-group />
|
||||
</component>
|
||||
<component name="HierarchyBrowserManager">
|
||||
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
|
||||
<option name="SORT_ALPHABETICALLY" value="false" />
|
||||
<option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
|
||||
</component>
|
||||
<component name="InspectionManager">
|
||||
<option name="AUTOSCROLL_TO_SOURCE" value="false" />
|
||||
<option name="SPLITTER_PROPORTION" value="0.452356" />
|
||||
<profile name="Erik's Inspection Profile" />
|
||||
</component>
|
||||
<component name="J2EEProjectPane" />
|
||||
<component name="PackagesPane">
|
||||
<expanded_node url="net" module="mobibot" type="package" />
|
||||
<expanded_node url="net.thauvin.erik.mobibot" module="mobibot" type="package" />
|
||||
<expanded_node url="" module="mobibot" type="module" />
|
||||
<expanded_node url="net.thauvin.erik" module="mobibot" type="package" />
|
||||
<expanded_node url="net.thauvin" module="mobibot" type="package" />
|
||||
</component>
|
||||
<component name="ProjectPane">
|
||||
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin/erik" module="mobibot" type="directory" />
|
||||
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin" module="mobibot" type="directory" />
|
||||
<expanded_node url="file://$PROJECT_DIR$/src/net" module="mobibot" type="directory" />
|
||||
<expanded_node url="file://$PROJECT_DIR$" module="mobibot" type="directory" />
|
||||
<expanded_node url="file://$PROJECT_DIR$/src" module="mobibot" type="directory" />
|
||||
<expanded_node url="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot" module="mobibot" type="directory" />
|
||||
<expanded_node url="" module="mobibot" type="module" />
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="ProjectPane" splitterProportion="0.5">
|
||||
<flattenPackages />
|
||||
<showMembers />
|
||||
<showModules />
|
||||
<showLibraryContents />
|
||||
<hideEmptyPackages />
|
||||
<showStructure PackagesPane="false" ProjectPane="false" />
|
||||
<autoscrollToSource />
|
||||
</navigator>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="MemberChooser.copyJavadoc" value="false" />
|
||||
<property name="GoToClass.includeLibraries" value="false" />
|
||||
<property name="MemberChooser.showClasses" value="true" />
|
||||
<property name="MemberChooser.sorted" value="false" />
|
||||
<property name="GoToFile.includeJavaFiles" value="false" />
|
||||
<property name="last_opened_file_path" value="C:\Documents and Settings\erik\My Documents\My Received Files\src\MathEvaluator" />
|
||||
<property name="GoToClass.toSaveIncludeLibraries" value="false" />
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<activeType name="Application" />
|
||||
<configuration name="<template>" type="Application" default="true" selected="false">
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<module name="" />
|
||||
</configuration>
|
||||
<configuration name="<template>" type="Applet" default="true" selected="false">
|
||||
<module name="" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="HTML_FILE_NAME" />
|
||||
<option name="HTML_USED" value="false" />
|
||||
<option name="WIDTH" value="400" />
|
||||
<option name="HEIGHT" value="300" />
|
||||
<option name="POLICY_FILE" value="C:/IntelliJ-IDEA/bin/appletviewer.policy" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
</configuration>
|
||||
<configuration name="<template>" type="JUnit" default="true" selected="false">
|
||||
<module name="" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="TEST_OBJECT" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="ADDITIONAL_CLASS_PATH" />
|
||||
</configuration>
|
||||
<configuration name="<template>" type="Remote" default="true" selected="false">
|
||||
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||
<option name="SERVER_MODE" value="false" />
|
||||
<option name="SHMEM_ADDRESS" value="javadebug" />
|
||||
<option name="HOST" value="localhost" />
|
||||
<option name="PORT" value="5005" />
|
||||
</configuration>
|
||||
<configuration name="<template>" type="WebApp" default="true" selected="false">
|
||||
<module name="" />
|
||||
<WebServerIntegration name="" />
|
||||
<Host>localhost</Host>
|
||||
<Port>5050</Port>
|
||||
<LaunchServer>false</LaunchServer>
|
||||
</configuration>
|
||||
<configuration name="<template>" type="WebLogic Instance" default="true" selected="false">
|
||||
<setting name="WEBLOGIC_INSTANCE_CONFIGURATION_NAME" value="" />
|
||||
</configuration>
|
||||
<configuration name="Mobibot" type="Application" default="false" selected="true">
|
||||
<option name="MAIN_CLASS_NAME" value="net.thauvin.erik.mobibot.Mobibot" />
|
||||
<option name="VM_PARAMETERS" value="" />
|
||||
<option name="PROGRAM_PARAMETERS" value="-debug" />
|
||||
<option name="WORKING_DIRECTORY" value="D:\projects\java\mobibot" />
|
||||
<module name="mobibot" />
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="SelectInManager">
|
||||
<target name="J2EE View" />
|
||||
<target name="File Structure" />
|
||||
<target name="Project" />
|
||||
<target name="Packages" />
|
||||
<target name="Commander" />
|
||||
</component>
|
||||
<component name="StarteamConfiguration">
|
||||
<option name="SERVER" value="" />
|
||||
<option name="PORT" value="49201" />
|
||||
<option name="USER" value="" />
|
||||
<option name="PASSWORD" value="" />
|
||||
<option name="PROJECT" value="" />
|
||||
<option name="VIEW" value="" />
|
||||
<option name="ALTERNATIVE_WORKING_PATH" value="" />
|
||||
<option name="PUT_FOCUS_INTO_COMMENT" value="false" />
|
||||
<option name="SHOW_CHECKIN_OPTIONS" value="true" />
|
||||
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="" />
|
||||
<option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
|
||||
<option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_FILE_COMMIT" value="false" />
|
||||
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
|
||||
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
||||
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
||||
</component>
|
||||
<component name="StructureViewFactory">
|
||||
<option name="SORT_MODE" value="0" />
|
||||
<option name="GROUP_INHERITED" value="true" />
|
||||
<option name="AUTOSCROLL_MODE" value="true" />
|
||||
<option name="SHOW_FIELDS" value="true" />
|
||||
<option name="AUTOSCROLL_FROM_SOURCE" value="true" />
|
||||
<option name="GROUP_GETTERS_AND_SETTERS" value="true" />
|
||||
<option name="SHOW_INHERITED" value="false" />
|
||||
<option name="HIDE_NOT_PUBLIC" value="false" />
|
||||
</component>
|
||||
<component name="TodoView" selected-index="0">
|
||||
<todo-panel id="selected-file">
|
||||
<are-packages-shown value="false" />
|
||||
<flatten-packages value="false" />
|
||||
<is-autoscroll-to-source value="true" />
|
||||
</todo-panel>
|
||||
<todo-panel id="all">
|
||||
<are-packages-shown value="true" />
|
||||
<flatten-packages value="false" />
|
||||
<is-autoscroll-to-source value="true" />
|
||||
</todo-panel>
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-4" y="-4" width="1032" height="776" extended-state="0" />
|
||||
<editor active="false" />
|
||||
<layout>
|
||||
<window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="8" />
|
||||
<window_info id="Regex" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.44135803" order="10" x="22" y="277" width="980" height="214" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" order="7" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25918368" order="0" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" order="1" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.16836734" order="1" />
|
||||
<window_info id="Messages" active="true" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.33024693" order="9" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.39969134" order="6" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.08265306" order="1" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="true" internal_type="docked" type="docked" visible="false" weight="0.39660493" order="2" x="22" y="277" width="980" height="213" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
|
||||
<window_info id="CVS File View" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="3" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.39969134" order="4" />
|
||||
<window_info id="BSFConsole" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33024693" order="11" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" />
|
||||
<window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="0" />
|
||||
<window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="3" />
|
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="5" />
|
||||
</layout>
|
||||
</component>
|
||||
<component name="VCS.FileViewConfiguration">
|
||||
<option name="SELECTED_STATUSES" value="DEFAULT" />
|
||||
<option name="SELECTED_COLUMNS" value="DEFAULT" />
|
||||
<option name="SHOW_FILTERS" value="true" />
|
||||
<option name="CUSTOMIZE_VIEW" value="true" />
|
||||
<option name="SHOW_FILE_HISTORY_AS_TREE" value="true" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="ACTIVE_VCS_NAME" value="CVS" />
|
||||
</component>
|
||||
<component name="VssConfiguration">
|
||||
<CheckoutOptions>
|
||||
<option name="COMMENT" value="" />
|
||||
<option name="DO_NOT_GET_LATEST_VERSION" value="false" />
|
||||
<option name="REPLACE_WRITABLE" value="false" />
|
||||
<option name="RECURSIVE" value="false" />
|
||||
</CheckoutOptions>
|
||||
<CheckinOptions>
|
||||
<option name="COMMENT" value="" />
|
||||
<option name="KEEP_CHECKED_OUT" value="false" />
|
||||
<option name="RECURSIVE" value="false" />
|
||||
</CheckinOptions>
|
||||
<AddOptions>
|
||||
<option name="COMMENT" value="" />
|
||||
<option name="STORE_ONLY_LATEST_VERSION" value="false" />
|
||||
<option name="CHECK_OUT_IMMEDIATELY" value="false" />
|
||||
<option name="FILE_TYPE" value="0" />
|
||||
</AddOptions>
|
||||
<UndocheckoutOptions>
|
||||
<option name="MAKE_WRITABLE" value="false" />
|
||||
<option name="REPLACE_LOCAL_COPY" value="0" />
|
||||
<option name="RECURSIVE" value="false" />
|
||||
</UndocheckoutOptions>
|
||||
<GetOptions>
|
||||
<option name="REPLACE_WRITABLE" value="0" />
|
||||
<option name="MAKE_WRITABLE" value="false" />
|
||||
<option name="RECURSIVE" value="false" />
|
||||
</GetOptions>
|
||||
<option name="CLIENT_PATH" value="" />
|
||||
<option name="SRCSAFEINI_PATH" value="" />
|
||||
<option name="USER_NAME" value="" />
|
||||
<option name="PWD" value="" />
|
||||
<option name="SHOW_CHECKOUT_OPTIONS" value="true" />
|
||||
<option name="SHOW_ADD_OPTIONS" value="true" />
|
||||
<option name="VSS_IS_INITIALIZED" value="false" />
|
||||
<option name="SHOW_UNDOCHECKOUT_OPTIONS" value="true" />
|
||||
<option name="SHOW_DIFF_OPTIONS" value="true" />
|
||||
<option name="SHOW_GET_OPTIONS" value="true" />
|
||||
<option name="REUSE_LAST_COMMENT" value="false" />
|
||||
<option name="PUT_FOCUS_INTO_COMMENT" value="false" />
|
||||
<option name="SHOW_CHECKIN_OPTIONS" value="true" />
|
||||
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="" />
|
||||
<option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
|
||||
<option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="OPTIMIZE_IMPORTS_BEFORE_FILE_COMMIT" value="false" />
|
||||
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
|
||||
<option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
|
||||
<option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
|
||||
</component>
|
||||
<component name="antWorkspaceConfiguration">
|
||||
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
|
||||
<option name="FILTER_TARGETS" value="false" />
|
||||
<buildFile url="file://$PROJECT_DIR$/build.xml">
|
||||
<runInBackground value="false" />
|
||||
<viewClosedWhenNoErrors value="false" />
|
||||
<treeView value="true" />
|
||||
<verbose value="true" />
|
||||
</buildFile>
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="jar://$PROJECT_DIR$/lib/commons-logging.jar!/org/apache/commons/logging/impl/Log4JLogger.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="28" column="16" selection-start="652" selection-end="657" vertical-scroll-proportion="0.33333334">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://C:/j2sdk1.4.2_03/src.zip!/java/io/Serializable.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="44" column="52" selection-start="200" selection-end="4427" vertical-scroll-proportion="0.3567753">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/build.xml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="22" column="105" selection-start="865" selection-end="865" vertical-scroll-proportion="0.6584507">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://C:/j2sdk1.4.2_03/src.zip!/java/lang/Runnable.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="37" column="10" selection-start="1508" selection-end="1508" vertical-scroll-proportion="0.41680962">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/build.properties">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$PROJECT_DIR$/lib/pircbot.jar!/org/jibble/pircbot/InputThread.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="24" column="0" selection-start="760" selection-end="760" vertical-scroll-proportion="1.2615894">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="jar://$PROJECT_DIR$/lib/pircbot.jar!/org/jibble/pircbot/PircBot.class">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="372" column="24" selection-start="12156" selection-end="12156" vertical-scroll-proportion="0.33274648">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/CurrencyConverter.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="66" column="13" selection-start="2138" selection-end="2138" vertical-scroll-proportion="1.518732">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryComment.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="45" column="66" selection-start="1803" selection-end="1803" vertical-scroll-proportion="0.4364641">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/EntryLink.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="47" column="40" selection-start="1825" selection-end="1825" vertical-scroll-proportion="0.160221">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/FeedReader.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="64" column="13" selection-start="2145" selection-end="2145" vertical-scroll-proportion="0.6023055">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Mobibot.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="1441" column="47" selection-start="37111" selection-end="37111" vertical-scroll-proportion="67.129684">
|
||||
<folding>
|
||||
<element signature="imports" expanded="true" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/StockQuote.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="53" column="13" selection-start="1948" selection-end="1948" vertical-scroll-proportion="0.5821326">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/Weather.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="54" column="13" selection-start="1981" selection-end="1981" vertical-scroll-proportion="0.556196">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/net/thauvin/erik/mobibot/GoogleSearch.java">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state line="54" column="13" selection-start="1958" selection-end="1958" vertical-scroll-proportion="0.6023055">
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
<component name="ideajad">
|
||||
<property name="annotate" value="false" />
|
||||
<property name="annotateFully" value="false" />
|
||||
<property name="braces" value="false" />
|
||||
<property name="clear" value="false" />
|
||||
<property name="confirmNavigationTriggeredDecompile" value="true" />
|
||||
<property name="dead" value="true" />
|
||||
<property name="defaultInitializers" value="false" />
|
||||
<property name="dissassemblerOnly" value="false" />
|
||||
<property name="fieldsFirst" value="true" />
|
||||
<property name="fileExtension" value="java" />
|
||||
<property name="fullyQualifiedNames" value="false" />
|
||||
<property name="indentation" value="4" />
|
||||
<property name="intRadix" value="10" />
|
||||
<property name="lineNumbersAsComments" value="true" />
|
||||
<property name="longRadix" value="10" />
|
||||
<property name="maxStringLength" value="64" />
|
||||
<property name="nocast" value="false" />
|
||||
<property name="noclass" value="false" />
|
||||
<property name="nocode" value="false" />
|
||||
<property name="noconv" value="false" />
|
||||
<property name="noctor" value="false" />
|
||||
<property name="nodos" value="false" />
|
||||
<property name="nofd" value="false" />
|
||||
<property name="noinner" value="false" />
|
||||
<property name="nolvt" value="false" />
|
||||
<property name="nonlb" value="false" />
|
||||
<property name="outputDirectory" value="D:\projects\ect\java\mobibot\src" />
|
||||
<property name="packFields" value="3" />
|
||||
<property name="packImports" value="7" />
|
||||
<property name="prefixNumericalClasses" value="_cls" />
|
||||
<property name="prefixNumericalFields" value="_fld" />
|
||||
<property name="prefixNumericalLocals" value="_lcl" />
|
||||
<property name="prefixNumericalMethods" value="_mth" />
|
||||
<property name="prefixNumericalParameters" value="_prm" />
|
||||
<property name="prefixUnusedExceptions" value="_ex" />
|
||||
<property name="readonly" value="false" />
|
||||
<property name="safe" value="false" />
|
||||
<property name="sort" value="false" />
|
||||
<property name="spaceAfterKeyword" value="false" />
|
||||
<property name="splitStringsAtNewline" value="false" />
|
||||
<property name="useTabs" value="false" />
|
||||
</component>
|
||||
</project>
|
||||
|
199
pom.xml
Normal file
199
pom.xml
Normal file
|
@ -0,0 +1,199 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>net.thauvin.erik.mobibot</groupId>
|
||||
<artifactId>mobibot</artifactId>
|
||||
<version>0.8.0-rc+20250424113056</version>
|
||||
<name>mobibot</name>
|
||||
<description></description>
|
||||
<url></url>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.github.pircbotx</groupId>
|
||||
<artifactId>pircbotx</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.17.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>1.13.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.18.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-net</groupId>
|
||||
<artifactId>commons-net</artifactId>
|
||||
<version>3.11.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.13.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>33.2.1-jre</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib</artifactId>
|
||||
<version>2.1.20</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-common</artifactId>
|
||||
<version>2.1.20</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk7</artifactId>
|
||||
<version>2.1.20</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-stdlib-jdk8</artifactId>
|
||||
<version>2.1.20</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlinx</groupId>
|
||||
<artifactId>kotlinx-coroutines-core</artifactId>
|
||||
<version>1.10.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlinx</groupId>
|
||||
<artifactId>kotlinx-cli-jvm</artifactId>
|
||||
<version>0.3.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>2.0.17</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>2.24.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>2.24.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-slf4j2-impl</artifactId>
|
||||
<version>2.24.3</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.langchain4j</groupId>
|
||||
<artifactId>langchain4j-open-ai</artifactId>
|
||||
<version>0.36.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.langchain4j</groupId>
|
||||
<artifactId>langchain4j-google-ai-gemini</artifactId>
|
||||
<version>0.36.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.langchain4j</groupId>
|
||||
<artifactId>langchain4j-core</artifactId>
|
||||
<version>0.36.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>dev.langchain4j</groupId>
|
||||
<artifactId>langchain4j</artifactId>
|
||||
<version>0.36.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.rometools</groupId>
|
||||
<artifactId>rome</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
<version>4.12.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.aksingh</groupId>
|
||||
<artifactId>owm-japis</artifactId>
|
||||
<version>2.5.3.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.objecthunter</groupId>
|
||||
<artifactId>exp4j</artifactId>
|
||||
<version>0.4.8</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.json</groupId>
|
||||
<artifactId>json</artifactId>
|
||||
<version>20250107</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.19.1</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.thauvin.erik</groupId>
|
||||
<artifactId>cryptoprice</artifactId>
|
||||
<version>1.0.3-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.thauvin.erik</groupId>
|
||||
<artifactId>jokeapi</artifactId>
|
||||
<version>1.0.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.thauvin.erik</groupId>
|
||||
<artifactId>pinboard-poster</artifactId>
|
||||
<version>1.2.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.thauvin.erik.urlencoder</groupId>
|
||||
<artifactId>urlencoder-lib-jvm</artifactId>
|
||||
<version>1.6.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
38
properties/log4j2.xml
Normal file
38
properties/log4j2.xml
Normal file
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="warn">
|
||||
<Appenders>
|
||||
<Console name="stderr" target="SYSTEM_ERR">
|
||||
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
|
||||
</Console>
|
||||
<Console name="input" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d{UNIX_MILLIS} %msg%n"/>
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
</Console>
|
||||
<Console name="output" target="SYSTEM_OUT">
|
||||
<PatternLayout pattern="%d{UNIX_MILLIS} >>>%msg%n"/>
|
||||
<Filters>
|
||||
<ThresholdFilter level="warn" onMatch="DENY" onMismatch="NEUTRAL"/>
|
||||
<ThresholdFilter level="debug" onMatch="ACCEPT" onMismatch="DENY"/>
|
||||
</Filters>
|
||||
</Console>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="warn" additivity="false">
|
||||
<AppenderRef ref="stderr"/>
|
||||
</Root>
|
||||
<logger level="debug" name="org.pircbotx.InputParser" additivity="false">
|
||||
<appender-ref ref="input"/>
|
||||
<appender-ref ref="stderr" level="warn"/>
|
||||
</logger>
|
||||
<logger level="debug" name="org.pircbotx.output.OutputRaw" additivity="false">
|
||||
<appender-ref ref="output"/>
|
||||
<appender-ref ref="stderr" level="warn"/>
|
||||
</logger>
|
||||
<logger level="warn" name="net.thauvin.erik.mobibot" additivity="false">
|
||||
<appender-ref ref="stderr"/>
|
||||
</logger>
|
||||
</Loggers>
|
||||
</Configuration>
|
86
properties/mobibot.properties
Normal file
86
properties/mobibot.properties
Normal file
|
@ -0,0 +1,86 @@
|
|||
channel=#mobitopia
|
||||
server=irc.libera.chat
|
||||
#port=6667
|
||||
login=mobibot
|
||||
nick=mobibot
|
||||
#realname=mobibot
|
||||
|
||||
# Die command password, if any
|
||||
#die=changeme
|
||||
|
||||
# NickServ password
|
||||
ident=changeme
|
||||
#ident-nick=nickserv
|
||||
#ident-msg=IDENTIFY changepwd
|
||||
|
||||
logs=./logs
|
||||
ignore=chanserv,nickserv
|
||||
tags=mobile mobitopia
|
||||
tags-keywords=android ios apple google
|
||||
|
||||
feed=http://www.mobitopia.org/rss.xml
|
||||
backlogs=http://www.mobitopia.org/mobibot/logs
|
||||
|
||||
tell-max-days=5
|
||||
tell-max-size=50
|
||||
|
||||
#disabled-commands=die, ignore
|
||||
disabled-modules=mastodon
|
||||
|
||||
#
|
||||
# API Token for: https://pinboard.in/settings/password
|
||||
#
|
||||
#pinboard-api-token=user\:TOKEN
|
||||
|
||||
#
|
||||
# Create a Mastodon application access token at: https//SERVER_INSTANCE/settings/applications
|
||||
# Make sure the 'write:statuses' scope is enabled.
|
||||
#
|
||||
#mastodon-access-token=
|
||||
#mastodon-instance=mastodon.social
|
||||
|
||||
# Mastodon handle to receive channel join/leave notifications
|
||||
#mastodon-handle=@mobitopia
|
||||
|
||||
# Automatically post links to Mastodon
|
||||
#mastodon-auto-post=true
|
||||
|
||||
#
|
||||
# Get Exchange Rate API key from: https://www.exchangerate-api.com/
|
||||
#
|
||||
#exchangerate-api-key=
|
||||
|
||||
#
|
||||
# Create custom search engine at: https://programmablesearchengine.google.com/
|
||||
# and get API key from: https://console.cloud.google.com/apis
|
||||
#
|
||||
#google-api=
|
||||
#google-cse-cx=
|
||||
|
||||
#
|
||||
# Get OpenWeatherMap API key from: https://openweathermap.org/api
|
||||
#
|
||||
#owm-api-key=
|
||||
|
||||
#
|
||||
# Get Alpha Vantage Stock Quote API key from: https://www.alphavantage.co/support/#api-key
|
||||
#
|
||||
#alphavantage-api-key=
|
||||
|
||||
#
|
||||
# Get Wolfram Alpha AppID from: https://developer.wolframalpha.com/portal/
|
||||
#
|
||||
#wolfram-appid=
|
||||
#wolfram-units=imperial
|
||||
|
||||
#
|
||||
# Get ChatGPT/OpenAI API key from: https://platform.openai.com/api-keys
|
||||
#
|
||||
#chatgpt-api-key=
|
||||
#chatgpt-max-tokens=1024
|
||||
|
||||
#
|
||||
# Get Google Gemini API key from https://ai.google.dev/gemini-api/docs/api-key
|
||||
#
|
||||
#gemini-api-key=
|
||||
#gemini-max-tokens=1024
|
28
release_info.txt
Normal file
28
release_info.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* This file is automatically generated
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
|
||||
package {{v packageName/}}
|
||||
|
||||
import java.time.Instant
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneId
|
||||
|
||||
/**
|
||||
* Provides release information.
|
||||
*/
|
||||
object {{v className/}} {
|
||||
const val PROJECT = "{{v project/}}"
|
||||
const val VERSION = "{{v version/}}"
|
||||
|
||||
@JvmField
|
||||
@Suppress("MagicNumber")
|
||||
val BUILD_DATE: LocalDateTime = LocalDateTime.ofInstant(
|
||||
Instant.ofEpochMilli({{v epoch/}}L), ZoneId.systemDefault()
|
||||
)
|
||||
|
||||
const val WEBSITE = "https://mobitopia.org/mobibot/"
|
||||
const val AUTHOR = "Erik C. Thauvin"
|
||||
const val AUTHOR_URL = "https://erik.thauvin.net/"
|
||||
}
|
7
sonar-project.properties
Normal file
7
sonar-project.properties
Normal file
|
@ -0,0 +1,7 @@
|
|||
sonar.organization=ethauvin-github
|
||||
sonar.projectKey=ethauvin_mobibot
|
||||
sonar.coverage.jacoco.xmlReportPaths=build/reports/jacoco/test/jacocoTestReport.xml
|
||||
sonar.sources=src/main/kotlin/
|
||||
sonar.tests=src/test/kotlin/
|
||||
sonar.java.binaries=build/main,build/test
|
||||
sonar.java.libraries=lib/compile/*.jar
|
238
src/bld/java/net/thauvin/erik/MobibotBuild.java
Normal file
238
src/bld/java/net/thauvin/erik/MobibotBuild.java
Normal file
|
@ -0,0 +1,238 @@
|
|||
/*
|
||||
* MobibotBuild.java
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik;
|
||||
|
||||
import rife.bld.BuildCommand;
|
||||
import rife.bld.Project;
|
||||
import rife.bld.dependencies.Repository;
|
||||
import rife.bld.extension.CompileKotlinOperation;
|
||||
import rife.bld.extension.DetektOperation;
|
||||
import rife.bld.extension.GeneratedVersionOperation;
|
||||
import rife.bld.extension.JacocoReportOperation;
|
||||
import rife.bld.extension.kotlin.CompileOptions;
|
||||
import rife.bld.operations.exceptions.ExitStatusException;
|
||||
import rife.bld.publish.PomBuilder;
|
||||
import rife.tools.FileUtils;
|
||||
import rife.tools.exceptions.FileUtilsErrorException;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.jar.Attributes;
|
||||
import java.util.logging.ConsoleHandler;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import static rife.bld.dependencies.Repository.*;
|
||||
import static rife.bld.dependencies.Scope.compile;
|
||||
import static rife.bld.dependencies.Scope.test;
|
||||
|
||||
public class MobibotBuild extends Project {
|
||||
private static final String DETEKT_BASELINE = "config/detekt/baseline.xml";
|
||||
final File srcMainKotlin = new File(srcMainDirectory(), "kotlin");
|
||||
|
||||
public MobibotBuild() {
|
||||
pkg = "net.thauvin.erik.mobibot";
|
||||
name = "mobibot";
|
||||
version = version(0, 8, 0, "rc+" +
|
||||
DateTimeFormatter.ofPattern("yyyyMMddHHmmss").format(LocalDateTime.now()));
|
||||
|
||||
mainClass = pkg + ".Mobibot";
|
||||
|
||||
javaRelease = 17;
|
||||
downloadSources = true;
|
||||
autoDownloadPurge = true;
|
||||
repositories = List.of(
|
||||
MAVEN_LOCAL,
|
||||
MAVEN_CENTRAL,
|
||||
new Repository("https://jitpack.io"),
|
||||
SONATYPE_SNAPSHOTS_LEGACY);
|
||||
|
||||
var log4j = version(2, 24, 3);
|
||||
var kotlin = version(2, 1, 20);
|
||||
var langchain = version(0, 36, 2);
|
||||
scope(compile)
|
||||
// PircBotX
|
||||
.include(dependency("com.github.pircbotx", "pircbotx", "2.3.1"))
|
||||
// Commons (mostly for PircBotX)
|
||||
.include(dependency("org.apache.commons", "commons-lang3", "3.17.0"))
|
||||
.include(dependency("org.apache.commons", "commons-text", "1.13.1"))
|
||||
.include(dependency("commons-codec", "commons-codec", "1.18.0"))
|
||||
.include(dependency("commons-net", "commons-net", "3.11.1"))
|
||||
// Google
|
||||
.include(dependency("com.google.code.gson", "gson", "2.13.1"))
|
||||
.include(dependency("com.google.guava", "guava", "33.2.1-jre"))
|
||||
// Kotlin
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib", kotlin))
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-common", kotlin))
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk7", kotlin))
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-stdlib-jdk8", kotlin))
|
||||
.include(dependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core", "1.10.2"))
|
||||
.include(dependency("org.jetbrains.kotlinx", "kotlinx-cli-jvm", "0.3.6"))
|
||||
// Logging
|
||||
.include(dependency("org.slf4j", "slf4j-api", "2.0.17"))
|
||||
.include(dependency("org.apache.logging.log4j", "log4j-api", log4j))
|
||||
.include(dependency("org.apache.logging.log4j", "log4j-core", log4j))
|
||||
.include(dependency("org.apache.logging.log4j", "log4j-slf4j2-impl", log4j))
|
||||
// LangChain4J
|
||||
.include(dependency("dev.langchain4j", "langchain4j-open-ai", langchain))
|
||||
.include(dependency("dev.langchain4j", "langchain4j-google-ai-gemini", langchain))
|
||||
.include(dependency("dev.langchain4j", "langchain4j-core", langchain))
|
||||
.include(dependency("dev.langchain4j", "langchain4j", langchain))
|
||||
// Misc.
|
||||
.include(dependency("com.rometools", "rome", "2.1.0"))
|
||||
.include(dependency("com.squareup.okhttp3", "okhttp", "4.12.0"))
|
||||
.include(dependency("net.aksingh", "owm-japis", "2.5.3.0"))
|
||||
.include(dependency("net.objecthunter", "exp4j", "0.4.8"))
|
||||
.include(dependency("org.json", "json", "20250107"))
|
||||
.include(dependency("org.jsoup", "jsoup", "1.19.1"))
|
||||
// Thauvin
|
||||
.include(dependency("net.thauvin.erik", "cryptoprice", "1.0.3-SNAPSHOT"))
|
||||
.include(dependency("net.thauvin.erik", "jokeapi", "1.0.1-SNAPSHOT"))
|
||||
.include(dependency("net.thauvin.erik", "pinboard-poster", "1.2.1-SNAPSHOT"))
|
||||
.include(dependency("net.thauvin.erik.urlencoder", "urlencoder-lib-jvm", "1.6.0"));
|
||||
scope(test)
|
||||
.include(dependency("com.willowtreeapps.assertk", "assertk-jvm", version(0, 28, 1)))
|
||||
.include(dependency("org.jetbrains.kotlin", "kotlin-test-junit5", kotlin))
|
||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 12, 2)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 12, 2)))
|
||||
.include(dependency("org.junit.platform", "junit-platform-launcher", version(1, 12, 2)));
|
||||
|
||||
List<String> jars = new ArrayList<>();
|
||||
runtimeClasspathJars().forEach(f -> jars.add("./lib/" + f.getName()));
|
||||
compileClasspathJars().forEach(f -> jars.add("./lib/" + f.getName()));
|
||||
jarOperation()
|
||||
.manifestAttribute(Attributes.Name.MAIN_CLASS, mainClass())
|
||||
.manifestAttribute(Attributes.Name.CLASS_PATH, ". " + String.join(" ", jars));
|
||||
|
||||
jarSourcesOperation().sourceDirectories(srcMainKotlin);
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
var level = Level.ALL;
|
||||
var logger = Logger.getLogger("rife.bld.extension");
|
||||
var consoleHandler = new ConsoleHandler();
|
||||
|
||||
consoleHandler.setLevel(level);
|
||||
logger.addHandler(consoleHandler);
|
||||
logger.setLevel(level);
|
||||
logger.setUseParentHandlers(false);
|
||||
|
||||
new MobibotBuild().start(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clean() throws Exception {
|
||||
var deploy = new File("deploy");
|
||||
if (deploy.exists()) {
|
||||
FileUtils.deleteDirectory(deploy);
|
||||
}
|
||||
super.clean();
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Compiles the Kotlin project")
|
||||
@Override
|
||||
public void compile() throws Exception {
|
||||
releaseInfo();
|
||||
new CompileKotlinOperation()
|
||||
.compileOptions(new CompileOptions().progressive(true).verbose(true))
|
||||
.fromProject(this)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updates() throws Exception {
|
||||
super.updates();
|
||||
pomRoot();
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Copies all needed files to the deploy directory")
|
||||
public void deploy() throws FileUtilsErrorException {
|
||||
var deploy = new File("deploy");
|
||||
var lib = new File(deploy, "lib");
|
||||
var ignore = lib.mkdirs();
|
||||
FileUtils.copyDirectory(new File("properties"), deploy);
|
||||
for (var jar : compileClasspathJars()) {
|
||||
FileUtils.copy(jar, new File(lib, jar.getName()));
|
||||
}
|
||||
for (var jar : runtimeClasspathJars()) {
|
||||
FileUtils.copy(jar, new File(lib, jar.getName()));
|
||||
}
|
||||
FileUtils.copy(new File(buildDistDirectory(), jarFileName()), new File(deploy, "mobibot.jar"));
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Checks source with Detekt")
|
||||
public void detekt() throws ExitStatusException, IOException, InterruptedException {
|
||||
new DetektOperation()
|
||||
.fromProject(this)
|
||||
.baseline(DETEKT_BASELINE)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(value = "detekt-baseline", summary = "Creates the Detekt baseline")
|
||||
public void detektBaseline() throws ExitStatusException, IOException, InterruptedException {
|
||||
new DetektOperation()
|
||||
.fromProject(this)
|
||||
.baseline(DETEKT_BASELINE)
|
||||
.createBaseline(true)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(summary = "Generates JaCoCo Reports")
|
||||
public void jacoco() throws Exception {
|
||||
new JacocoReportOperation()
|
||||
.fromProject(this)
|
||||
.sourceFiles(srcMainKotlin)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@BuildCommand(value = "pom-root", summary = "Generates the POM file in the root directory")
|
||||
public void pomRoot() throws FileUtilsErrorException {
|
||||
PomBuilder.generateInto(publishOperation().fromProject(this).info(), dependencies(),
|
||||
new File(workDirectory, "pom.xml"));
|
||||
}
|
||||
|
||||
@BuildCommand(value = "release-info", summary = "Generates the ReleaseInfo class")
|
||||
public void releaseInfo() throws Exception {
|
||||
new GeneratedVersionOperation()
|
||||
.fromProject(this)
|
||||
.classTemplate(new File(workDirectory(), "release-info.txt"))
|
||||
.className("ReleaseInfo")
|
||||
.packageName(pkg)
|
||||
.directory(srcMainKotlin)
|
||||
.extension(".kt")
|
||||
.execute();
|
||||
}
|
||||
}
|
190
src/main/kotlin/net/thauvin/erik/mobibot/Addons.kt
Normal file
190
src/main/kotlin/net/thauvin/erik/mobibot/Addons.kt
Normal file
|
@ -0,0 +1,190 @@
|
|||
/*
|
||||
* Addons.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.thauvin.erik.mobibot
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.notContains
|
||||
import net.thauvin.erik.mobibot.commands.AbstractCommand
|
||||
import net.thauvin.erik.mobibot.commands.links.LinksManager
|
||||
import net.thauvin.erik.mobibot.modules.AbstractModule
|
||||
import org.pircbotx.hooks.events.PrivateMessageEvent
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Modules and Commands addons.
|
||||
*/
|
||||
class Addons(private val props: Properties) {
|
||||
private val logger: Logger = LoggerFactory.getLogger(Addons::class.java)
|
||||
private val disabledModules = props.getProperty("disabled-modules", "").split(LinksManager.TAG_MATCH)
|
||||
private val disableCommands = props.getProperty("disabled-commands", "").split(LinksManager.TAG_MATCH)
|
||||
|
||||
val commands: MutableList<AbstractCommand> = mutableListOf()
|
||||
val modules: MutableList<AbstractModule> = mutableListOf()
|
||||
val names = Names
|
||||
|
||||
/**
|
||||
* Add a module with properties.
|
||||
*/
|
||||
fun add(module: AbstractModule): Boolean {
|
||||
var enabled = false
|
||||
with(module) {
|
||||
if (disabledModules.notContains(name, true)) {
|
||||
if (hasProperties()) {
|
||||
propertyKeys.forEach {
|
||||
setProperty(it, props.getProperty(it, ""))
|
||||
}
|
||||
}
|
||||
|
||||
if (isEnabled) {
|
||||
modules.add(this)
|
||||
names.modules.add(name)
|
||||
names.commands.addAll(commands)
|
||||
enabled = true
|
||||
} else {
|
||||
if (logger.isDebugEnabled) {
|
||||
logger.debug("Module $name is disabled.")
|
||||
}
|
||||
names.disabledModules.add(name)
|
||||
}
|
||||
} else {
|
||||
names.disabledModules.add(name)
|
||||
}
|
||||
}
|
||||
return enabled
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a command with properties.
|
||||
*/
|
||||
fun add(command: AbstractCommand): Boolean {
|
||||
var enabled = false
|
||||
with(command) {
|
||||
if (disableCommands.notContains(name, true)) {
|
||||
if (properties.isNotEmpty()) {
|
||||
properties.keys.forEach {
|
||||
setProperty(it, props.getProperty(it, ""))
|
||||
}
|
||||
}
|
||||
if (isEnabled()) {
|
||||
commands.add(this)
|
||||
if (isVisible) {
|
||||
if (isOpOnly) {
|
||||
names.ops.add(name)
|
||||
} else {
|
||||
names.commands.add(name)
|
||||
}
|
||||
}
|
||||
enabled = true
|
||||
} else {
|
||||
if (logger.isDebugEnabled) {
|
||||
logger.debug("Command $name is disabled.")
|
||||
}
|
||||
names.disabledCommands.add(name)
|
||||
}
|
||||
} else {
|
||||
names.disabledCommands.add(name)
|
||||
}
|
||||
}
|
||||
return enabled
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute a command or module.
|
||||
*/
|
||||
fun exec(channel: String, cmd: String, args: String, event: GenericMessageEvent): Boolean {
|
||||
val cmds = if (event is PrivateMessageEvent) commands else commands.filter { it.isPublic }
|
||||
for (command in cmds) {
|
||||
if (command.name.startsWith(cmd)) {
|
||||
command.commandResponse(channel, args, event)
|
||||
return true
|
||||
}
|
||||
}
|
||||
val mods = if (event is PrivateMessageEvent) modules.filter { it.isPrivateMsgEnabled } else modules
|
||||
for (module in mods) {
|
||||
if (module.commands.contains(cmd)) {
|
||||
module.commandResponse(channel, cmd, args, event)
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Match a command.
|
||||
*/
|
||||
fun match(channel: String, event: GenericMessageEvent): Boolean {
|
||||
for (command in commands) {
|
||||
if (command.matches(event.message)) {
|
||||
command.commandResponse(channel, event.message, event)
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Commands and Modules help.
|
||||
*/
|
||||
fun help(channel: String, topic: String, event: GenericMessageEvent): Boolean {
|
||||
for (command in commands) {
|
||||
if (command.isVisible && command.name.startsWith(topic)) {
|
||||
return command.helpResponse(channel, topic, event)
|
||||
}
|
||||
}
|
||||
for (module in modules) {
|
||||
if (module.commands.contains(topic)) {
|
||||
return module.helpResponse(event)
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds commands and modules names.
|
||||
*/
|
||||
object Names {
|
||||
val modules: MutableList<String> = mutableListOf()
|
||||
val disabledModules: MutableList<String> = mutableListOf()
|
||||
val commands: MutableList<String> = mutableListOf()
|
||||
val disabledCommands: MutableList<String> = mutableListOf()
|
||||
val ops: MutableList<String> = mutableListOf()
|
||||
|
||||
fun sort() {
|
||||
modules.sort()
|
||||
disabledModules.sort()
|
||||
commands.sort()
|
||||
disabledCommands.sort()
|
||||
ops.sort()
|
||||
}
|
||||
}
|
||||
}
|
101
src/main/kotlin/net/thauvin/erik/mobibot/Constants.kt
Normal file
101
src/main/kotlin/net/thauvin/erik/mobibot/Constants.kt
Normal file
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
* Constants.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.thauvin.erik.mobibot
|
||||
|
||||
/**
|
||||
* The `Constants`.
|
||||
*/
|
||||
object Constants {
|
||||
/**
|
||||
* The connect/read timeout in ms.
|
||||
*/
|
||||
const val CONNECT_TIMEOUT = 5000
|
||||
|
||||
/**
|
||||
* Debug command line argument.
|
||||
*/
|
||||
const val DEBUG_ARG = "debug"
|
||||
|
||||
/**
|
||||
* Default IRC Port.
|
||||
*/
|
||||
const val DEFAULT_PORT = 6667
|
||||
|
||||
/**
|
||||
* Default IRC Server.
|
||||
*/
|
||||
const val DEFAULT_SERVER = "irc.libera.chat"
|
||||
|
||||
/**
|
||||
* CLI command for usage.
|
||||
*/
|
||||
const val CLI_CMD = "java -jar ${ReleaseInfo.PROJECT}.jar"
|
||||
|
||||
/**
|
||||
* User-Agent
|
||||
*/
|
||||
const val USER_AGENT = "Mozilla/5.0 (X11; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0"
|
||||
|
||||
/**
|
||||
* The help command.
|
||||
*/
|
||||
const val HELP_CMD = "help"
|
||||
|
||||
/**
|
||||
* The link command.
|
||||
*/
|
||||
const val LINK_CMD = "L"
|
||||
|
||||
/**
|
||||
* The empty title string.
|
||||
*/
|
||||
const val NO_TITLE = "No Title"
|
||||
|
||||
/**
|
||||
* Properties command line argument.
|
||||
*/
|
||||
const val PROPS_ARG = "properties"
|
||||
|
||||
/**
|
||||
* The tag command
|
||||
*/
|
||||
const val TAG_CMD = "T"
|
||||
|
||||
/**
|
||||
* The timer delay in minutes.
|
||||
*/
|
||||
const val TIMER_DELAY = 10L
|
||||
|
||||
/**
|
||||
* Properties version line argument.
|
||||
*/
|
||||
const val VERSION_ARG = "version"
|
||||
}
|
92
src/main/kotlin/net/thauvin/erik/mobibot/FeedReader.kt
Normal file
92
src/main/kotlin/net/thauvin/erik/mobibot/FeedReader.kt
Normal file
|
@ -0,0 +1,92 @@
|
|||
/*
|
||||
* FeedReader.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.thauvin.erik.mobibot
|
||||
|
||||
import com.rometools.rome.io.FeedException
|
||||
import com.rometools.rome.io.SyndFeedInput
|
||||
import com.rometools.rome.io.XmlReader
|
||||
import net.thauvin.erik.mobibot.Utils.green
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.sendMessage
|
||||
import net.thauvin.erik.mobibot.entries.FeedsManager
|
||||
import net.thauvin.erik.mobibot.msg.Message
|
||||
import net.thauvin.erik.mobibot.msg.NoticeMessage
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.io.IOException
|
||||
import java.net.URL
|
||||
|
||||
/**
|
||||
* Reads an RSS feed.
|
||||
*/
|
||||
class FeedReader(private val url: String, val event: GenericMessageEvent) : Runnable {
|
||||
private val logger: Logger = LoggerFactory.getLogger(FeedsManager::class.java)
|
||||
|
||||
/**
|
||||
* Fetches the Feed's items.
|
||||
*/
|
||||
override fun run() {
|
||||
try {
|
||||
readFeed(url).forEach {
|
||||
event.sendMessage("", it)
|
||||
}
|
||||
} catch (e: FeedException) {
|
||||
if (logger.isWarnEnabled) logger.warn("Unable to parse the feed at $url", e)
|
||||
event.sendMessage("An error has occurred while parsing the feed: ${e.message}")
|
||||
} catch (e: IOException) {
|
||||
if (logger.isWarnEnabled) logger.warn("Unable to fetch the feed at $url", e)
|
||||
event.sendMessage("An IO error has occurred while fetching the feed: ${e.message}")
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
@Throws(FeedException::class, IOException::class)
|
||||
fun readFeed(url: String, maxItems: Int = 5): List<Message> {
|
||||
val messages = mutableListOf<Message>()
|
||||
val input = SyndFeedInput()
|
||||
XmlReader(URL(url).openStream()).use { reader ->
|
||||
val feed = input.build(reader)
|
||||
val items = feed.entries
|
||||
if (items.isEmpty()) {
|
||||
messages.add(NoticeMessage("There is currently nothing to view."))
|
||||
} else {
|
||||
items.take(maxItems).forEach {
|
||||
messages.add(NoticeMessage(it.title))
|
||||
messages.add(NoticeMessage(helpFormat(it.link.green(), false)))
|
||||
}
|
||||
}
|
||||
}
|
||||
return messages
|
||||
}
|
||||
}
|
||||
}
|
420
src/main/kotlin/net/thauvin/erik/mobibot/Mobibot.kt
Normal file
420
src/main/kotlin/net/thauvin/erik/mobibot/Mobibot.kt
Normal file
|
@ -0,0 +1,420 @@
|
|||
/*
|
||||
* Mobibot.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot
|
||||
|
||||
import kotlinx.cli.ArgParser
|
||||
import kotlinx.cli.ArgType
|
||||
import kotlinx.cli.default
|
||||
import net.thauvin.erik.mobibot.Utils.appendIfMissing
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.capitalise
|
||||
import net.thauvin.erik.mobibot.Utils.getIntProperty
|
||||
import net.thauvin.erik.mobibot.Utils.helpCmdSyntax
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import net.thauvin.erik.mobibot.Utils.lastOrEmpty
|
||||
import net.thauvin.erik.mobibot.Utils.sendList
|
||||
import net.thauvin.erik.mobibot.Utils.sendMessage
|
||||
import net.thauvin.erik.mobibot.Utils.toIsoLocalDate
|
||||
import net.thauvin.erik.mobibot.commands.*
|
||||
import net.thauvin.erik.mobibot.commands.Recap.Companion.storeRecap
|
||||
import net.thauvin.erik.mobibot.commands.links.*
|
||||
import net.thauvin.erik.mobibot.commands.seen.Seen
|
||||
import net.thauvin.erik.mobibot.commands.tell.Tell
|
||||
import net.thauvin.erik.mobibot.modules.*
|
||||
import org.pircbotx.Configuration
|
||||
import org.pircbotx.PircBotX
|
||||
import org.pircbotx.hooks.ListenerAdapter
|
||||
import org.pircbotx.hooks.events.*
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.io.*
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
import java.util.*
|
||||
import java.util.regex.Pattern
|
||||
import kotlin.system.exitProcess
|
||||
|
||||
class Mobibot(nickname: String, val channel: String, logsDirPath: String, p: Properties) : ListenerAdapter() {
|
||||
// The bot configuration.
|
||||
private val config: Configuration
|
||||
|
||||
// Commands and Modules
|
||||
private val addons: Addons
|
||||
|
||||
// Seen command
|
||||
private val seen: Seen
|
||||
|
||||
// Tell command
|
||||
private val tell: Tell
|
||||
|
||||
/** Logger. */
|
||||
val logger: Logger = LoggerFactory.getLogger(Mobibot::class.java)
|
||||
|
||||
/**
|
||||
* Connects to the server and joins the channel.
|
||||
*/
|
||||
fun connect() {
|
||||
PircBotX(config).startBot()
|
||||
}
|
||||
|
||||
/**
|
||||
* Responds with the default help.
|
||||
*/
|
||||
private fun helpDefault(event: GenericMessageEvent) {
|
||||
event.sendMessage("Type a URL on $channel to post it.")
|
||||
event.sendMessage("For more information on a specific command, type:")
|
||||
event.sendMessage(
|
||||
helpFormat(
|
||||
helpCmdSyntax("%c ${Constants.HELP_CMD} <command>", event.bot().nick, event is PrivateMessageEvent)
|
||||
)
|
||||
)
|
||||
event.sendMessage("The commands are:")
|
||||
event.sendList(addons.names.commands, 8, isBold = true, isIndent = true)
|
||||
if (event.isChannelOp(channel)) {
|
||||
if (addons.names.disabledCommands.isNotEmpty()) {
|
||||
event.sendMessage("The disabled commands are:")
|
||||
event.sendList(addons.names.disabledCommands, 8, isBold = false, isIndent = true)
|
||||
}
|
||||
event.sendMessage("The op commands are:")
|
||||
event.sendList(addons.names.ops, 8, isBold = true, isIndent = true)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Responds with the default, commands or modules help.
|
||||
*/
|
||||
private fun helpResponse(event: GenericMessageEvent, topic: String) {
|
||||
if (topic.isBlank() || !addons.help(channel, topic.lowercase().trim(), event)) {
|
||||
helpDefault(event)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onAction(event: ActionEvent?) {
|
||||
event?.channel?.let {
|
||||
if (channel == it.name) {
|
||||
event.user?.let { user ->
|
||||
storeRecap(user.nick, event.action, true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onDisconnect(event: DisconnectEvent?) {
|
||||
event?.let {
|
||||
with(event.getBot<PircBotX>()) {
|
||||
LinksManager.socialManager.notification("$nick disconnected from $serverHostname")
|
||||
seen.add(userChannelDao.getChannel(channel).users)
|
||||
}
|
||||
}
|
||||
LinksManager.socialManager.shutdown()
|
||||
}
|
||||
|
||||
override fun onPrivateMessage(event: PrivateMessageEvent?) {
|
||||
event?.user?.let { user ->
|
||||
if (logger.isTraceEnabled) logger.trace("<<< ${user.nick}: ${event.message}")
|
||||
val cmds = event.message.trim().split(" ".toRegex(), 2)
|
||||
val cmd = cmds[0].lowercase()
|
||||
val args = cmds.lastOrEmpty().trim()
|
||||
if (cmd.startsWith(Constants.HELP_CMD)) { // help
|
||||
helpResponse(event, args)
|
||||
} else if (!addons.exec(channel, cmd, args, event)) { // Execute command or module
|
||||
helpDefault(event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onJoin(event: JoinEvent?) {
|
||||
event?.user?.let { user ->
|
||||
with(event.getBot<PircBotX>()) {
|
||||
if (user.nick == nick) {
|
||||
LinksManager.socialManager.notification(
|
||||
"$nick has joined ${event.channel.name} on $serverHostname"
|
||||
)
|
||||
seen.add(userChannelDao.getChannel(channel).users)
|
||||
} else {
|
||||
tell.send(event)
|
||||
seen.add(user.nick)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onMessage(event: MessageEvent?) {
|
||||
event?.user?.let { user ->
|
||||
tell.send(event)
|
||||
if (event.message.matches("(?i)${Pattern.quote(event.bot().nick)}:.*".toRegex())) { // mobibot: <command>
|
||||
if (logger.isTraceEnabled) logger.trace(">>> ${user.nick}: ${event.message}")
|
||||
val cmds = event.message.substring(event.bot().nick.length + 1).trim().split(" ".toRegex(), 2)
|
||||
val cmd = cmds[0].lowercase()
|
||||
val args = cmds.lastOrEmpty().trim()
|
||||
if (cmd.startsWith(Constants.HELP_CMD)) { // mobibot: help
|
||||
helpResponse(event, args)
|
||||
} else {
|
||||
// Execute module or command
|
||||
addons.exec(channel, cmd, args, event)
|
||||
}
|
||||
} else if (addons.match(channel, event)) { // Links, e.g.: https://www.example.com/ or L1: , etc.
|
||||
if (logger.isTraceEnabled) logger.trace(">>> ${user.nick}: ${event.message}")
|
||||
}
|
||||
storeRecap(user.nick, event.message, false)
|
||||
seen.add(user.nick)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onNickChange(event: NickChangeEvent?) {
|
||||
event?.let {
|
||||
tell.send(event)
|
||||
if (!it.oldNick.equals(it.newNick, true)) {
|
||||
seen.add(it.oldNick)
|
||||
}
|
||||
seen.add(it.newNick)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onPart(event: PartEvent?) {
|
||||
event?.user?.let { user ->
|
||||
with(event.getBot<PircBotX>()) {
|
||||
if (user.nick == nick) {
|
||||
LinksManager.socialManager.notification(
|
||||
"$nick has left ${event.channel.name} on $serverHostname"
|
||||
)
|
||||
seen.add(userChannelDao.getChannel(channel).users)
|
||||
} else {
|
||||
seen.add(user.nick)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onQuit(event: QuitEvent?) {
|
||||
event?.user?.let { user ->
|
||||
seen.add(user.nick)
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
@JvmStatic
|
||||
@Throws(Exception::class)
|
||||
fun main(args: Array<String>) {
|
||||
// Set up the command line options
|
||||
val parser = ArgParser(Constants.CLI_CMD)
|
||||
val debug by parser.option(
|
||||
ArgType.Boolean,
|
||||
Constants.DEBUG_ARG,
|
||||
Constants.DEBUG_ARG.substring(0, 1),
|
||||
"Print debug & logging data directly to the console"
|
||||
).default(false)
|
||||
val property by parser.option(
|
||||
ArgType.String,
|
||||
Constants.PROPS_ARG,
|
||||
Constants.PROPS_ARG.substring(0, 1),
|
||||
"Use alternate properties file"
|
||||
).default("./${ReleaseInfo.PROJECT}.properties")
|
||||
val version by parser.option(
|
||||
ArgType.Boolean,
|
||||
Constants.VERSION_ARG,
|
||||
Constants.VERSION_ARG.substring(0, 1),
|
||||
"Print version info"
|
||||
).default(false)
|
||||
|
||||
// Parse the command line
|
||||
parser.parse(args)
|
||||
|
||||
if (version) {
|
||||
// Output the version
|
||||
println(
|
||||
"${ReleaseInfo.PROJECT.capitalise()} ${ReleaseInfo.VERSION}" +
|
||||
" (${ReleaseInfo.BUILD_DATE.toIsoLocalDate()})"
|
||||
)
|
||||
println(ReleaseInfo.WEBSITE)
|
||||
} else {
|
||||
// Load the properties
|
||||
val p = Properties()
|
||||
try {
|
||||
Files.newInputStream(
|
||||
Paths.get(property)
|
||||
).use { fis ->
|
||||
p.load(fis)
|
||||
}
|
||||
} catch (ignore: FileNotFoundException) {
|
||||
System.err.println("Unable to find properties file.")
|
||||
exitProcess(1)
|
||||
} catch (ignore: IOException) {
|
||||
System.err.println("Unable to open properties file.")
|
||||
exitProcess(1)
|
||||
}
|
||||
val nickname = p.getProperty("nick", Mobibot::class.java.name.lowercase())
|
||||
val channel = p.getProperty("channel")
|
||||
val logsDir = p.getProperty("logs", ".").appendIfMissing(File.separatorChar)
|
||||
|
||||
// Redirect stdout and stderr
|
||||
if (!debug) {
|
||||
try {
|
||||
val stdout = PrintStream(
|
||||
BufferedOutputStream(
|
||||
FileOutputStream(
|
||||
logsDir + channel.substring(1) + '.' + Utils.today() + ".log", true
|
||||
)
|
||||
), true
|
||||
)
|
||||
System.setOut(stdout)
|
||||
} catch (ignore: IOException) {
|
||||
System.err.println("Unable to open output (stdout) log file.")
|
||||
exitProcess(1)
|
||||
}
|
||||
try {
|
||||
val stderr = PrintStream(
|
||||
BufferedOutputStream(
|
||||
FileOutputStream("$logsDir$nickname.err", true)
|
||||
), true
|
||||
)
|
||||
System.setErr(stderr)
|
||||
} catch (ignore: IOException) {
|
||||
System.err.println("Unable to open error (stderr) log file.")
|
||||
exitProcess(1)
|
||||
}
|
||||
}
|
||||
|
||||
// Start the bot
|
||||
Mobibot(nickname, channel, logsDir, p).connect()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the bot.
|
||||
*/
|
||||
init {
|
||||
val ircServer = p.getProperty("server", Constants.DEFAULT_SERVER)
|
||||
config = Configuration.Builder().apply {
|
||||
name = nickname
|
||||
login = p.getProperty("login", nickname)
|
||||
realName = p.getProperty("realname", nickname)
|
||||
addServer(
|
||||
ircServer,
|
||||
p.getIntProperty("port", Constants.DEFAULT_PORT)
|
||||
)
|
||||
addAutoJoinChannel(channel)
|
||||
addListener(this@Mobibot)
|
||||
version = "${ReleaseInfo.PROJECT} ${ReleaseInfo.VERSION}"
|
||||
isAutoNickChange = true
|
||||
val identPwd = p.getProperty("ident")
|
||||
if (!identPwd.isNullOrBlank()) {
|
||||
nickservPassword = identPwd
|
||||
}
|
||||
val identNick = p.getProperty("ident-nick")
|
||||
if (!identNick.isNullOrBlank()) {
|
||||
nickservNick = identNick
|
||||
}
|
||||
val identMsg = p.getProperty("ident-msg")
|
||||
if (!identMsg.isNullOrBlank()) {
|
||||
nickservCustomMessage = identMsg
|
||||
}
|
||||
isAutoReconnect = true
|
||||
|
||||
//socketConnectTimeout = Constants.CONNECT_TIMEOUT
|
||||
//socketTimeout = Constants.CONNECT_TIMEOUT
|
||||
//messageDelay = StaticDelay(500)
|
||||
}.buildConfiguration()
|
||||
|
||||
// Load the current entries
|
||||
with(LinksManager) {
|
||||
entries.channel = channel
|
||||
entries.ircServer = ircServer
|
||||
entries.logsDir = logsDirPath
|
||||
entries.backlogs = p.getProperty("backlogs", "")
|
||||
entries.load()
|
||||
|
||||
// Set up pinboard
|
||||
pinboard.setApiToken(p.getProperty("pinboard-api-token", ""))
|
||||
}
|
||||
|
||||
addons = Addons(p)
|
||||
|
||||
// Load the commands
|
||||
addons.add(ChannelFeed(channel.removePrefix("#")))
|
||||
addons.add(Comment())
|
||||
addons.add(Cycle())
|
||||
addons.add(Die())
|
||||
addons.add(Ignore())
|
||||
addons.add(LinksManager())
|
||||
addons.add(Me())
|
||||
addons.add(Modules(addons.names.modules, addons.names.disabledModules))
|
||||
addons.add(Msg())
|
||||
addons.add(Nick())
|
||||
addons.add(Posting())
|
||||
addons.add(Recap())
|
||||
addons.add(Say())
|
||||
|
||||
// Seen command
|
||||
seen = Seen("${logsDirPath}${nickname}-seen.ser")
|
||||
addons.add(seen)
|
||||
|
||||
addons.add(Tags())
|
||||
|
||||
// Tell command
|
||||
tell = Tell("${logsDirPath}${nickname}.ser")
|
||||
addons.add(tell)
|
||||
|
||||
addons.add(Users())
|
||||
addons.add(Versions())
|
||||
addons.add(View())
|
||||
|
||||
// Load social modules
|
||||
LinksManager.socialManager.add(addons, Mastodon())
|
||||
|
||||
// Load the modules
|
||||
addons.add(Calc())
|
||||
addons.add(ChatGpt2())
|
||||
addons.add(CryptoPrices())
|
||||
addons.add(CurrencyConverter())
|
||||
addons.add(Dice())
|
||||
addons.add(Gemini2())
|
||||
addons.add(GoogleSearch())
|
||||
addons.add(Info(tell, seen))
|
||||
addons.add(Joke())
|
||||
addons.add(Lookup())
|
||||
addons.add(Ping())
|
||||
addons.add(RockPaperScissors())
|
||||
addons.add(StockQuote())
|
||||
addons.add(War())
|
||||
addons.add(Weather2())
|
||||
addons.add(WolframAlpha())
|
||||
addons.add(WorldTime())
|
||||
|
||||
// Sort the addons
|
||||
addons.names.sort()
|
||||
}
|
||||
}
|
||||
|
113
src/main/kotlin/net/thauvin/erik/mobibot/Pinboard.kt
Normal file
113
src/main/kotlin/net/thauvin/erik/mobibot/Pinboard.kt
Normal file
|
@ -0,0 +1,113 @@
|
|||
/*
|
||||
* Pinboard.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot
|
||||
|
||||
import net.thauvin.erik.mobibot.entries.EntryLink
|
||||
import net.thauvin.erik.pinboard.PinboardPoster
|
||||
import java.time.ZoneId
|
||||
import java.time.ZonedDateTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.time.temporal.ChronoUnit
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Handles posts to pinboard.in.
|
||||
*/
|
||||
class Pinboard {
|
||||
private val poster = PinboardPoster()
|
||||
|
||||
/**
|
||||
* Adds a pin.
|
||||
*/
|
||||
fun addPin(ircServer: String, entry: EntryLink) {
|
||||
if (poster.apiToken.isNotBlank()) {
|
||||
with(entry) {
|
||||
poster.addPin(link, title, postedBy(ircServer), formatTags(), date.toTimestamp())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the pinboard API token.
|
||||
*/
|
||||
fun setApiToken(apiToken: String) {
|
||||
poster.apiToken = apiToken
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pin.
|
||||
*/
|
||||
fun deletePin(entry: EntryLink) {
|
||||
if (poster.apiToken.isNotBlank()) {
|
||||
poster.deletePin(entry.link)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pin.
|
||||
*/
|
||||
fun updatePin(ircServer: String, oldUrl: String, entry: EntryLink) {
|
||||
if (poster.apiToken.isNotBlank()) {
|
||||
with(entry) {
|
||||
if (oldUrl != link) {
|
||||
poster.deletePin(oldUrl)
|
||||
}
|
||||
poster.addPin(link, title, postedBy(ircServer), formatTags(), date.toTimestamp())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats a date to a UTC timestamp.
|
||||
*/
|
||||
private fun Date.toTimestamp(): String {
|
||||
return ZonedDateTime.ofInstant(
|
||||
toInstant().truncatedTo(ChronoUnit.SECONDS), ZoneId.systemDefault()
|
||||
).format(DateTimeFormatter.ISO_INSTANT)
|
||||
}
|
||||
|
||||
/**
|
||||
* Formats the tags for pinboard.
|
||||
*/
|
||||
private fun EntryLink.formatTags(): String {
|
||||
return nick + formatTags(",", ",")
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the pinboard.in extended attribution line.
|
||||
*/
|
||||
private fun EntryLink.postedBy(ircServer: String): String {
|
||||
return "Posted by $nick on $channel ( $ircServer )"
|
||||
}
|
||||
}
|
||||
|
28
src/main/kotlin/net/thauvin/erik/mobibot/ReleaseInfo.kt
Normal file
28
src/main/kotlin/net/thauvin/erik/mobibot/ReleaseInfo.kt
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* This file is automatically generated
|
||||
* Do not modify! -- ALL CHANGES WILL BE ERASED!
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot
|
||||
|
||||
import java.time.Instant
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneId
|
||||
|
||||
/**
|
||||
* Provides release information.
|
||||
*/
|
||||
object ReleaseInfo {
|
||||
const val PROJECT = "mobibot"
|
||||
const val VERSION = "0.8.0-rc+20250322004101"
|
||||
|
||||
@JvmField
|
||||
@Suppress("MagicNumber")
|
||||
val BUILD_DATE: LocalDateTime = LocalDateTime.ofInstant(
|
||||
Instant.ofEpochMilli(1742629261438L), ZoneId.systemDefault()
|
||||
)
|
||||
|
||||
const val WEBSITE = "https://mobitopia.org/mobibot/"
|
||||
const val AUTHOR = "Erik C. Thauvin"
|
||||
const val AUTHOR_URL = "https://erik.thauvin.net/"
|
||||
}
|
447
src/main/kotlin/net/thauvin/erik/mobibot/Utils.kt
Normal file
447
src/main/kotlin/net/thauvin/erik/mobibot/Utils.kt
Normal file
|
@ -0,0 +1,447 @@
|
|||
/*
|
||||
* Utils.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.thauvin.erik.mobibot
|
||||
|
||||
import net.thauvin.erik.mobibot.msg.Message
|
||||
import net.thauvin.erik.mobibot.msg.Message.Companion.DEFAULT_COLOR
|
||||
import net.thauvin.erik.urlencoder.UrlEncoderUtil
|
||||
import org.jsoup.Jsoup
|
||||
import org.pircbotx.Colors
|
||||
import org.pircbotx.PircBotX
|
||||
import org.pircbotx.hooks.events.PrivateMessageEvent
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
import org.slf4j.Logger
|
||||
import java.io.*
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
import java.nio.file.Files
|
||||
import java.nio.file.Paths
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneId
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.*
|
||||
import kotlin.io.path.exists
|
||||
import kotlin.io.path.fileSize
|
||||
|
||||
/**
|
||||
* Miscellaneous utilities.
|
||||
*/
|
||||
@Suppress("TooManyFunctions")
|
||||
object Utils {
|
||||
private val searchFlags = arrayOf("%c", "%n")
|
||||
|
||||
/**
|
||||
* Prepends a prefix if not present.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.prefixIfMissing(prefix: Char): String {
|
||||
return if (first() != prefix) {
|
||||
"$prefix${this}"
|
||||
} else {
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a suffix to the end of the String if not present.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.appendIfMissing(suffix: Char): String {
|
||||
return if (last() != suffix) {
|
||||
"$this${suffix}"
|
||||
} else {
|
||||
this
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the given int bold.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun Int.bold(): String = toString().bold()
|
||||
|
||||
/**
|
||||
* Makes the given long bold.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun Long.bold(): String = toString().bold()
|
||||
|
||||
/**
|
||||
* Makes the given string bold.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String?.bold(): String = colorize(Colors.BOLD)
|
||||
|
||||
/**
|
||||
* Returns the [PircBotX] instance.
|
||||
*/
|
||||
fun GenericMessageEvent.bot(): PircBotX {
|
||||
return getBot() as PircBotX
|
||||
}
|
||||
|
||||
/**
|
||||
* Capitalize a string.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.capitalise(): String = lowercase().replaceFirstChar { it.uppercase() }
|
||||
|
||||
/**
|
||||
* Capitalize words
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.capitalizeWords(): String = split(" ").joinToString(" ") { it.capitalise() }
|
||||
|
||||
/**
|
||||
* Colorize a string.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String?.colorize(color: String): String {
|
||||
return when {
|
||||
isNullOrEmpty() -> {
|
||||
""
|
||||
}
|
||||
|
||||
color == DEFAULT_COLOR -> {
|
||||
this
|
||||
}
|
||||
|
||||
Colors.BOLD == color || Colors.REVERSE == color -> {
|
||||
color + this + color
|
||||
}
|
||||
|
||||
else -> {
|
||||
color + this + Colors.NORMAL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the given string cyan.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String?.cyan(): String = colorize(Colors.CYAN)
|
||||
|
||||
/**
|
||||
* URL encodes the given string.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.encodeUrl(): String = UrlEncoderUtil.encode(this)
|
||||
|
||||
/**
|
||||
* Returns a property as an int.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun Properties.getIntProperty(key: String, defaultValue: Int): Int {
|
||||
return getProperty(key)?.toIntOrDefault(defaultValue) ?: defaultValue
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the given string green.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String?.green(): String = colorize(Colors.DARK_GREEN)
|
||||
|
||||
/**
|
||||
* Build a help command by replacing `%c` with the bot's pub/priv command, and `%n` with the bot's
|
||||
* nick.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun helpCmdSyntax(text: String, botNick: String, isPrivate: Boolean): String {
|
||||
val replace = arrayOf(if (isPrivate) "/msg $botNick" else "$botNick:", botNick)
|
||||
return text.replaceEach(searchFlags, replace)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a formatted help string.
|
||||
*/
|
||||
@JvmStatic
|
||||
@JvmOverloads
|
||||
fun helpFormat(help: String, isBold: Boolean = true, isIndent: Boolean = true): String {
|
||||
val s = if (isBold) help.bold() else help
|
||||
return if (isIndent) s.prependIndent() else s
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `true` if the specified user is an operator on the [channel].
|
||||
*/
|
||||
@JvmStatic
|
||||
fun GenericMessageEvent.isChannelOp(channel: String): Boolean {
|
||||
return this.bot().userChannelDao.getChannel(channel).isOp(this.user)
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `true` if a HTTP status code indicates a successful response.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun Int.isHttpSuccess() = this in 200..399
|
||||
|
||||
/**
|
||||
* Returns the last item of a list of strings or empty if none.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun List<String>.lastOrEmpty(): String {
|
||||
return if (this.size >= 2) {
|
||||
this.last()
|
||||
} else
|
||||
""
|
||||
}
|
||||
|
||||
/**
|
||||
* Load serial data from file.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun loadSerialData(file: String, default: Any, logger: Logger, description: String): Any {
|
||||
val serialFile = Paths.get(file)
|
||||
if (serialFile.exists() && serialFile.fileSize() > 0) {
|
||||
try {
|
||||
ObjectInputStream(
|
||||
BufferedInputStream(Files.newInputStream(serialFile))
|
||||
).use { input ->
|
||||
if (logger.isDebugEnabled) logger.debug("Loading the ${description}.")
|
||||
return input.readObject()
|
||||
}
|
||||
} catch (e: IOException) {
|
||||
logger.error("An IO error occurred loading the ${description}.", e)
|
||||
} catch (e: ClassNotFoundException) {
|
||||
logger.error("An error occurred loading the ${description}.", e)
|
||||
}
|
||||
}
|
||||
return default
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns `true` if the list does not contain the given string.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun List<String>.notContains(text: String, ignoreCase: Boolean = false) = this.none { it.equals(text, ignoreCase) }
|
||||
|
||||
/**
|
||||
* Obfuscates the given string.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.obfuscate(): String {
|
||||
return if (isNotBlank()) {
|
||||
"x".repeat(length)
|
||||
} else this
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the plural form of a word, if count > 1.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.plural(count: Long): String {
|
||||
return if (count > 1) "${this}s" else this
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the given string red.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String?.red(): String = colorize(Colors.RED)
|
||||
|
||||
/**
|
||||
* Replaces all occurrences of Strings within another String.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.replaceEach(search: Array<out String>, replace: Array<out String>): String {
|
||||
var result = this
|
||||
if (search.size == replace.size) {
|
||||
search.forEachIndexed { i, s ->
|
||||
result = result.replace(s, replace[i])
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
/**
|
||||
* Makes the given string reverse color.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String?.reverseColor(): String = colorize(Colors.REVERSE)
|
||||
|
||||
/**
|
||||
* Save data
|
||||
*/
|
||||
@JvmStatic
|
||||
fun saveSerialData(file: String, data: Any, logger: Logger, description: String) {
|
||||
try {
|
||||
BufferedOutputStream(Files.newOutputStream(Paths.get(file))).use { bos ->
|
||||
ObjectOutputStream(bos).use { output ->
|
||||
if (logger.isDebugEnabled) logger.debug("Saving the ${description}.")
|
||||
output.writeObject(data)
|
||||
}
|
||||
}
|
||||
} catch (e: IOException) {
|
||||
logger.error("Unable to save the ${description}.", e)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a formatted commands/modules, etc. list.
|
||||
*/
|
||||
@JvmStatic
|
||||
@JvmOverloads
|
||||
fun GenericMessageEvent.sendList(
|
||||
list: List<String>,
|
||||
maxPerLine: Int,
|
||||
separator: String = " ",
|
||||
isBold: Boolean = false,
|
||||
isIndent: Boolean = false
|
||||
) {
|
||||
var i = 0
|
||||
while (i < list.size) {
|
||||
sendMessage(
|
||||
helpFormat(
|
||||
list.subList(i, list.size.coerceAtMost(i + maxPerLine)).joinToString(separator, truncated = ""),
|
||||
isBold,
|
||||
isIndent
|
||||
),
|
||||
)
|
||||
i += maxPerLine
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a [message].
|
||||
*/
|
||||
@JvmStatic
|
||||
fun GenericMessageEvent.sendMessage(channel: String, message: Message) {
|
||||
if (message.isNotice) {
|
||||
bot().sendIRC().notice(user.nick, message.msg.colorize(message.color))
|
||||
} else if (message.isPrivate || this is PrivateMessageEvent || channel.isBlank()) {
|
||||
respondPrivateMessage(message.msg.colorize(message.color))
|
||||
} else {
|
||||
bot().sendIRC().message(channel, message.msg.colorize(message.color))
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends a response as a private message or notice.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun GenericMessageEvent.sendMessage(message: String) {
|
||||
if (this is PrivateMessageEvent) {
|
||||
respondPrivateMessage(message)
|
||||
} else {
|
||||
bot().sendIRC().notice(user.nick, message)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns today's date.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun today(): String = LocalDateTime.now().toIsoLocalDate()
|
||||
|
||||
/**
|
||||
* Converts a string to an int.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.toIntOrDefault(defaultValue: Int): Int {
|
||||
return try {
|
||||
toInt()
|
||||
} catch (e: NumberFormatException) {
|
||||
defaultValue
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the specified date as an ISO local date string.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun Date.toIsoLocalDate(): String {
|
||||
return LocalDateTime.ofInstant(toInstant(), ZoneId.systemDefault()).toIsoLocalDate()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the specified date as an ISO local date string.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun LocalDateTime.toIsoLocalDate(): String = format(DateTimeFormatter.ISO_LOCAL_DATE)
|
||||
|
||||
/**
|
||||
* Returns the specified date formatted as `yyyy-MM-dd HH:mm`.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun Date.toUtcDateTime(): String {
|
||||
return LocalDateTime.ofInstant(toInstant(), ZoneId.systemDefault()).toUtcDateTime()
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the specified date formatted as `yyyy-MM-dd HH:mm`.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun LocalDateTime.toUtcDateTime(): String = format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"))
|
||||
|
||||
/**
|
||||
* Makes the given string bold.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String?.underline(): String = colorize(Colors.UNDERLINE)
|
||||
|
||||
|
||||
/**
|
||||
* Converts XML/XHTML entities to plain text.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun String.unescapeXml(): String = Jsoup.parse(this).text()
|
||||
|
||||
/**
|
||||
* Reads contents of a URL.
|
||||
*/
|
||||
@JvmStatic
|
||||
@Throws(IOException::class)
|
||||
fun URL.reader(): UrlReaderResponse {
|
||||
val connection = this.openConnection() as HttpURLConnection
|
||||
try {
|
||||
connection.setRequestProperty(
|
||||
"User-Agent",
|
||||
Constants.USER_AGENT
|
||||
)
|
||||
return if (connection.responseCode.isHttpSuccess()) {
|
||||
UrlReaderResponse(
|
||||
connection.responseCode,
|
||||
connection.inputStream.bufferedReader().use { it.readText() })
|
||||
} else {
|
||||
UrlReaderResponse(
|
||||
connection.responseCode,
|
||||
connection.errorStream.bufferedReader().use { it.readText() })
|
||||
}
|
||||
} finally {
|
||||
connection.disconnect()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds the [URL.reader] response code and body text.
|
||||
*/
|
||||
data class UrlReaderResponse(val responseCode: Int, val body: String)
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/*
|
||||
* AbstractCommand.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.helpCmdSyntax
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import net.thauvin.erik.mobibot.Utils.sendMessage
|
||||
import org.pircbotx.hooks.events.PrivateMessageEvent
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
abstract class AbstractCommand {
|
||||
abstract val name: String
|
||||
abstract val help: List<String>
|
||||
abstract val isOpOnly: Boolean
|
||||
abstract val isPublic: Boolean
|
||||
abstract val isVisible: Boolean
|
||||
|
||||
val properties: MutableMap<String, String> = mutableMapOf()
|
||||
|
||||
abstract fun commandResponse(channel: String, args: String, event: GenericMessageEvent)
|
||||
|
||||
open fun helpResponse(channel: String, topic: String, event: GenericMessageEvent): Boolean {
|
||||
if (!isOpOnly || isOpOnly == event.isChannelOp(channel)) {
|
||||
for (h in help) {
|
||||
event.sendMessage(helpCmdSyntax(h, event.bot().nick, event is PrivateMessageEvent || !isPublic))
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
open fun initProperties(vararg keys: String) {
|
||||
keys.forEach {
|
||||
properties[it] = ""
|
||||
}
|
||||
}
|
||||
|
||||
open fun isEnabled(): Boolean {
|
||||
return true
|
||||
}
|
||||
|
||||
open fun matches(message: String): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
open fun setProperty(key: String, value: String) {
|
||||
properties[key] = value
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* ChannelFeed.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.FeedReader
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class ChannelFeed(channel: String) : AbstractCommand() {
|
||||
override val name = channel
|
||||
override val help = listOf("To list the last 5 posts from the channel's weblog feed:", helpFormat("%c $channel"))
|
||||
override val isOpOnly = false
|
||||
override val isPublic = true
|
||||
override val isVisible = true
|
||||
|
||||
companion object {
|
||||
const val FEED_PROP = "feed"
|
||||
}
|
||||
|
||||
init {
|
||||
initProperties(FEED_PROP)
|
||||
}
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
if (isEnabled()) {
|
||||
properties[FEED_PROP]?.let { FeedReader(it, event).run() }
|
||||
}
|
||||
}
|
||||
|
||||
override fun isEnabled(): Boolean {
|
||||
return !properties[FEED_PROP].isNullOrBlank()
|
||||
}
|
||||
}
|
66
src/main/kotlin/net/thauvin/erik/mobibot/commands/Cycle.kt
Normal file
66
src/main/kotlin/net/thauvin/erik/mobibot/commands/Cycle.kt
Normal file
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* Cycle.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Cycle : AbstractCommand() {
|
||||
private val wait = 10
|
||||
override val name = "cycle"
|
||||
override val help = listOf("To have the bot leave the channel and come back:", helpFormat("%c $name"))
|
||||
override val isOpOnly = true
|
||||
override val isPublic = false
|
||||
override val isVisible = true
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
with(event.bot()) {
|
||||
if (event.isChannelOp(channel)) {
|
||||
runBlocking {
|
||||
launch {
|
||||
sendIRC().message(channel, "${event.user.nick} asked me to leave. I'll be back!")
|
||||
userChannelDao.getChannel(channel).send().part()
|
||||
delay(wait * 1000L)
|
||||
sendIRC().joinChannel(channel)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
helpResponse(channel, args, event)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
62
src/main/kotlin/net/thauvin/erik/mobibot/commands/Die.kt
Normal file
62
src/main/kotlin/net/thauvin/erik/mobibot/commands/Die.kt
Normal file
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
* Die.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Die : AbstractCommand() {
|
||||
override val name = "die"
|
||||
override val help = emptyList<String>()
|
||||
override val isOpOnly = true
|
||||
override val isPublic = false
|
||||
override val isVisible = false
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
with(event.bot()) {
|
||||
if (event.isChannelOp(channel) && (properties[DIE_PROP].isNullOrBlank() || args == properties[DIE_PROP])) {
|
||||
sendIRC().message(channel, "${event.user?.nick} has just signed my death sentence.")
|
||||
stopBotReconnect()
|
||||
sendIRC().quitServer("The Bot is Out There!")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val DIE_PROP = "die"
|
||||
}
|
||||
|
||||
init {
|
||||
initProperties(DIE_PROP)
|
||||
}
|
||||
}
|
146
src/main/kotlin/net/thauvin/erik/mobibot/commands/Ignore.kt
Normal file
146
src/main/kotlin/net/thauvin/erik/mobibot/commands/Ignore.kt
Normal file
|
@ -0,0 +1,146 @@
|
|||
/*
|
||||
* Ignore.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.bold
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.helpCmdSyntax
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import net.thauvin.erik.mobibot.Utils.sendList
|
||||
import net.thauvin.erik.mobibot.Utils.sendMessage
|
||||
import net.thauvin.erik.mobibot.commands.links.LinksManager
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Ignore : AbstractCommand() {
|
||||
private val me = "me"
|
||||
|
||||
init {
|
||||
initProperties(IGNORE_PROP)
|
||||
}
|
||||
|
||||
override val name = IGNORE_CMD
|
||||
override val help = listOf(
|
||||
"To ignore a link posted to the channel:",
|
||||
helpFormat("https://www.foo.bar %n"),
|
||||
"To check your ignore status:",
|
||||
helpFormat("%c $name"),
|
||||
"To toggle your ignore status:",
|
||||
helpFormat("%c $name $me")
|
||||
)
|
||||
private val helpOp = help.plus(
|
||||
arrayOf("To add/remove nicks from the ignored list:", helpFormat("%c $name <nick> [<nick> ...]"))
|
||||
)
|
||||
|
||||
override val isOpOnly = false
|
||||
override val isPublic = true
|
||||
override val isVisible = true
|
||||
|
||||
companion object {
|
||||
const val IGNORE_CMD = "ignore"
|
||||
const val IGNORE_PROP = IGNORE_CMD
|
||||
private val ignored = mutableSetOf<String>()
|
||||
|
||||
@JvmStatic
|
||||
fun isNotIgnored(nick: String): Boolean {
|
||||
return !ignored.contains(nick.lowercase())
|
||||
}
|
||||
}
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
val isMe = args.trim().equals(me, true)
|
||||
if (isMe || !event.isChannelOp(channel)) {
|
||||
val nick = event.user.nick.lowercase()
|
||||
ignoreNick(nick, isMe, event)
|
||||
} else {
|
||||
ignoreOp(args, event)
|
||||
}
|
||||
}
|
||||
|
||||
override fun helpResponse(channel: String, topic: String, event: GenericMessageEvent): Boolean {
|
||||
return if (event.isChannelOp(channel)) {
|
||||
for (h in helpOp) {
|
||||
event.sendMessage(helpCmdSyntax(h, event.bot().nick, true))
|
||||
}
|
||||
true
|
||||
} else {
|
||||
super.helpResponse(channel, topic, event)
|
||||
}
|
||||
}
|
||||
|
||||
private fun ignoreNick(sender: String, isMe: Boolean, event: GenericMessageEvent) {
|
||||
if (isMe) {
|
||||
if (ignored.remove(sender)) {
|
||||
event.sendMessage("You are no longer ignored.")
|
||||
} else {
|
||||
ignored.add(sender)
|
||||
event.sendMessage("You are now ignored.")
|
||||
}
|
||||
} else {
|
||||
if (ignored.contains(sender)) {
|
||||
event.sendMessage("You are currently ignored.")
|
||||
} else {
|
||||
event.sendMessage("You are not currently ignored.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun ignoreOp(args: String, event: GenericMessageEvent) {
|
||||
if (args.isNotEmpty()) {
|
||||
val nicks = args.lowercase().split(" ")
|
||||
for (nick in nicks) {
|
||||
val ignore = if (me == nick) {
|
||||
nick.lowercase()
|
||||
} else {
|
||||
nick
|
||||
}
|
||||
if (!ignored.remove(ignore)) {
|
||||
ignored.add(ignore)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ignored.isNotEmpty()) {
|
||||
event.sendMessage("The following nicks are ignored:")
|
||||
event.sendList(ignored.sorted(), 8, isIndent = true)
|
||||
} else {
|
||||
event.sendMessage("No one is currently ${"ignored".bold()}.")
|
||||
}
|
||||
}
|
||||
|
||||
override fun setProperty(key: String, value: String) {
|
||||
super.setProperty(key, value)
|
||||
if (IGNORE_PROP == key) {
|
||||
ignored.addAll(value.split(LinksManager.TAG_MATCH))
|
||||
}
|
||||
}
|
||||
}
|
124
src/main/kotlin/net/thauvin/erik/mobibot/commands/Info.kt
Normal file
124
src/main/kotlin/net/thauvin/erik/mobibot/commands/Info.kt
Normal file
|
@ -0,0 +1,124 @@
|
|||
/*
|
||||
* Info.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.ReleaseInfo
|
||||
import net.thauvin.erik.mobibot.Utils.capitalise
|
||||
import net.thauvin.erik.mobibot.Utils.green
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import net.thauvin.erik.mobibot.Utils.plural
|
||||
import net.thauvin.erik.mobibot.Utils.sendList
|
||||
import net.thauvin.erik.mobibot.Utils.sendMessage
|
||||
import net.thauvin.erik.mobibot.commands.links.LinksManager
|
||||
import net.thauvin.erik.mobibot.commands.seen.Seen
|
||||
import net.thauvin.erik.mobibot.commands.tell.Tell
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
import java.lang.management.ManagementFactory
|
||||
import kotlin.time.DurationUnit
|
||||
import kotlin.time.toDuration
|
||||
|
||||
class Info(private val tell: Tell, private val seen: Seen) : AbstractCommand() {
|
||||
private val allVersions = listOf(
|
||||
"${ReleaseInfo.PROJECT.capitalise()} ${ReleaseInfo.VERSION} (${ReleaseInfo.WEBSITE.green()})",
|
||||
"Written by ${ReleaseInfo.AUTHOR} (${ReleaseInfo.AUTHOR_URL.green()})"
|
||||
)
|
||||
override val name = "info"
|
||||
override val help = listOf("To view information about the bot:", helpFormat("%c $name"))
|
||||
override val isOpOnly = false
|
||||
override val isPublic = true
|
||||
override val isVisible = true
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Converts milliseconds to year month week day hour and minutes.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun Long.toUptime(): String {
|
||||
this.toDuration(DurationUnit.MILLISECONDS).toComponents { wholeDays, hours, minutes, seconds, _ ->
|
||||
val years = wholeDays / 365
|
||||
var days = wholeDays % 365
|
||||
val months = days / 30
|
||||
days %= 30
|
||||
val weeks = days / 7
|
||||
days %= 7
|
||||
|
||||
with(StringBuffer()) {
|
||||
if (years > 0) {
|
||||
append(years).append(" year".plural(years)).append(' ')
|
||||
}
|
||||
if (months > 0) {
|
||||
append(months).append(" month".plural(months)).append(' ')
|
||||
}
|
||||
if (weeks > 0) {
|
||||
append(weeks).append(" week".plural(weeks)).append(' ')
|
||||
}
|
||||
if (days > 0) {
|
||||
append(days).append(" day".plural(days)).append(' ')
|
||||
}
|
||||
if (hours > 0) {
|
||||
append(hours).append(" hour".plural(hours.toLong())).append(' ')
|
||||
}
|
||||
|
||||
if (minutes > 0) {
|
||||
append(minutes).append(" minute".plural(minutes.toLong()))
|
||||
} else {
|
||||
append(seconds).append(" second".plural(seconds.toLong()))
|
||||
}
|
||||
|
||||
return toString()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
event.sendList(allVersions, 1)
|
||||
val info = StringBuilder()
|
||||
info.append("Uptime: ")
|
||||
.append(ManagementFactory.getRuntimeMXBean().uptime.toUptime())
|
||||
.append(" [Entries: ")
|
||||
.append(LinksManager.entries.links.size)
|
||||
if (seen.isEnabled()) {
|
||||
info.append(", Seen: ").append(seen.count())
|
||||
}
|
||||
if (event.isChannelOp(channel)) {
|
||||
if (tell.isEnabled()) {
|
||||
info.append(", Messages: ").append(tell.size())
|
||||
}
|
||||
if (LinksManager.socialManager.entriesCount() > 0) {
|
||||
info.append(", Social: ").append(LinksManager.socialManager.entriesCount())
|
||||
}
|
||||
}
|
||||
info.append(", Recap: ").append(Recap.recaps.size).append(']')
|
||||
event.sendMessage(info.toString())
|
||||
}
|
||||
}
|
51
src/main/kotlin/net/thauvin/erik/mobibot/commands/Me.kt
Normal file
51
src/main/kotlin/net/thauvin/erik/mobibot/commands/Me.kt
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Me.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Me : AbstractCommand() {
|
||||
override val name = "me"
|
||||
override val help = listOf("To have the bot perform an action:", helpFormat("%c $name <action>"))
|
||||
override val isOpOnly = true
|
||||
override val isPublic = false
|
||||
override val isVisible = true
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
if (event.isChannelOp(channel)) {
|
||||
event.bot().sendIRC().action(channel, args)
|
||||
}
|
||||
}
|
||||
}
|
63
src/main/kotlin/net/thauvin/erik/mobibot/commands/Modules.kt
Normal file
63
src/main/kotlin/net/thauvin/erik/mobibot/commands/Modules.kt
Normal file
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
* Modules.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import net.thauvin.erik.mobibot.Utils.sendList
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Modules(private val modules: List<String>, private val disabledModules: List<String>) : AbstractCommand() {
|
||||
override val name = "modules"
|
||||
override val help = listOf("To view a list of enabled/disabled modules:", helpFormat("%c $name"))
|
||||
override val isOpOnly = true
|
||||
override val isPublic = false
|
||||
override val isVisible = true
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
if (event.isChannelOp(channel)) {
|
||||
if (modules.isEmpty()) {
|
||||
event.respondPrivateMessage("There are no enabled modules.")
|
||||
} else {
|
||||
event.respondPrivateMessage("The enabled modules are: ")
|
||||
event.sendList(modules, 7, isIndent = true)
|
||||
}
|
||||
if (disabledModules.isNotEmpty()) {
|
||||
event.respondPrivateMessage("The disabled modules are: ")
|
||||
event.sendList(disabledModules, 7, isIndent = true)
|
||||
}
|
||||
} else {
|
||||
helpResponse(channel, args, event)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
60
src/main/kotlin/net/thauvin/erik/mobibot/commands/Msg.kt
Normal file
60
src/main/kotlin/net/thauvin/erik/mobibot/commands/Msg.kt
Normal file
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Msg.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Msg : AbstractCommand() {
|
||||
override val name = "msg"
|
||||
override val help = listOf(
|
||||
"To have the bot send a private message to someone:",
|
||||
helpFormat("%c $name <nick> <text>")
|
||||
)
|
||||
override val isOpOnly = true
|
||||
override val isPublic = false
|
||||
override val isVisible = true
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
if (event.isChannelOp(channel)) {
|
||||
val msg = args.split(" ", limit = 2)
|
||||
if (args.length > 2) {
|
||||
event.bot().sendIRC().message(msg[0], msg[1])
|
||||
event.respondPrivateMessage("A message was sent to ${msg[0]}")
|
||||
} else {
|
||||
helpResponse(channel, args, event)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
51
src/main/kotlin/net/thauvin/erik/mobibot/commands/Nick.kt
Normal file
51
src/main/kotlin/net/thauvin/erik/mobibot/commands/Nick.kt
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Nick.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Nick : AbstractCommand() {
|
||||
override val name = "nick"
|
||||
override val help = listOf("To change the bot's nickname:", helpFormat("%c $name <new_nick>"))
|
||||
override val isOpOnly = true
|
||||
override val isPublic = true
|
||||
override val isVisible = true
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
if (event.isChannelOp(channel)) {
|
||||
event.bot().sendIRC().changeNick(args)
|
||||
}
|
||||
}
|
||||
}
|
81
src/main/kotlin/net/thauvin/erik/mobibot/commands/Recap.kt
Normal file
81
src/main/kotlin/net/thauvin/erik/mobibot/commands/Recap.kt
Normal file
|
@ -0,0 +1,81 @@
|
|||
/*
|
||||
* Recap.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.sendMessage
|
||||
import net.thauvin.erik.mobibot.Utils.toUtcDateTime
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
import java.time.Clock
|
||||
import java.time.LocalDateTime
|
||||
|
||||
class Recap : AbstractCommand() {
|
||||
override val name = "recap"
|
||||
override val help = listOf(
|
||||
"To list the last 10 public channel messages:",
|
||||
helpFormat("%c $name")
|
||||
)
|
||||
override val isOpOnly = false
|
||||
override val isPublic = true
|
||||
override val isVisible = true
|
||||
|
||||
companion object {
|
||||
const val MAX_RECAPS = 10
|
||||
|
||||
@JvmField
|
||||
val recaps = mutableListOf<String>()
|
||||
|
||||
/**
|
||||
* Stores the last 10 public messages and actions.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun storeRecap(sender: String, message: String, isAction: Boolean) {
|
||||
recaps.add(
|
||||
LocalDateTime.now(Clock.systemUTC()).toUtcDateTime()
|
||||
+ " - $sender" + (if (isAction) " " else ": ") + message
|
||||
)
|
||||
if (recaps.size > MAX_RECAPS) {
|
||||
recaps.removeFirst()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
if (recaps.isNotEmpty()) {
|
||||
for (r in recaps) {
|
||||
event.sendMessage(r)
|
||||
}
|
||||
} else {
|
||||
event.sendMessage("Sorry, nothing to recap.")
|
||||
}
|
||||
}
|
||||
}
|
51
src/main/kotlin/net/thauvin/erik/mobibot/commands/Say.kt
Normal file
51
src/main/kotlin/net/thauvin/erik/mobibot/commands/Say.kt
Normal file
|
@ -0,0 +1,51 @@
|
|||
/*
|
||||
* Say.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Say : AbstractCommand() {
|
||||
override val name = "say"
|
||||
override val help = listOf("To have the bot say something on the channel:", helpFormat("%c $name <text>"))
|
||||
override val isOpOnly = true
|
||||
override val isPublic = false
|
||||
override val isVisible = true
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
if (event.isChannelOp(channel)) {
|
||||
event.bot().sendIRC().message(channel, args)
|
||||
}
|
||||
}
|
||||
}
|
50
src/main/kotlin/net/thauvin/erik/mobibot/commands/Users.kt
Normal file
50
src/main/kotlin/net/thauvin/erik/mobibot/commands/Users.kt
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Users.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.sendList
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Users : AbstractCommand() {
|
||||
override val name = "users"
|
||||
override val help = listOf("To list the users present on the channel:", helpFormat("%c $name"))
|
||||
override val isOpOnly = false
|
||||
override val isPublic = true
|
||||
override val isVisible = true
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
val ch = event.bot().userChannelDao.getChannel(channel)
|
||||
event.sendList(ch.users.map { if (it.channelsOpIn.contains(ch)) "@${it.nick}" else it.nick }, 8)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Versions.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
package net.thauvin.erik.mobibot.commands
|
||||
|
||||
import net.thauvin.erik.mobibot.ReleaseInfo
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import net.thauvin.erik.mobibot.Utils.sendList
|
||||
import net.thauvin.erik.mobibot.Utils.toIsoLocalDate
|
||||
import org.pircbotx.PircBotX
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Versions : AbstractCommand() {
|
||||
private val allVersions = listOf(
|
||||
"Version: ${ReleaseInfo.VERSION} (${ReleaseInfo.BUILD_DATE.toIsoLocalDate()})",
|
||||
"${System.getProperty("os.name")} ${System.getProperty("os.version")} (${System.getProperty("os.arch")})" +
|
||||
", JVM ${System.getProperty("java.version")}",
|
||||
"Kotlin ${KotlinVersion.CURRENT}, PircBotX ${PircBotX.VERSION}"
|
||||
)
|
||||
override val name = "versions"
|
||||
override val help = listOf("To view the versions data (bot, platform, java, etc.):", helpFormat("%c $name"))
|
||||
override val isOpOnly = true
|
||||
override val isPublic = false
|
||||
override val isVisible = true
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
if (event.isChannelOp(channel)) {
|
||||
event.sendList(allVersions, 1)
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
* Comment.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands.links
|
||||
|
||||
import net.thauvin.erik.mobibot.Constants
|
||||
import net.thauvin.erik.mobibot.Utils.bold
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.isChannelOp
|
||||
import net.thauvin.erik.mobibot.Utils.sendMessage
|
||||
import net.thauvin.erik.mobibot.commands.AbstractCommand
|
||||
import net.thauvin.erik.mobibot.entries.EntriesUtils.printComment
|
||||
import net.thauvin.erik.mobibot.entries.EntriesUtils.toLinkLabel
|
||||
import net.thauvin.erik.mobibot.entries.EntryLink
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
|
||||
class Comment : AbstractCommand() {
|
||||
override val name = COMMAND
|
||||
override val help = listOf(
|
||||
"To add a comment:",
|
||||
helpFormat("${Constants.LINK_CMD}1:This is a comment"),
|
||||
"I will reply with a label, for example: ${Constants.LINK_CMD.bold()}1.1",
|
||||
"To edit a comment, use its label: ",
|
||||
helpFormat("${Constants.LINK_CMD}1.1:This is an edited comment"),
|
||||
"To delete a comment, use its label and a minus sign: ",
|
||||
helpFormat("${Constants.LINK_CMD}1.1:-")
|
||||
)
|
||||
override val isOpOnly = false
|
||||
override val isPublic = true
|
||||
override val isVisible = true
|
||||
|
||||
companion object {
|
||||
const val COMMAND = "comment"
|
||||
}
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
val cmds = args.substring(1).split("[.:]".toRegex(), 3)
|
||||
val entryIndex = cmds[0].toInt() - 1
|
||||
|
||||
if (entryIndex < LinksManager.entries.links.size && LinksManager.isUpToDate(event)) {
|
||||
val entry: EntryLink = LinksManager.entries.links[entryIndex]
|
||||
val commentIndex = cmds[1].toInt() - 1
|
||||
if (commentIndex < entry.comments.size) {
|
||||
when (val cmd = cmds[2].trim()) {
|
||||
"" -> showComment(entry, entryIndex, commentIndex, event) // L1.1:
|
||||
"-" -> deleteComment(channel, entry, entryIndex, commentIndex, event) // L1.1:-
|
||||
else -> {
|
||||
if (cmd.startsWith('?')) { // L1.1:?<author>
|
||||
changeAuthor(channel, cmd, entry, entryIndex, commentIndex, event)
|
||||
} else { // L1.1:<comment>
|
||||
setComment(cmd, entry, entryIndex, commentIndex, event)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun helpResponse(channel: String, topic: String, event: GenericMessageEvent): Boolean {
|
||||
if (super.helpResponse(channel, topic, event)) {
|
||||
if (event.isChannelOp(channel)) {
|
||||
event.sendMessage("To change a comment's author:")
|
||||
event.sendMessage(helpFormat("${Constants.LINK_CMD}1.1:?<nick>"))
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
override fun matches(message: String): Boolean {
|
||||
return message.matches("^${Constants.LINK_CMD}\\d+\\.\\d+:.*".toRegex())
|
||||
}
|
||||
|
||||
private fun changeAuthor(
|
||||
channel: String,
|
||||
cmd: String,
|
||||
entry: EntryLink,
|
||||
entryIndex: Int,
|
||||
commentIndex: Int,
|
||||
event: GenericMessageEvent
|
||||
) {
|
||||
if (event.isChannelOp(channel) && cmd.length > 1) {
|
||||
val comment = entry.getComment(commentIndex)
|
||||
comment.nick = cmd.substring(1)
|
||||
event.sendMessage(printComment(entryIndex, commentIndex, comment))
|
||||
LinksManager.entries.save()
|
||||
} else {
|
||||
event.sendMessage("Please ask a channel op to change the author of this comment for you.")
|
||||
}
|
||||
}
|
||||
|
||||
private fun deleteComment(
|
||||
channel: String,
|
||||
entry: EntryLink,
|
||||
entryIndex: Int,
|
||||
commentIndex: Int,
|
||||
event: GenericMessageEvent
|
||||
) {
|
||||
if (event.isChannelOp(channel) || event.user.nick == entry.getComment(commentIndex).nick) {
|
||||
entry.deleteComment(commentIndex)
|
||||
event.sendMessage("Comment ${entryIndex.toLinkLabel()}.${commentIndex + 1} removed.")
|
||||
LinksManager.entries.save()
|
||||
} else {
|
||||
event.sendMessage("Please ask a channel op to delete this comment for you.")
|
||||
}
|
||||
}
|
||||
|
||||
private fun setComment(
|
||||
cmd: String,
|
||||
entry: EntryLink,
|
||||
entryIndex: Int,
|
||||
commentIndex: Int,
|
||||
event: GenericMessageEvent
|
||||
) {
|
||||
entry.setComment(commentIndex, cmd, event.user.nick)
|
||||
event.sendMessage(printComment(entryIndex, commentIndex, entry.getComment(commentIndex)))
|
||||
LinksManager.entries.save()
|
||||
}
|
||||
|
||||
private fun showComment(entry: EntryLink, entryIndex: Int, commentIndex: Int, event: GenericMessageEvent) {
|
||||
event.sendMessage(printComment(entryIndex, commentIndex, entry.getComment(commentIndex)))
|
||||
}
|
||||
}
|
|
@ -0,0 +1,207 @@
|
|||
/*
|
||||
* LinksManager.kt
|
||||
*
|
||||
* Copyright 2004-2025 Erik C. Thauvin (erik@thauvin.net)
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of this project nor the names of its contributors may be
|
||||
* used to endorse or promote products derived from this software without
|
||||
* specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.thauvin.erik.mobibot.commands.links
|
||||
|
||||
import net.thauvin.erik.mobibot.Constants
|
||||
import net.thauvin.erik.mobibot.Pinboard
|
||||
import net.thauvin.erik.mobibot.Utils.bold
|
||||
import net.thauvin.erik.mobibot.Utils.bot
|
||||
import net.thauvin.erik.mobibot.Utils.helpFormat
|
||||
import net.thauvin.erik.mobibot.Utils.sendMessage
|
||||
import net.thauvin.erik.mobibot.Utils.today
|
||||
import net.thauvin.erik.mobibot.commands.AbstractCommand
|
||||
import net.thauvin.erik.mobibot.commands.Ignore.Companion.isNotIgnored
|
||||
import net.thauvin.erik.mobibot.entries.Entries
|
||||
import net.thauvin.erik.mobibot.entries.EntriesUtils.printLink
|
||||
import net.thauvin.erik.mobibot.entries.EntriesUtils.toLinkLabel
|
||||
import net.thauvin.erik.mobibot.entries.EntryLink
|
||||
import net.thauvin.erik.mobibot.social.SocialManager
|
||||
import org.jsoup.Jsoup
|
||||
import org.pircbotx.hooks.types.GenericMessageEvent
|
||||
import java.io.IOException
|
||||
|
||||
class LinksManager : AbstractCommand() {
|
||||
private val defaultTags: MutableList<String> = mutableListOf()
|
||||
private val keywords: MutableList<String> = mutableListOf()
|
||||
|
||||
override val name = Constants.LINK_CMD
|
||||
override val help = emptyList<String>()
|
||||
override val isOpOnly = false
|
||||
override val isPublic = false
|
||||
override val isVisible = false
|
||||
|
||||
init {
|
||||
initProperties(TAGS_PROP, KEYWORDS_PROP)
|
||||
}
|
||||
|
||||
companion object {
|
||||
val LINK_MATCH = "^[hH][tT][tT][pP](|[sS])://.*".toRegex()
|
||||
const val KEYWORDS_PROP = "tags-keywords"
|
||||
const val TAGS_PROP = "tags"
|
||||
val TAG_MATCH = ", *| +".toRegex()
|
||||
|
||||
/**
|
||||
* Entries array
|
||||
*/
|
||||
@JvmField
|
||||
val entries = Entries()
|
||||
|
||||
/**
|
||||
* Pinboard handler.
|
||||
*/
|
||||
@JvmField
|
||||
val pinboard = Pinboard()
|
||||
|
||||
/**
|
||||
* Social Manager handler.
|
||||
*/
|
||||
@JvmField
|
||||
val socialManager = SocialManager()
|
||||
|
||||
/**
|
||||
* Let the user know if the entries are too old to be modified.
|
||||
*/
|
||||
@JvmStatic
|
||||
fun isUpToDate(event: GenericMessageEvent): Boolean {
|
||||
if (entries.lastPubDate != today()) {
|
||||
event.sendMessage("The links are too old to be updated.")
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
override fun commandResponse(channel: String, args: String, event: GenericMessageEvent) {
|
||||
val cmds = args.split(" ".toRegex(), 2)
|
||||
val sender = event.user.nick
|
||||
val botNick = event.bot().nick
|
||||
val login = event.user.login
|
||||
|
||||
if (isNotIgnored(sender) && (cmds.size == 1 || !cmds[1].contains(botNick))) {
|
||||
val link = cmds[0].trim()
|
||||
if (!isDupEntry(link, event)) {
|
||||
var title = ""
|
||||
val tags = ArrayList<String>(defaultTags)
|
||||
if (cmds.size == 2) {
|
||||
val data = cmds[1].trim().split("${Tags.COMMAND}:", limit = 2)
|
||||
title = data[0].trim()
|
||||
if (data.size > 1) {
|
||||
tags.addAll(data[1].split(TAG_MATCH))
|
||||
}
|
||||
}
|
||||
|
||||
if (title.isBlank()) {
|
||||
title = fetchTitle(link)
|
||||
}
|
||||
|
||||
if (title != Constants.NO_TITLE) {
|
||||
matchTagKeywords(title, tags)
|
||||
}
|
||||
|
||||
// Links are old, clear them
|
||||
if (entries.lastPubDate != today()) {
|
||||
entries.links.clear()
|
||||
}
|
||||
|
||||
val entry = EntryLink(link, title, sender, login, channel, tags)
|
||||
entries.links.add(entry)
|
||||
val index = entries.links.lastIndexOf(entry)
|
||||
event.sendMessage(printLink(index, entry))
|
||||
|
||||
pinboard.addPin(event.bot().serverHostname, entry)
|
||||
|
||||
// Queue link for posting to social media.
|
||||
socialManager.queueEntry(index)
|
||||
|
||||
entries.save()
|
||||
|
||||
if (Constants.NO_TITLE == entry.title) {
|
||||
event.sendMessage("Please specify a title, by typing:")
|
||||
event.sendMessage(helpFormat("${index.toLinkLabel()}:|This is the title"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun helpResponse(channel: String, topic: String, event: GenericMessageEvent): Boolean = false
|
||||
|
||||
override fun matches(message: String): Boolean {
|
||||
return message.matches(LINK_MATCH)
|
||||
}
|
||||
|
||||
internal fun fetchTitle(link: String): String {
|
||||
try {
|
||||
val html = Jsoup.connect(link)
|
||||
.userAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0")
|
||||
.get()
|
||||
val title = html.title()
|
||||
if (title.isNotBlank()) {
|
||||
return title
|
||||
}
|
||||
} catch (ignore: IOException) {
|
||||
// Do nothing
|
||||
}
|
||||
return Constants.NO_TITLE
|
||||
}
|
||||
|
||||
private fun isDupEntry(link: String, event: GenericMessageEvent): Boolean {
|
||||
synchronized(entries) {
|
||||
return try {
|
||||
val match = entries.links.single { it.link == link }
|
||||
event.sendMessage(
|
||||
"Duplicate".bold() + " >> " + printLink(entries.links.indexOf(match), match)
|
||||
)
|
||||
true
|
||||
} catch (ignore: NoSuchElementException) {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal fun matchTagKeywords(title: String, tags: MutableList<String>) {
|
||||
for (match in keywords) {
|
||||
val m = Regex.escape(match)
|
||||
if (title.matches("(?i).*\\b$m\\b.*".toRegex())) {
|
||||
tags.add(match)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun setProperty(key: String, value: String) {
|
||||
super.setProperty(key, value)
|
||||
if (KEYWORDS_PROP == key) {
|
||||
keywords.addAll(value.split(TAG_MATCH))
|
||||
} else if (TAGS_PROP == key) {
|
||||
defaultTags.addAll(value.split(TAG_MATCH))
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue