Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 2.75 KB | None | 0 0
  1. dialog Settings {
  2.   title "interSys Script Settings"
  3.   size -1 -1 108 142
  4.   option dbu
  5.   box "Q Auth", 1, 4 2 100 60
  6.   text "Username:", 2, 8 10 29 8
  7.   text "Password:", 3, 8 22 29 8
  8.   edit "", 4, 42 10 58 10
  9.   edit "", 5, 42 22 58 10, pass
  10.   button "Connect", 6, 8 34 43 12
  11.   button "Hide IP", 7, 56 34 43 12
  12.   check "Auto Connect", 8, 8 48 42 10, left
  13.   check "Auto Hide IP", 9, 56 48 42 10, left
  14.   box "Auto join channels", 10, 4 62 100 78
  15.   list 11, 8 70 56 58, size
  16.   button "Add", 12, 68 70 31 10
  17.   button "Rem.", 13, 68 82 31 10
  18.   button "Clear", 14, 68 94 31 10
  19.   check "Auto join channels", 15, 8 128 56 10, left
  20.   button "Close", 16, 68 106 31 10
  21. }
  22.  
  23. on *:dialog:Settings:sclick:*: {
  24.   if ($did == 17) { if (!$dialog(Programs)) dialog -m Programs Programs }
  25.   if ($did == 6) { set %QUsername $did(4) | set %QPassword $did(5) | msg Q@CServe.quakenet.org AUTH %QUsername %QPassword | dialog -x $dname $dname }
  26.   if ($did == 7) { mode $me +x }
  27.   if ($did == 8) { set %QAuth $iif(%QAuth !== ON,ON,OFF) }
  28.   if ($did == 9) { set %QHide $iif(%QHide !== ON,ON,OFF) }
  29.   if ($did == 15) { set %AutoJoin $iif(%AutoJoin !== ON,ON,OFF) }
  30.   if ($did == 14) { set %Channels | did -r $dname 11 }
  31.   if ($did == 16) { dialog -x $dname $dname }
  32.   if ($did == 12) { var %Auto-Channel $input(Type Channel,eg,Auto join channels) | set %Channels $addtok(%Channels,%Auto-Channel,44) | did -r $dname 11
  33.     var %x = 1
  34.     while ($numtok(%Channels,44) >= %x) {
  35.       did -a $dname 11 $gettok(%Channels,%x,44)
  36.       inc %x
  37.     }
  38.   }
  39.   if ($did == 13) && ($did($dname,11).seltext) { set %Channels $remtok(%Channels,$gettok($did($dname,11).seltext,1,44),1,44) | did -r $dname 11
  40.     var %x = 1
  41.     while ($numtok(%Channels,44) >= %x) {
  42.       did -a $dname 11 $gettok(%Channels,%x,44)
  43.       inc %x
  44.     }
  45.   }
  46. }
  47. on *:dialog:Settings:dclick:11: { join $did($dname,11).seltext }
  48. on *:dialog:Settings:edit:*: {
  49.   if (!$did(Settings,4)) || (!$did(Settings,5)) { did -b Settings 6 }
  50.   if ($did(Settings,4)) && ($did(Settings,5)) { did -e Settings 6 }
  51. }
  52. on *:dialog:Settings:init:*: {
  53.   if (%QUsername) { did -a $dname 4 %QUsername }
  54.   if (%QPassword) { did -a $dname 5 %QPassword }
  55.   if (%QAuth == ON) { did -c $dname 8 }
  56.   if (%QHide == ON) { did -c $dname 9 }
  57.   if (!%QUsername) || (!%QPassword) { did -b $dname 6 }
  58.   if (%AutoJoin == ON) { did -c $dname 15 }
  59.   if (%Connected == ON) {
  60.     var %x = 1
  61.     while ($numtok(%Channels,44) >= %x) {
  62.       did -a $dname 11 $gettok(%Channels,%x,44)
  63.       inc %x
  64.     }
  65.   }
  66. }
  67.  
  68. on *:connect: {
  69.   if ($network == Quakenet) {
  70.     if (%QAuth == ON) && (%QUsername) && (%QPassword) { msg Q@CServe.quakenet.org AUTH %QUsername %QPassword }
  71.     if (%QHide == ON) { mode $me +x }
  72.     if (%AutoJoin == ON) { timer 1 2 join %Channels }
  73.   }
  74. }
  75. alias opd dialog -m Settings Settings
  76. menu * {
  77.   Auto Connect: opd
  78. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement