Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.55 KB | None | 0 0
  1. menu * {
  2. Control Spamfilter: /dialog -m spamfilterman spamfilterman | .stats f
  3. }
  4. raw 229:*: {
  5. if ($dialog(spamfilterman)) {
  6. did -a spamfilterman 1 $2-
  7. did -z spamfilterman 1
  8. halt
  9. }
  10. }
  11. dialog spamfilterman {
  12. title "Control de Spamfilter® Si_te_animas"
  13. size -1 -1 282 226
  14. option dbu
  15. button "Borrar", 2, 2 124 70 12
  16. button "Editar", 3, 3 198 120 12
  17. button "Actualizar", 4, 149 198 130 12, disable
  18. button "Agregar Nuevo", 5, 72 124 80 12
  19. box "Spamfilters", 6, 1 191 280 22
  20. box "Tipo", 7, 1 136 121 54
  21. check "Canal (c)", 9, 3 143 59 10
  22. check "Privado (p)", 10, 3 152 60 10
  23. check "Notice Privado(n)", 11, 3 161 50 10
  24. check "Notice Canal (N)", 12, 3 170 60 10
  25. check "Part (P)", 13, 3 179 50 10
  26. check "Quit (q)", 14, 64 161 54 10
  27. check "DCC Send (d)", 15, 64 170 57 10
  28. check "Away (a)", 16, 64 179 50 10
  29. check "Topic (t)", 17, 64 143 50 10
  30. check "User (u)", 18, 64 152 50 10
  31. box "Accion", 19, 123 136 157 27
  32. radio "Kill", 20, 125 142 21 10
  33. radio "kLine", 21, 150 142 25 10
  34. radio "zLine", 22, 176 142 25 10
  35. radio "gLine", 23, 150 151 25 10
  36. radio "gzLine", 24, 176 151 25 10
  37. radio "Shun", 25, 125 151 23 10
  38. radio "tempshun", 26, 206 142 36 10
  39. radio "Viruschan", 27, 206 151 34 10
  40. radio "Block", 28, 243 143 25 10
  41. radio "DCC Block", 29, 243 151 35 10
  42. edit "", 30, 153 164 127 10, autohs
  43. text "Spam ->", 31, 126 165 25 8
  44. edit "", 32, 153 175 127 10, autohs
  45. text "Razon ->", 33, 127 176 25 8
  46. edit "", 8, 1 214 280 10, read
  47. list 1, 1 1 280 121, size hsbar vsbar
  48. }
  49. on *:dialog:spamfilterman:sclick:*: {
  50. if ($did == 2) {
  51. if ($did(1).seltext) {
  52. if ($gettok($did(1).seltext,1,32) === f) {
  53. did -ra spamfilterman 8 El Spamfilter seleccionado no puede ser borrado debido a una configuracion del Server.
  54. }
  55. else {
  56. spamfilter del $gettok($did(1).seltext,2,32) $gettok($did(1).seltext,3,32) - $gettok($did(1).seltext,7,32) $gettok($did(1).seltext,9-,32)
  57. did -ra spamfilterman 8 Entrada de Spamfilter borrada.
  58. did -r spamfilterman 1
  59. .stats f
  60. }
  61. }
  62. else {
  63. did -ra spamfilterman 8 No se selecciono ninguna entrada de Spamfilter.
  64. }
  65. }
  66. if ($did == 3) {
  67. if ($did(1).seltext) {
  68. if (c isincs $gettok($did(1).seltext,2,32)) {
  69. did -c spamfilterman 9
  70. }
  71. else {
  72. did -u spamfilterman 9
  73. }
  74. if (p isincs $gettok($did(1).seltext,2,32)) {
  75. did -c spamfilterman 10
  76. }
  77. else {
  78. did -u spamfilterman 10
  79. }
  80. if (n isincs $gettok($did(1).seltext,2,32)) {
  81. did -c spamfilterman 11
  82. }
  83. else {
  84. did -u spamfilterman 11
  85. }
  86. if (N isincs $gettok($did(1).seltext,2,32)) {
  87. did -c spamfilterman 12
  88. }
  89. else {
  90. did -u spamfilterman 12
  91. }
  92. if (P isincs $gettok($did(1).seltext,2,32)) {
  93. did -c spamfilterman 13
  94. }
  95. else {
  96. did -u spamfilterman 13
  97. }
  98. if (q isincs $gettok($did(1).seltext,2,32)) {
  99. did -c spamfilterman 14
  100. }
  101. else {
  102. did -u spamfilterman 14
  103. }
  104. if (t isincs $gettok($did(1).seltext,2,32)) {
  105. did -c spamfilterman 17
  106. }
  107. else {
  108. did -u spamfilterman 17
  109. }
  110. if (u isincs $gettok($did(1).seltext,2,32)) {
  111. did -c spamfilterman 18
  112. }
  113. else {
  114. did -u spamfilterman 18
  115. }
  116. if (d isincs $gettok($did(1).seltext,2,32)) {
  117. did -c spamfilterman 15
  118. }
  119. else {
  120. did -u spamfilterman 15
  121. }
  122. if (a isincs $gettok($did(1).seltext,2,32)) {
  123. did -c spamfilterman 16
  124. }
  125. else {
  126. did -u spamfilterman 16
  127. }
  128. did -ra spamfilterman 30 $gettok($did(1).seltext,9-,32)
  129. did -ra spamfilterman 32 $gettok($did(1).seltext,7,32)
  130. if ($gettok($did(1).seltext,3,32) == kill) {
  131. did -c spamfilterman 20
  132. did -u spamfilterman 21
  133. did -u spamfilterman 22
  134. did -u spamfilterman 23
  135. did -u spamfilterman 24
  136. did -u spamfilterman 25
  137. did -u spamfilterman 26
  138. did -u spamfilterman 27
  139. did -u spamfilterman 28
  140. did -u spamfilterman 29
  141. }
  142. if ($gettok($did(1).seltext,3,32) == kline) {
  143. did -c spamfilterman 21
  144. did -u spamfilterman 20
  145. did -u spamfilterman 22
  146. did -u spamfilterman 23
  147. did -u spamfilterman 24
  148. did -u spamfilterman 25
  149. did -u spamfilterman 26
  150. did -u spamfilterman 27
  151. did -u spamfilterman 28
  152. did -u spamfilterman 29
  153. }
  154. if ($gettok($did(1).seltext,3,32) == zline) {
  155. did -c spamfilterman 22
  156. did -u spamfilterman 21
  157. did -u spamfilterman 20
  158. did -u spamfilterman 23
  159. did -u spamfilterman 24
  160. did -u spamfilterman 25
  161. did -u spamfilterman 26
  162. did -u spamfilterman 27
  163. did -u spamfilterman 28
  164. did -u spamfilterman 29
  165. }
  166. if ($gettok($did(1).seltext,3,32) == gline) {
  167. did -c spamfilterman 23
  168. did -u spamfilterman 21
  169. did -u spamfilterman 22
  170. did -u spamfilterman 20
  171. did -u spamfilterman 24
  172. did -u spamfilterman 25
  173. did -u spamfilterman 26
  174. did -u spamfilterman 27
  175. did -u spamfilterman 28
  176. did -u spamfilterman 29
  177. }
  178. if ($gettok($did(1).seltext,3,32) == gzline) {
  179. did -c spamfilterman 24
  180. did -u spamfilterman 21
  181. did -u spamfilterman 22
  182. did -u spamfilterman 23
  183. did -u spamfilterman 20
  184. did -u spamfilterman 25
  185. did -u spamfilterman 26
  186. did -u spamfilterman 27
  187. did -u spamfilterman 28
  188. did -u spamfilterman 29
  189. }
  190. if ($gettok($did(1).seltext,3,32) == shun) {
  191. did -c spamfilterman 25
  192. did -u spamfilterman 21
  193. did -u spamfilterman 22
  194. did -u spamfilterman 23
  195. did -u spamfilterman 24
  196. did -u spamfilterman 20
  197. did -u spamfilterman 26
  198. did -u spamfilterman 27
  199. did -u spamfilterman 28
  200. did -u spamfilterman 29
  201. }
  202. if ($gettok($did(1).seltext,3,32) == tempshun) {
  203. did -c spamfilterman 26
  204. did -u spamfilterman 21
  205. did -u spamfilterman 22
  206. did -u spamfilterman 23
  207. did -u spamfilterman 24
  208. did -u spamfilterman 25
  209. did -u spamfilterman 20
  210. did -u spamfilterman 27
  211. did -u spamfilterman 28
  212. did -u spamfilterman 29
  213. }
  214. if ($gettok($did(1).seltext,3,32) == viruschan) {
  215. did -c spamfilterman 27
  216. did -u spamfilterman 21
  217. did -u spamfilterman 22
  218. did -u spamfilterman 23
  219. did -u spamfilterman 24
  220. did -u spamfilterman 25
  221. did -u spamfilterman 26
  222. did -u spamfilterman 20
  223. did -u spamfilterman 28
  224. did -u spamfilterman 29
  225. }
  226. if ($gettok($did(1).seltext,3,32) == block) {
  227. did -c spamfilterman 28
  228. did -u spamfilterman 21
  229. did -u spamfilterman 22
  230. did -u spamfilterman 23
  231. did -u spamfilterman 24
  232. did -u spamfilterman 25
  233. did -u spamfilterman 26
  234. did -u spamfilterman 27
  235. did -u spamfilterman 20
  236. did -u spamfilterman 29
  237. }
  238. if ($gettok($did(1).seltext,3,32) == dccblock) {
  239. did -c spamfilterman 29
  240. did -u spamfilterman 21
  241. did -u spamfilterman 22
  242. did -u spamfilterman 23
  243. did -u spamfilterman 24
  244. did -u spamfilterman 25
  245. did -u spamfilterman 26
  246. did -u spamfilterman 27
  247. did -u spamfilterman 28
  248. did -u spamfilterman 20
  249. }
  250. did -e spamfilterman 4
  251. }
  252. else {
  253. did -ra spamfilterman 8 Ninguna entrada seleccionada.
  254. }
  255. }
  256. if ($did == 4) {
  257. if ($did(1).seltext) {
  258. spamfilter del $gettok($did(1).seltext,2,32) $gettok($did(1).seltext,3,32) - $gettok($did(1).seltext,7,32) $gettok($did(1).seltext,9-,32)
  259. if ($did(9).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ c }
  260. else { set %spamf.types c }
  261. }
  262. if ($did(10).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ p }
  263. else { set %spamf.types p }
  264. }
  265. if ($did(11).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ n }
  266. else { set %spamf.types n }
  267. }
  268. if ($did(12).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ N }
  269. else { set %spamf.types N }
  270. }
  271. if ($did(13).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ P }
  272. else { set %spamf.types P }
  273. }
  274. if ($did(14).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ q }
  275. else { set %spamf.types q }
  276. }
  277. if ($did(15).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ d }
  278. else { set %spamf.types d }
  279. }
  280. if ($did(16).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ a }
  281. else { set %spamf.types a }
  282. }
  283. if ($did(17).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ t }
  284. else { set %spamf.types t }
  285. }
  286. if ($did(18).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ u }
  287. else { set %spamf.types u }
  288. }
  289. if ($did(20).state == 1) { set %spamf.action kill }
  290. if ($did(21).state == 1) { set %spamf.action kline }
  291. if ($did(22).state == 1) { set %spamf.action zline }
  292. if ($did(23).state == 1) { set %spamf.action gline }
  293. if ($did(24).state == 1) { set %spamf.action gzline }
  294. if ($did(25).state == 1) { set %spamf.action shun }
  295. if ($did(26).state == 1) { set %spamf.action tempshun }
  296. if ($did(27).state == 1) { set %spamf.action viruschan }
  297. if ($did(28).state == 1) { set %spamf.action block }
  298. if ($did(29).state == 1) { set %spamf.action dccblock }
  299. if (($did(30).text) && ($did(32).text) && (%spamf.types) && (%spamf.action)) {
  300. .spamfilter add %spamf.types %spamf.action - $did(32).text $did(30).text
  301. unset %spamf.types
  302. unset %spamf.action
  303. did -ra spamfilterman 8 El Spamfilter ha sido agregado.
  304. did -r spamfilterman 1
  305. .stats f
  306. }
  307. else {
  308. did -ra spamfilterman 8 Entradas faltantes!
  309. }
  310. }
  311. else {
  312. did -ra spamfilterman 8 Ninguna Entrada especificada.
  313. }
  314. }
  315. if ($did == 5) {
  316. if ($did(9).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ c }
  317. else { set %spamf.types c }
  318. }
  319. if ($did(10).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ p }
  320. else { set %spamf.types p }
  321. }
  322. if ($did(11).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ n }
  323. else { set %spamf.types n }
  324. }
  325. if ($did(12).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ N }
  326. else { set %spamf.types N }
  327. }
  328. if ($did(13).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ P }
  329. else { set %spamf.types P }
  330. }
  331. if ($did(14).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ q }
  332. else { set %spamf.types q }
  333. }
  334. if ($did(15).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ d }
  335. else { set %spamf.types d }
  336. }
  337. if ($did(16).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ a }
  338. else { set %spamf.types a }
  339. }
  340. if ($did(17).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ t }
  341. else { set %spamf.types t }
  342. }
  343. if ($did(18).state == 1) { if (%spamf.types) { set %spamf.types %spamf.types $+ u }
  344. else { set %spamf.types u }
  345. }
  346. echo -a %spamf.types
  347. if ($did(20).state == 1) { set %spamf.action kill }
  348. if ($did(21).state == 1) { set %spamf.action kline }
  349. if ($did(22).state == 1) { set %spamf.action zline }
  350. if ($did(23).state == 1) { set %spamf.action gline }
  351. if ($did(24).state == 1) { set %spamf.action gzline }
  352. if ($did(25).state == 1) { set %spamf.action shun }
  353. if ($did(26).state == 1) { set %spamf.action tempshun }
  354. if ($did(27).state == 1) { set %spamf.action viruschan }
  355. if ($did(28).state == 1) { set %spamf.action block }
  356. if ($did(29).state == 1) { set %spamf.action dccblock }
  357. if (($did(30).text) && ($did(32).text) && (%spamf.types) && (%spamf.action)) {
  358. .spamfilter add %spamf.types %spamf.action - $did(32).text $did(30).text
  359. unset %spamf.types
  360. unset %spamf.action
  361. did -ra spamfilterman 8 Entrada de Spamfilter agregada.
  362. did -r spamfilterman 1
  363. .stats f
  364. }
  365. }
  366. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement