Advertisement
SpliftOn

ZenChanV2

Aug 22nd, 2015
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.79 KB | None | 0 0
  1. on *:load: {
  2. set %overlimit 2
  3. }
  4. menu channel {
  5. .-
  6. ZenChanV2: dialog -mied ZenChanV2 ZenChanV2
  7. }
  8. alias ZC dialog -mied ZenChanV2 ZenChanV2
  9. dialog ZenChanV2 {
  10. title " Z e n C h a n "
  11. size -1 -1 130 256
  12. option dbu
  13. box "U s e r s ", 1, 3 35 85 179
  14. box "G e s t i o n d e s A c c e s s ", 2, 2 218 116 24
  15. button "&&", 3, 4 226 13 12
  16. button "@", 4, 18 226 13 12
  17. button "%", 5, 32 226 13 12
  18. button "+", 6, 46 226 13 12
  19. button "Aucun", 7, 60 226 27 12
  20. button "Liste", 9, 88 226 27 12
  21. button "Rafraichir", 10, 91 38 37 12
  22. button "Whois", 11, 91 51 37 12
  23. button "Quit", 12, 91 202 37 12, ok
  24. list 8, 6 43 79 168, sort size extsel hsbar vsbar
  25. button "Notice", 15, 91 64 37 12
  26. button "Mass Notice", 16, 91 77 37 12
  27. button "Limiter", 17, 91 90 37 12
  28. button "Auto-Voice", 18, 91 103 37 12
  29. button "Akick", 19, 91 117 37 12
  30. button "UnAkick", 20, 91 130 37 12
  31. button "Topic", 21, 91 143 37 12
  32. button "Xop", 22, 91 156 37 12
  33. button "Kick", 13, 91 175 37 12
  34. button "Ban", 14, 91 188 37 12
  35. text " ", 134, 3 21 124 9
  36. combo 135, 3 2 84 50, sort size drop
  37. text " ", 138, 89 17 39 8
  38. text " ", 137, 89 26 40 8
  39. menu "Configuration", 29
  40. menu "Botserv", 35
  41. item "Botlist", 36, 35
  42. item "Assign", 37, 35
  43. menu "Set", 38, 35
  44. menu "DONTKICKOPS", 46, 38
  45. item "On", 51, 46
  46. item "Off", 52, 46
  47. menu "DONTKICKVOICES", 47, 38
  48. item "On", 53, 47
  49. item "Off", 54, 47
  50. menu "Fantasy", 48, 38
  51. item "On", 55, 48
  52. item "Off", 56, 48
  53. menu "Greet", 49, 38
  54. item "On", 57, 49
  55. item "Off", 58, 49
  56. menu "Symbiosis", 50, 38
  57. item "On", 59, 50
  58. item "Off", 60, 50
  59. menu "Kick", 39, 35
  60. menu "Bolds", 61, 39
  61. item "On", 69, 61
  62. item "Off", 70, 61
  63. menu "Badwords", 62, 39
  64. item "On", 71, 62
  65. item "Off", 72, 62
  66. menu "Caps", 63, 39
  67. item "On", 73, 63
  68. item "Off", 74, 63
  69. menu "Colors", 64, 39
  70. item "On", 75, 64
  71. item "Off", 76, 64
  72. menu "Flood", 65, 39
  73. item "On", 77, 65
  74. item "Off", 78, 65
  75. menu "Repeat", 66, 39
  76. item "On", 79, 66
  77. item "Off", 80, 66
  78. menu "Reverses", 67, 39
  79. item "On", 81, 67
  80. item "Off", 82, 67
  81. menu "Underlines", 68, 39
  82. item "On", 83, 68
  83. item "Off", 84, 68
  84. menu "Badwords", 41, 35
  85. item "ADD", 85, 41
  86. item "DEL", 86, 41
  87. item "LIST", 87, 41
  88. item "CLEAR", 88, 41
  89. item "Act", 42, 35
  90. item "Info", 43, 35
  91. item "Say", 44, 35
  92. item "Unassign", 45, 35
  93. menu "Chanserv", 89
  94. menu "SET", 92, 89
  95. item "FOUNDER", 91, 92
  96. item "SUCCESSOR", 93, 92
  97. item "PASSWORD", 94, 92
  98. item "ENTRYMSG", 98, 92
  99. menu "BANTYPE", 99, 92
  100. item "*!user@host", 111, 99
  101. item "*!*user@host", 112, 99
  102. item "*!*@host", 113, 99
  103. item "*!*user@*.domain", 114, 99
  104. item "MLOCK", 100, 92
  105. menu "KEEPTOPIC", 101, 92
  106. item "On", 115, 101
  107. item "Off", 116, 101
  108. menu "OPNOTICE", 102, 92
  109. item "On", 117, 102
  110. item "Off", 118, 102
  111. menu "PEACE", 103, 92
  112. item "On", 119, 103
  113. item "Off", 120, 103
  114. menu "PRIVATE", 104, 92
  115. item "On", 121, 104
  116. item "Off", 122, 104
  117. menu "RESTRICTED", 105, 92
  118. item "On", 123, 105
  119. item "Off", 124, 105
  120. menu "SECURE", 106, 92
  121. item "On", 125, 106
  122. item "Off", 126, 106
  123. menu "SECUREOPS", 107, 92
  124. item "On", 127, 107
  125. item "Off", 128, 107
  126. menu "SECUREFOUNDER", 108, 92
  127. item "On", 129, 108
  128. item "Off", 130, 108
  129. menu "SIGNKICK", 109, 92
  130. item "On", 131, 109
  131. item "Off", 133, 109
  132. item "Info", 90, 89
  133. link " Zen-Attitude", 139, 90 245 34 8
  134. }
  135. on *:dialog:ZenChanV2:init:*: {
  136. did -a ZenChanV2 29 30 Définir Salon
  137. did -a ZenChanV2 29 31 Supprimer Salon
  138. did -a ZenChanV2 29 136 Limite
  139. did -a ZenChanV2 8 Aucun salon sélectionné
  140. RemplirCombo
  141. }
  142. on *:dialog:ZenChanV2:menu:*: {
  143. if ($did == 30) {
  144. set %ZenChanV21 $$?="Nom du salon 1 (avec le #)"
  145. if ($readini([ %ZenChanV21 $+ .ini ],SALON,caractéristique) == on) {
  146. dialog -k ZenChanV2
  147. timerdialog 1 1 dialog -mied ZenChanV2 ZenChanV2
  148. timerremplir 1 1 did -r ZenChanV2 8
  149. timerremplir 1 1 did -a ZenChanV2 8 %ZenChanV21 déjà existant
  150. halt
  151. }
  152. if ($readini([ %ZenChanV21 $+ .ini ],SALON,caractéristique) != on) {
  153. writeini [ %ZenChanV21 $+ .ini ] SALON caractéristique on
  154. writeini [ %ZenChanV21 $+ .ini ] SALON Auto_Voice off
  155. writeini [ %ZenChanV21 $+ .ini ] SALON ZenLimite off
  156. writeini [ %ZenChanV21 $+ .ini ] SALON Limite 2
  157. write ZenChanSalon.txt %ZenChanV21
  158. set %ZenChanV2 %ZenChanV21
  159. dialog -k ZenChanV2
  160. timerdialog 1 1 dialog -mied ZenChanV2 ZenChanV2
  161. timerremplir 1 1 RemplirListe
  162. }
  163. }
  164. elseif ($did == 31) {
  165. set %ZenChanV21 $$?="Nom du salon 1 (avec le #)"
  166. if ($readini([ %ZenChanV21 $+ .ini ],SALON,caractéristique) == on) {
  167. remini [ %ZenChanV21 $+ .ini ] SALON
  168. protectionamj_off
  169. mode %ZenChanV21 -l
  170. write -ds %ZenChanV21 ZenChanSalon.txt
  171. RemplirCombo
  172. unset %ZenChanV21
  173. unset %ZenChanV2
  174. dialog -k ZenChanV2
  175. timerdialog 1 1 dialog -mied ZenChanV2 ZenChanV2
  176. }
  177. }
  178. elseif ($did == 36) { bs botlist }
  179. elseif ($did == 37) { bs assign %ZenChanV2 $$?="Nom du botserv : ?" }
  180. elseif ($did == 42) { bs ACT %ZenChanV2 $$?="Message : ?" }
  181. elseif ($did == 43) { bs INFO %ZenChanV2 }
  182. elseif ($did == 44) { bs SAY %ZenChanV2 $$?="Message : ?" }
  183. elseif ($did == 45) { bs UNASSIGN %ZenChanV2 }
  184. elseif ($did == 51) { bs set %ZenChanV2 DONTKICKOPS on }
  185. elseif ($did == 52) { bs set %ZenChanV2 DONTKICKOPS off }
  186. elseif ($did == 53) { bs set %ZenChanV2 DONTKICKVOICES on }
  187. elseif ($did == 54) { bs set %ZenChanV2 DONTKICKVOICES off }
  188. elseif ($did == 55) { bs set %ZenChanV2 FANTASY on }
  189. elseif ($did == 56) { bs set %ZenChanV2 FANTASY off }
  190. elseif ($did == 57) { bs set %ZenChanV2 GREET on }
  191. elseif ($did == 58) { bs set %ZenChanV2 GREET off }
  192. elseif ($did == 59) { bs set %ZenChanV2 SYMBIOSIS on }
  193. elseif ($did == 60) { bs set %ZenChanV2 SYMBIOSIS off }
  194. elseif ($did == 69) { bs KICK %ZenChanV2 BOLDS on }
  195. elseif ($did == 70) { bs KICK %ZenChanV2 BOLDS off }
  196. elseif ($did == 71) { bs KICK %ZenChanV2 BADWORDS on }
  197. elseif ($did == 72) { bs KICK %ZenChanV2 BADWORDS off }
  198. elseif ($did == 73) { bs KICK %ZenChanV2 CAPS on }
  199. elseif ($did == 74) { bs KICK %ZenChanV2 CAPS off }
  200. elseif ($did == 75) { bs KICK %ZenChanV2 COLORS on }
  201. elseif ($did == 76) { bs KICK %ZenChanV2 COLORS off }
  202. elseif ($did == 77) { bs KICK %ZenChanV2 FLOOD on }
  203. elseif ($did == 78) { bs KICK %ZenChanV2 FLOOD off }
  204. elseif ($did == 79) { bs KICK %ZenChanV2 REPEAT on }
  205. elseif ($did == 80) { bs KICK %ZenChanV2 REPEAT off }
  206. elseif ($did == 81) { bs KICK %ZenChanV2 REVERSES on }
  207. elseif ($did == 82) { bs KICK %ZenChanV2 REVERSES off }
  208. elseif ($did == 83) { bs KICK %ZenChanV2 UNDERLINES on }
  209. elseif ($did == 84) { bs KICK %ZenChanV2 UNDERLINES off }
  210. elseif ($did == 85) { bs BADWORDS %ZenChanV2 ADD $$?="Badword à ajouter : ?" }
  211. elseif ($did == 86) { bs BADWORDS %ZenChanV2 DEL $$?="Badword à supprimer : ?" }
  212. elseif ($did == 87) { bs BADWORDS %ZenChanV2 LIST }
  213. elseif ($did == 88) { bs BADWORDS %ZenChanV2 CLEAR }
  214. elseif ($did == 90) { cs INFO %ZenChanV2 ALL }
  215. elseif ($did == 91) { cs SET %ZenChanV2 FOUNDER $$?="Pseudo du nouvel owner du salon : ?" }
  216. elseif ($did == 93) { cs SET %ZenChanV2 SUCCESSOR $$?="Pseudo du repreneur éventuel du salon : ?" }
  217. elseif ($did == 94) { cs SET %ZenChanV2 PASSWORD $$?="Nouveau mot de passe : ?" }
  218. elseif ($did == 98) { cs SET %ZenChanV2 ENTRYMSG $$?="Message d'accueil : ?" }
  219. elseif ($did == 100) { cs SET %ZenChanV2 MLOCK $$?="Mode(s) à maintenir (ex: +p-l) :?" }
  220. elseif ($did == 111) { cs SET %ZenChanV2 BANTYPE 0 }
  221. elseif ($did == 112) { cs SET %ZenChanV2 BANTYPE 1 }
  222. elseif ($did == 113) { cs SET %ZenChanV2 BANTYPE 2 }
  223. elseif ($did == 114) { cs SET %ZenChanV2 BANTYPE 3 }
  224. elseif ($did == 115) { cs SET %ZenChanV2 KEEPTOPIC On }
  225. elseif ($did == 116) { cs SET %ZenChanV2 KEEPTOPIC Off }
  226. elseif ($did == 117) { cs SET %ZenChanV2 OPNOTICE On }
  227. elseif ($did == 118) { cs SET %ZenChanV2 OPNOTICE Off }
  228. elseif ($did == 119) { cs SET %ZenChanV2 PEACE On }
  229. elseif ($did == 120) { cs SET %ZenChanV2 PEACE Off }
  230. elseif ($did == 121) { cs SET %ZenChanV2 PRIVATE On }
  231. elseif ($did == 122) { cs SET %ZenChanV2 PRIVATE Off }
  232. elseif ($did == 123) { cs SET %ZenChanV2 RESTRICTED On }
  233. elseif ($did == 124) { cs SET %ZenChanV2 RESTRICTED Off }
  234. elseif ($did == 125) { cs SET %ZenChanV2 SECURE On }
  235. elseif ($did == 126) { cs SET %ZenChanV2 SECURE Off }
  236. elseif ($did == 127) { cs SET %ZenChanV2 SECUREOPS On }
  237. elseif ($did == 128) { cs SET %ZenChanV2 SECUREOPS Off }
  238. elseif ($did == 129) { cs SET %ZenChanV2 SECUREFOUNDER On }
  239. elseif ($did == 130) { cs SET %ZenChanV2 SECUREFOUNDER Off }
  240. elseif ($did == 131) { cs SET %ZenChanV2 SIGNKICK On }
  241. elseif ($did == 133) { cs SET %ZenChanV2 SIGNKICK Off }
  242. elseif ($did == 136) { writeini [ %ZenChanV2 $+ .ini ] SALON Limite $$?="Quelle limite : ?" | if ($readini([ %ZenChanV2 $+ .ini ],SALON,ZenLimite) == on) { did -a ZenChanV2 137 Limite ON + $readini([ %ZenChanV2 $+ .ini ],SALON,Limite) } }
  243. }
  244. on *:dialog:ZenChanV2:sclick:*: {
  245. if ($did == 3) { cs access %ZenChanV2 add $did(08).seltext 10 | mode %ZenChanV2 +ao $did(08).seltext $did(08).seltext }
  246. elseif ($did == 4) { cs access %ZenChanV2 add $did(08).seltext 5 | mode %ZenChanV2 +o-a $did(08).seltext $did(08).seltext }
  247. elseif ($did == 5) { cs access %ZenChanV2 add $did(08).seltext 4 | mode %ZenChanV2 +h-ao $did(08).seltext $did(08).seltext $did(08).seltext }
  248. elseif ($did == 6) { cs access %ZenChanV2 add $did(08).seltext 3 | mode %ZenChanV2 +v-aoh $did(08).seltext $did(08).seltext $did(08).seltext $did(08).seltext }
  249. elseif ($did == 7) { cs access %ZenChanV2 del $did(08).seltext | mode %ZenChanV2 -vaoh $did(08).seltext $did(08).seltext $did(08).seltext $did(08).seltext }
  250. elseif ($did == 9) { cs access %ZenChanV2 list }
  251. elseif ($did == 10) { RemplirListe }
  252. elseif ($did == 11) { whois $did(08).seltext }
  253. elseif ($did == 13) { cs kick %ZenChanV2 $did(08).seltext Oust }
  254. elseif ($did == 14) { ban %ZenChanV2 %ZenChanV2Ban $+(*,$did(08).seltext,*!*@!) | ban %ZenChanV2 $+(*!*,$did(08).seltext,*@*) | ban %ZenChanV2 $did(08).seltext 2 | kick %ZenChanV2 $did(08).seltext Du balai !! }
  255. elseif ($did == 15) { notice $did(08).seltext $$?="Message à envoyer : ?" }
  256. elseif ($did == 16) { notice %ZenChanV2 $$?="Message à envoyer : ?" }
  257. elseif ($did == 17) {
  258. if ($readini([ %ZenChanV2 $+ .ini ],SALON,caractéristique) == on) {
  259. if ($readini([ %ZenChanV2 $+ .ini ],SALON,ZenLimite) == off) {
  260. writeini [ %ZenChanV2 $+ .ini ] SALON ZenLimite on | did -a ZenChanV2 137 Limite ON + $readini([ $1 $+ .ini ],SALON,Limite) | echo -a 4 Limite activée sur %ZenChanV2 | protectionamj_on %ZenChanV2 | halt
  261. }
  262. if ($readini([ %ZenChanV2 $+ .ini ],SALON,ZenLimite) == on) {
  263. writeini [ %ZenChanV2 $+ .ini ] SALON ZenLimite off | did -a ZenChanV2 137 Limite OFF | echo -a 4 Limite désactivée sur %ZenChanV2 | protectionamj_off | mode %ZenChanV2 -l | halt
  264. }
  265. }
  266. }
  267. elseif ($did == 18) {
  268. if ($readini([ %ZenChanV2 $+ .ini ],SALON,caractéristique) == on) {
  269. if ($readini([ %ZenChanV2 $+ .ini ],SALON,Auto_Voice) == off) {
  270. writeini [ %ZenChanV2 $+ .ini ] SALON Auto_Voice on | did -a ZenChanV2 138 Auto-voice ON | echo -a 4 Auto-Voice activé sur %ZenChanV2 | halt
  271. }
  272. if ($readini([ %ZenChanV2 $+ .ini ],SALON,Auto_Voice) == on) {
  273. writeini [ %ZenChanV2 $+ .ini ] SALON Auto_Voice off | did -a ZenChanV2 138 Auto-voice OFF | echo -a 4 Auto-Voice désactivé sur %ZenChanV2 | halt
  274. }
  275. }
  276. }
  277. elseif ($did == 19) { cs akick %ZenChanV2 add $did(08).seltext }
  278. elseif ($did == 20) { cs akick %ZenChanV2 list | echo -a 2,0Pour enlever le "akick" tape la commande suivante: 4/msg ChanServ AKICK %ZenChanV2 DEL "N° du akick" }
  279. elseif ($did == 21) { cs topic %ZenChanV2 $$?="Message du Topic : ?" }
  280. elseif ($did == 22) { cs set %ZenChanV2 xop $$?="XOP = On ou Off ?" }
  281. elseif ($did == 23) { cs akick %ZenChanV2 list }
  282. elseif ($did == 135) { set %ZenChanV2 $did(135).seltext | RemplirListe }
  283. elseif ($did == 139) { server -m irc.Double-Zen.com }
  284. }
  285. alias RemplirListe {
  286. did -r ZenChanV2 8
  287. set %total.nick $nick(%ZenChanV2,0)
  288. set %x 1
  289. while (%x <= %total.nick) {
  290. did -a ZenChanV2 8 $nick(%ZenChanV2,%x)
  291. inc %x 1
  292. }
  293. did -a ZenChanV2 134 %ZenChanV2 - %total.nick users
  294. if ($readini([ %ZenChanV2 $+ .ini ],SALON,Auto_Voice) == on) {
  295. did -a ZenChanV2 138 Auto-voice ON
  296. }
  297. if ($readini([ %ZenChanV2 $+ .ini ],SALON,Auto_Voice) == off) {
  298. did -a ZenChanV2 138 Auto-voice OFF
  299. }
  300. if ($readini([ %ZenChanV2 $+ .ini ],SALON,ZenLimite) == on) {
  301. did -a ZenChanV2 137 Limite ON + $readini([ %ZenChanV2 $+ .ini ],SALON,Limite)
  302. }
  303. if ($readini([ %ZenChanV2 $+ .ini ],SALON,ZenLimite) == off) {
  304. did -a ZenChanV2 137 Limite OFF
  305. }
  306. }
  307. alias RemplirCombo {
  308. loadbuf -ro ZenChanV2 135 ZenChanSalon.txt
  309. }
  310. on *:join:#:{
  311. if ($readini([ $chan $+ .ini ],SALON,caractéristique) == on) {
  312. if ($readini([ $chan $+ .ini ],SALON,Auto_Voice) == on) {
  313. if ((($me isop $chan) || ($me ishop $chan) && ($nick != $me))) {
  314. mode $chan +v $nick
  315. }
  316. }
  317. }
  318. if ($nick == $me) {
  319. if ($readini([ $chan $+ .ini ],SALON,caractéristique) == on) {
  320. if ($readini([ $chan $+ .ini ],SALON,ZenLimite) == on) {
  321. protectionamj_on $chan
  322. }
  323. }
  324. }
  325. }
  326. alias protectionamj_on {
  327. /timerprotect [ $+ [ $1 ] ] 0 7 .pramj $1
  328. }
  329. alias pramj {
  330. if ($readini([ $1 $+ .ini ],SALON,caractéristique) == on) {
  331. if ($readini([ $1 $+ .ini ],SALON,ZenLimite) == on) {
  332. set %overlimit $readini([ $1 $+ .ini ],SALON,Limite)
  333. mode $1 +l $calc($nick($1,0) + %overlimit)
  334. }
  335. }
  336. }
  337. alias protectionamj_off {
  338. /timerprotect [ $+ [ $1 ] ] off
  339. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement