Auto-join Dialog

By slub77 on Feb 02, 2010

This will allow you to set up auto-joins no matter what you are, aka op or not.

The dialog allows you a quick and more simple Way of controlling these channels that you join, along side the drop down menu that allows you to choose the network you automatically join.

Image

^^^^^^^^^^^^^^^^^^^
By request i made it look better.

TEST SCRIPT
;==========================================Connect
on 1:CONNECT:$joinps
;==========================================
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;==========================================Menu
menu * {
  Auto-Join
  .Dialog:dialog -ma auto auto 
  .Refresh:$joinps
}
;==========================================
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

;==========================================Dialog
dialog auto {
  title Auto-Join
  size -1 -1 208 118
  option dbu

  list 1, 9 25 90 80,
  edit , 2, 105 27 80 10, disable, center
  edit , 3, 105 40 80 10, disable, center
  button +, 7, 187 27 10 10, disable
  button -, 8, 187 37 10 10, disable
  button Refresh, 10, 9 105 90 12
  combo 11, 9 10 90 80, drop
  button "Credits >", 12, 160 70 30 10, multi
  button "< < < < < < < < <", 13, 190 60 10 50, 
  box  Credits, 14, 105 57 80 60  
  text Made by Slub77, 15, 110 67 80 10
  text Posted on Hawkee, 16, 110 87 70 10
  link http://www.hawkee.com/snippet/7249/,17, 110 97 70 20
  text Please select a netowrk to organize., 18, 105 10 90 10
}
;==========================================
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;==========================================Initiatiate

on *:dialog:auto:init:*:{
  did -h $dname 12
  $netl
}
;==========================================
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;==========================================Sclick
on 1:DIALOG:auto:sclick:7:$pnum
;-=-=-=-=-=-
on 1:DIALOG:auto:sclick:8:{
  if $did(1).seltext {
    remini joina.ini $did(11,0).seltext $qnum
    echo -a Deleted 
    $autoc
  }
  else { did -o $dname 2 1 Not-Avaiable } 
}
;-=-=-=-=-=-
on 1:DIALOG:auto:Sclick:10:$autoc

;-=-=-=-=-=-

on *:DIALOG:auto:sclick:11:{
  did -r $dname 1
  var %a 100
  var %b 1
  var %c 1
  var %d 1
  did -e $dname 7,8
  :next
  if %c == %a { halt }
  else {
    if !$readini(joina.ini, $did(11,0).seltext, %b) { inc %c | inc %b | goto next }
    else { 
      did -i $dname 1 %d $readini(joina.ini, $did(11,0).seltext, %b) 
      inc %c 
      inc %b 
      inc %d 
    goto next }
  }
}
;-=-=-=-=-=-
on *:DIALOG:auto:sclick:12:{
  did -h $dname 12 | did -v $dname 13-17
}

on *:DIALOG:auto:sclick:13:{
  did -v $dname 12 | did -h $dname 13-17
}

;===============================================================
;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
;===============================================================ALIAS
alias -l pnum {
  $?="Enter the channel you want to join when you join $did(auto,11,0).seltext "
  var %a 100
  var %b 1
  var %c 1
  var %d 1
  did -e $dname 7,8
  :next
  if %c == %a { halt }
  else {
    if !$readini(joina.ini, $did(auto,11,0).seltext, %b) { writeini joina.ini $did(auto,11,0).seltext %b $replace($!,$!,$+($chr(35),$!))) | $autoc }

    else { inc %c | inc %b | goto next }
  }
}
;-=-=-=-=-=-
alias autoc {
  var %a $dname
  dialog -x %a %a
  dialog -ma %a %a
}
;-=-=-=-=-=-
on 1:DIALOG:auto:Sclick:1:{
  did -o $dname 2 1 $did(11,0).seltext
  did -o $dname 3 1 Number: $qnum

}
;-=-=-=-=-=-
alias -l netl {
  var %a 1
  var %b 100
  :loop
  if %a == %b { goto secl }
  if $readini(joina.ini, network, %a) != $network { inc %a | goto loop }
  else { $ifdone }
  :secl  
  var %a 1
  var %b 100 
  :poop
  if %a == %b { writeini joina.ini network 1 $network | $ifdone }

  if $readini(joina.ini, network, %a) { inc %a | goto poop }
  else { writeini joina.ini network %a $network | $ifdone }

}
;-=-=-=-=-=-
alias -l ifdone {
  set %a $calc($ini(joina.ini, network, 0) + 1)
  set %b 1
  set %c 1
  :secp
  if %c == %a { halt }
  else { did -i auto 11 %b $readini(joina.ini, network ,%b) | inc %c | inc %b | goto secp  }
}
;-=-=-=-=-=-
alias -l qnum {
  var %a 100
  var %b 1
  var %c 1
  var %d 1
  did -e $dname 7,8
  :next
  if %c == %a { halt }
  else {
    if !$readini(joina.ini, $did(11,0).seltext, %b) { inc %c | inc %b | goto next }
    else { 
      if $readini(joina.ini, $did(11,0).seltext, %b) == $did(auto,1).seltext { return %b }
      else {
        inc %c 
        inc %b 
        inc %d 
      goto next }
    }
  }
}
;-=-=-=-=-=-
alias joinps {
  var %a 1
  var %b 100
  :loop
  if %a == %b { halt }
  else {
    if $readini(joina.ini, $network, %a) {
      /j $readini(joina.ini, $network, %a) 
      inc %a 
      goto loop
    }
    else { inc %a | goto loop }
  }
}
;-=-=-=-=-=-

Comments

Sign in to comment.
slub77   -  Feb 03, 2010

on that note jethro_ , I made it seem more appealing, and at the same time, made my ego well +1 lol

UPDATE
New Ego level: 1

 Respond  
Jethro   -  Feb 03, 2010

Everybody is different. We even do things differently. In your own opinion, you reckon your dialog's looking fine, but in the public eye, you're going to expect various opinions or criticism. Some don't care about the look, and some mainly see in the aspect of functionality. If we all conform to the same thing or idea, the world will likely be a boring place.

 Respond  
slub77   -  Feb 03, 2010

:O i shall make the dialog better looking >.<

 Respond  
napa182   -  Feb 02, 2010

the dialog is a bit ugly to much unused space. as well as all the goto's. I'd have to concur with sunslayer's comment.

 Respond  
sunslayer   -  Feb 02, 2010

no lol its ugly (fu.gly is censored)
just move some things around and make it smaller

 Respond  
slub77   -  Feb 02, 2010

sorry :(

and by that do you mean my dialog is crap :(

 Respond  
sunslayer   -  Feb 02, 2010

the dialog is... fugly
lol
instead of using multiple goto's you should look at using a while loop instead

 Respond  
Ghost-writer   -  Feb 02, 2010

Nice, this is the first time iv seen somone code a auto join script like this. Good job and 3 points for origonality, 8/10.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.