login  Naam:   Wachtwoord: 
Registreer je!
 Scripts:

Scripts > Overige > Mirc > IRC Manager

IRC Manager

Auteur: Superior - 19 oktober 2008 - 13:48 - Gekeurd door: Stijn - Hits: 3101 - Aantal punten: (0 stemmen)



Plakken in je remote (alt+r) en openen via je rechtermuisknop in een kanaal

Code:
  1. menu channel,menubar,status {
  2. .IRCManager { dialog $iif($dialog(ircmanager),-ev,-md) ircmanager ircmanager }
  3. .-
  4. }
  5.  
  6. dialog -l ircmanager {
  7. title "Loading..."
  8. size -1 -1 500 380
  9. option pixels
  10.  
  11. text "" 1, 20 20 300 20
  12. list 2, 50 40 270 80
  13.  
  14. button "" 3, 340 40 80 20
  15. button "" 4, 340 60 80 20
  16. button "" 5, 340 80 80 20
  17.  
  18. button "/\" 6, 20 40 20 20
  19. button "\/" 7, 20 70 20 20
  20.  
  21. text "" 17, 20 100 500 20
  22. text "Server settings:" 10, 20 120 120 20
  23. text "Server:" 11, 20 140 80 20
  24. text "Port:" 12, 20 160 80 20
  25. text "Channels:" 13, 20 180 80 20
  26.  
  27. text "Personal settings:" 14, 20 220 120 20
  28. text "Nickname:" 15, 20 240 80 20
  29. text "Password:" 16, 20 260 80 20
  30.  
  31. box "" 20, 100 140 200 20
  32. box "" 21, 100 160 200 20
  33. box "" 22, 100 180 200 20
  34. box "" 23, 100 240 200 20
  35. box "" 24, 100 260 200 20, pass
  36.  
  37. edit "" 30, 100 140 200 20
  38. edit "" 31, 100 160 200 20, limit 5
  39. edit "" 32, 100 180 200 20, autohs
  40. edit "" 33, 100 240 200 20
  41. edit "" 34, 100 260 200 20, pass
  42.  
  43. text "" 50, 310 140 200 20
  44. text "" 51, 310 160 200 20
  45. text "" 52, 310 180 200 20
  46. text "" 53, 310 240 200 20
  47. text "" 54, 310 260 200 20
  48.  
  49. check "Enable IRCManager" 40, 20 300 200 20
  50. check "Start IRCManager on connect" 41, 20 320 200 20
  51.  
  52. button "Ok" 100, 20 340 80 20, ok
  53. text "" 101, 110 342 350 20
  54. }
  55.  
  56. on *:dialog:ircmanager:*:*: {
  57. if ($devent == init) {
  58. echo -a 3Loading IRCManager..
  59. set %ircmanager.version 1.33
  60. dialog -t ircmanager IRCManager %ircmanager.version [By Superior (c) 2007-2008]
  61. set %ircmanager.status server.list
  62. if (%ircmanager.setting.access == $NULL) {
  63. set %ircmanager.setting.access on
  64. }
  65. elseif (%ircmanager.setting.access == on) {
  66. did -ec ircmanager 40
  67. }
  68. elseif (%ircmanager.setting.access == off) {
  69. did -eu ircmanager 40
  70. }
  71. if (%ircmanager.setting.startup == $NULL) {
  72. set %ircmanager.setting.startup on
  73. $iif(%ircmanager.setting.access == on,did -ec ircmanager 41,did -bc ircmanager 41)
  74. }
  75. elseif (%ircmanager.setting.startup == on) {
  76. $iif(%ircmanager.setting.access == on,did -ec ircmanager 41,did -bc ircmanager 41)
  77. }
  78. elseif (%ircmanager.setting.startup == off) {
  79. $iif(%ircmanager.setting.access == on,did -eu ircmanager 41,did -bu ircmanager 41)
  80. }
  81. did -ar ircmanager 1 IRCManager: Your Servers!
  82. var %i 1
  83. while ($gettok(%ircmanager.serverlist,%i,124) != $NULL) {
  84. did -a ircmanager 2 $gettok(%ircmanager.serverlist,%i,124)
  85. inc %i
  86. }
  87. did -ar ircmanager 3 Add Server
  88. did -ar ircmanager 4 Edit Server
  89. did -ar ircmanager 5 Del Server
  90. did -h ircmanager 30-34
  91. did -ar ircmanager 101 IRCManager %ircmanager.version copyright by Superior
  92. }
  93. if ($devent == sclick) {
  94. if ($did == 2) {
  95. did -ar ircmanager 20 %ircmanager.server. $+ $did(2).seltext
  96. did -ar ircmanager 21 %ircmanager.port. [ $+ [ $did(2).seltext ] ]
  97. did -ar ircmanager 22 %ircmanager.chan. [ $+ [ $did(2).seltext ] ]
  98. did -ar ircmanager 23 %ircmanager.nickname. [ $+ [ $did(2).seltext ] ]
  99. did -ar ircmanager 24 $str(*,$len(%ircmanager.nickpass. [ $+ [ $did(2).seltext ] ]))
  100. }
  101. if ($did == 3) {
  102. ;ADD Server
  103. if (%ircmanager.status == server.list) {
  104. set %ircmanager.status server.add
  105. did -ar ircmanager 1 IRCManager: Add a server!
  106. did -b ircmanager 2
  107. did -ar ircmanager 3 Add Server
  108. did -ar ircmanager 4 Reset
  109. did -ar ircmanager 5 Cancel
  110. did -h ircmanager 20-24
  111. did -rv ircmanager 30-34
  112. did -var ircmanager 51 Use a '+' infront of SSL ports!
  113. did -var ircmanager 52 Use a ',' between the channels!
  114. did -var ircmanager 54 Do not enter on public PC!
  115. did -ar ircmanager 17 Click 'Add Server' to add the server to the list after you entered the details!
  116. }
  117. elseif (%ircmanager.status == server.add) {
  118. if ($did(30).text == $NULL) {
  119. did -ar ircmanager 101 Please add a server!
  120. did -ar ircmanager 17 Please add a server!
  121. }
  122. else {
  123. set %ircmanager.status server.list
  124. set %ircmanager.serverlist %ircmanager.serverlist $+ $did(30).text $+ |
  125. set %ircmanager.port. [ $+ [ $did(30).text ] ] $did(31).text
  126. set %ircmanager.chan. [ $+ [ $did(30).text ] ] $did(32).text
  127. set %ircmanager.nickname. [ $+ [ $did(30).text ] ] $did(33).text
  128. set %ircmanager.nickpass. [ $+ [ $did(30).text ] ] $did(34).text
  129. did -ae ircmanager 2 $did(30).text
  130. did -are ircmanager 3 Add Server
  131. did -are ircmanager 4 Edit Server
  132. did -are ircmanager 5 Del Server
  133. did -ar ircmanager 17
  134. did -v ircmanager 20-24
  135. did -h ircmanager 30-34
  136. did -h ircmanager 50-54
  137.  
  138. }
  139. }
  140. elseif (%ircmanager.status == server.edit) {
  141. set %ircmanager.status server.list
  142. set %ircmanager.port. [ $+ [ $did(20).text ] ] $did(31).text
  143. set %ircmanager.chan. [ $+ [ $did(20).text ] ] $did(32).text
  144. set %ircmanager.nickname. [ $+ [ $did(20).text ] ] $did(33).text
  145. set %ircmanager.nickpass. [ $+ [ $did(20).text ] ] $did(34).text
  146. did -e ircmanager 2
  147. did -are ircmanager 3 Add Server
  148. did -are ircmanager 4 Edit Server
  149. did -are ircmanager 5 Del Server
  150. did -ar ircmanager 17
  151. did -v ircmanager 20
  152. did -arv ircmanager 21 %ircmanager.port. [ $+ [ $did(30).text ] ]
  153. did -arv ircmanager 22 %ircmanager.chan. [ $+ [ $did(30).text ] ]
  154. did -arv ircmanager 23 %ircmanager.nickname. [ $+ [ $did(30).text ] ]
  155. did -arv ircmanager 24 $str(*,$len(%ircmanager.nickpass. [ $+ [ $did(2).seltext ] ]))
  156. did -h ircmanager 30-34
  157. }
  158. elseif (%ircmanager.status == server.del) {
  159. set %ircmanager.status server.list
  160. set %ircmanager.server.temp $did(2).seltext
  161. unset %ircmanager.*. $+ $did(2).seltext
  162. did -ar ircmanager 1 IRCManager: Your Servers!
  163. did -er ircmanager 2
  164. var %i 1
  165. while (%i <= $numtok(%ircmanager.serverlist,124)) {
  166. if (%ircmanager.server.temp != $gettok(%ircmanager.serverlist,%i,124)) {
  167. set %ircmanager.serverlist.temp %ircmanager.serverlist.temp $+ $gettok(%ircmanager.serverlist,%i,124) $+ |
  168. did -a ircmanager 2 $gettok(%ircmanager.serverlist,%i,124)
  169. }
  170. inc %i
  171. }
  172. set %ircmanager.serverlist %ircmanager.serverlist.temp
  173. unset %ircmanager.serverlist.temp
  174. unset %ircmanager.server.temp
  175. did -are ircmanager 3 Add Server
  176. did -are ircmanager 4 Edit Server
  177. did -are ircmanager 5 Del Server
  178. did -ar ircmanager 17
  179. did -av ircmanager 20-24
  180. did -h ircmanager 30-34
  181. }
  182. }
  183. if ($did == 4) {
  184. ;Edit Server
  185. if (%ircmanager.status == server.list) {
  186. if ($did(2).seltext == $NULL) {
  187. did -ar ircmanager 101 Select a server!
  188. did -ar ircmanager 17 Please add a server!
  189. }
  190. if ($did(2).seltext != $NULL) {
  191. set %ircmanager.status server.edit
  192. did -ar ircmanager 1 IRCManager: Edit a server!
  193. did -b ircmanager 2
  194. did -ar ircmanager 3 Edit Server
  195. did -ar ircmanager 4 Reset
  196. did -ar ircmanager 5 Cancel
  197. did -ar ircmanager 17 Click 'Edit Server' to save the new server settings!
  198. did -h ircmanager 20-24
  199. did -arbv ircmanager 30 $did(2).seltext
  200. did -arv ircmanager 31 %ircmanager.port. [ $+ [ $did(2).seltext ] ]
  201. did -arv ircmanager 32 %ircmanager.chan. [ $+ [ $did(2).seltext ] ]
  202. did -arv ircmanager 33 %ircmanager.nickname. [ $+ [ $did(2).seltext ] ]
  203. did -arv ircmanager 34 %ircmanager.nickpass. [ $+ [ $did(2).seltext ] ]
  204. }
  205. }
  206. elseif (%ircmanager.status == server.add) {
  207. did -ar ircmanager 30-34
  208. }
  209. elseif (%ircmanager.status == server.edit) {
  210. did -ar ircmanager 31 %ircmanager.port. [ $+ [ $did(2).seltext ] ]
  211. did -ar ircmanager 32 %ircmanager.chan. [ $+ [ $did(2).seltext ] ]
  212. did -ar ircmanager 33 %ircmanager.nickname. [ $+ [ $did(2).seltext ] ]
  213. did -ar ircmanager 34 %ircmanager.nickpass. [ $+ [ $did(2).seltext ] ]
  214. }
  215. }
  216. if ($did == 5) {
  217. ;DEL Server
  218. if (%ircmanager.status == server.list) {
  219. if ($did(2).seltext == $NULL) {
  220. did -ar ircmanager 101 Select a server!
  221. did -ar ircmanager 17 Please add a server!
  222. }
  223. if ($did(2).seltext != $NULL) {
  224. set %ircmanager.status server.del
  225. did -ar ircmanager 1 IRCManager: Delete a server!
  226. did -b ircmanager 2
  227. did -ar ircmanager 3 Del Server
  228. did -arb ircmanager 4 Edit Server
  229. did -ar ircmanager 5 Cancel
  230. did -ar ircmanager 17 Click 'Del Server' to delete the selected server!
  231. }
  232. }
  233. else {
  234. set %ircmanager.status server.list
  235. did -ar ircmanager 1 IRCManager: Your Servers!
  236. did -e ircmanager 2
  237. did -are ircmanager 3 Add Server
  238. did -are ircmanager 4 Edit Server
  239. did -are ircmanager 5 Del Server
  240. did -ar ircmanager 17
  241. did -v ircmanager 20-24
  242. did -h ircmanager 30-34
  243. did -h ircmanager 50-54
  244. }
  245. }
  246. if ($did == 6) {
  247. ;Server UP
  248. if ($did(2).seltext == $NULL) {
  249. did -ar ircmanager 101 Select a server!
  250. did -ar ircmanager 17 Please add a server!
  251. }
  252. else {
  253. if ($findtok(%ircmanager.serverlist,$did(2).seltext,1,124) > 1) {
  254. set %ircmanager.serverlist.temp $gettok(%ircmanager.serverlist,$calc($findtok(%ircmanager.serverlist,$did(2).seltext,1,124)-1),124)
  255. set %ircmanager.serverlist $reptok(%ircmanager.serverlist,$gettok(%ircmanager.serverlist,$calc($findtok(%ircmanager.serverlist,$did(2).seltext,1,124)-1),124),$did(2).seltext,1,124)
  256. set %ircmanager.serverlist $reptok(%ircmanager.serverlist,$did(2).seltext,%ircmanager.serverlist.temp,2,124) $+ |
  257. did -o ircmanager 2 $calc($did(2).sel - 1) $did(2).seltext
  258. did -o ircmanager 2 $did(2).sel %ircmanager.serverlist.temp
  259. unset %ircmanager.serverlist.temp
  260. }
  261. }
  262. }
  263. if ($did == 7) {
  264. ;Server DOWN
  265. if ($did(2).seltext == $NULL) {
  266. did -ar ircmanager 101 Select a server!
  267. did -ar ircmanager 17 Please add a server!
  268. }
  269. else {
  270. if ($findtok(%ircmanager.serverlist,$did(2).seltext,1,124) < $numtok(%ircmanager.serverlist,124)) {
  271. set %ircmanager.serverlist.temp $gettok(%ircmanager.serverlist,$calc($findtok(%ircmanager.serverlist,$did(2).seltext,1,124)+1),124)
  272. set %ircmanager.serverlist $reptok(%ircmanager.serverlist,$gettok(%ircmanager.serverlist,$calc($findtok(%ircmanager.serverlist,$did(2).seltext,1,124)+1),124),$did(2).seltext,1,124)
  273. set %ircmanager.serverlist $reptok(%ircmanager.serverlist,$did(2).seltext,%ircmanager.serverlist.temp,1,124) $+ |
  274. did -o ircmanager 2 $calc($did(2).sel + 1) $did(2).seltext
  275. did -o ircmanager 2 $did(2).sel %ircmanager.serverlist.temp
  276. unset %ircmanager.serverlist.temp
  277. }
  278. }
  279. }
  280. if ($did == 40) {
  281. if ($did(40).state == 1) {
  282. set %ircmanager.setting.access on
  283. did -e ircmanager 41
  284. }
  285. if ($did(40).state == 0) {
  286. set %ircmanager.setting.access off
  287. did -b ircmanager 41
  288. }
  289. }
  290. if ($did == 41) {
  291. if ($did(40).state == 1) {
  292. set %ircmanager.setting.startup on
  293. }
  294. if ($did(40).state == 0) {
  295. set %ircmanager.setting.startup off
  296. }
  297. }
  298. if ($did == 100) {
  299. if (%ircmanager.status != server.list) {
  300. did -ar ircmanager 17 Please return to main menu first!
  301. did -ar ircmanager 101 Are you sure you want to close without saving? Return to main menu!
  302. /halt
  303. }
  304. }
  305. if ($did(101).text != $NULL) {
  306. .timerIRCMMessage 1 04 { did -ar ircmanager 101 }
  307. }
  308. }
  309. if ($devent == close) {
  310. if ($timer(0) != 0) {
  311. .timerIRCM* off
  312. }
  313. }
  314. }
  315. on *:start: {
  316. if ((%ircmanager.setting.access == on) && (%ircmanager.setting.startup == on)) {
  317. echo -a 3Loading IRCManager settings...
  318. set %ircmanager.connections $numtok(%ircmanager.serverlist,124)
  319. var %x 1
  320. while (%x <= $numtok(%ircmanager.serverlist,124)) {
  321. echo -s 4----
  322. echo -s 4Connecting to $gettok(%ircmanager.serverlist,%x,124) at port %ircmanager.port. [ $+ [ $gettok(%ircmanager.serverlist,%x,124) ] ]
  323. echo -s 4You are now known as %ircmanager.nickname. [ $+ [ $gettok(%ircmanager.serverlist,%x,124) ] ]
  324. echo -s 4Configuration compleet! Have a nice day and enjoy chatting!
  325. echo -s 4IRCManager %ircmanager.version by Superior
  326. echo -s 4----
  327. inc %x
  328. }
  329. var %i 1
  330. if (%x == 0) {
  331. echo -s 4----
  332. echo -s 4No servers added to IRCManager
  333. echo -s 4IRCManager %ircmanager.version by Superior
  334. echo -s 4----
  335. }
  336. var %i 1
  337. while (%i < %x) {
  338. if (%i == 1) {
  339. .timer $+ %i 1 3 /server $gettok(%ircmanager.serverlist,%i,124) + $+ %ircmanager.port. [ $+ [ $gettok(%ircmanager.serverlist,%i,124) ] ]
  340. }
  341. elseif (%i != 1) {
  342. .timer $+ %i 1 $calc(%i * 3) /server -m $gettok(%ircmanager.serverlist,%i,124) + $+ %ircmanager.port. [ $+ [ $gettok(%ircmanager.serverlist,%i,124) ] ]
  343. }
  344. inc %i
  345. }
  346. }
  347. }
  348.  
  349. on *:connect: {
  350. if (%ircmanager.setting.access == on) {
  351. var %i 1
  352. while (%i <= $numtok(%ircmanager.serverlist, 124)) {
  353. if ($gettok($server,$calc($numtok($server, 46) - 1) -,46) == $gettok($gettok(%ircmanager.serverlist,%i,124),2-,46)) {
  354. nick %ircmanager.nickname. [ $+ [ $gettok(%ircmanager.serverlist,%i,124) ] ]
  355. if (%ircmanager.nickpass. [ $+ [ $gettok(%ircmanager.serverlist,%i,124) ] ] != $NULL) {
  356. identify %ircmanager.nickpass. [ $+ [ $gettok(%ircmanager.serverlist,%i,124) ] ]
  357. }
  358. var %x 1
  359. while (%x <= $numtok(%ircmanager.chan. [ $+ [ $gettok(%ircmanager.serverlist,%i,124) ] ],44)) {
  360. join $gettok(%ircmanager.chan. [ $+ [ $gettok(%ircmanager.serverlist,%i,124) ] ],%x,44)
  361. inc %x
  362. }
  363. dec %ircmanager.connections
  364. }
  365. inc %i
  366. }
  367. }
  368. }
  369.  
  370. on *:NOTICE:*nickname is registered*:*: {
  371. if ((%ircmanager.setting.access == on) && ($nick == NickServ) && (%ircmanager.connections == 0)) {
  372. var %i 1
  373. while (%i <= $numtok(%ircmanager.serverlist, 124)) {
  374. if (($gettok($gettok(%ircmanager.serverlist,%i,124),2-,46) == $gettok($server,$calc($numtok($server, 46) - 1) -,46)) && ($me == %ircmanager.nickname. [ $+ [ $server ] ])) {
  375. msg nickserv identify %ircmanager.nickpass. [ $+ [ $server ] ]
  376. echo -s 4----
  377. echo -s 4IRCManager has identified you at $server ( $+ $gettok(%ircmanager.serverlist,%i,124) $+ ) $+ ! [Identification requested by $nick $+ ]
  378. echo -s 4----
  379. }
  380. inc %i
  381. }
  382. }
  383. }

Download code! Download code (.txt)

 Stemmen
Niet ingelogd.

 Reacties
Post een reactie
Lees de reacties (2)
© 2002-2024 Sitemasters.be - Regels - Laadtijd: 0.029s