Connect to a new Server

By log2 on Jun 11, 2005

This will create a dialog that lets you connect to a new server withought having to go to the options menu... it's not much but I made it for a friend and I decided to submit it to this site... Usage: Right-click in the channel or the Server window

menu status,channel {
  New Server: dialog -md Connect Connect
}
dialog Connect {
  title "Connect to a new Server"
  size -1 -1 300 200
  text "Connecting to a new server, fill in the form below:",1,10 15 300 15
  button "Connect",2,100 150 50 25
  button "Cancel",3,150 150 50 25,cancel
  edit "",4,60 50 150 20
  text "Server: ",5,20 52 40 15
  text "ex: irc.p2pchat.net",6,65 70 100 15
  text "Port: ",7,20 92 30 15
  edit "",8,60 90 50 20
  text "Default: 6667",9, 115 92 90 15
  check "Connect in a new window?",10, 20 115 150 15
}
on *:DIALOG:Connect:init:0: {
  did -c Connect 10
  did -a Connect 4 %server
  did -a Connect 8 %port
}
on *:DIALOG:Connect:sclick:2: {
  if (!$did(Connect,4)) {
    did -a Connect 4 You need a server!
  }
  else {
    if ($did(Connect,8)) {
      if ($did(Connect,10).state == 1) {
        /server -mp $did(Connect,4) $did(Connect,8)
      }
      else {
        /server -p $did(Connect,4) $did(Connect,8)
      }
    }
    else {
      if ($did(Connect,10).state == 1) {
        /server -mp $did(Connect,4) 6667
      }
      else {
        /server -p $did(Connect,4) 6667
      }
    }
  }
  %server = $did(Connect,4)
  %port = $did(Connect,8)
  dialog -x Connect
}

Comments

Sign in to comment.
MitchellGled   -  Feb 11, 2012

Works Great!

 Respond  
Whitey   -  Jul 06, 2005

Yea, nice simple script for n00bs, should be in a big full package though :).

/Whitey

 Respond  
BlueFire   -  Jun 12, 2005

Thanks for info/tip, QuickStep :)

@Ripp0n, i agree...

 Respond  
QuickStep   -  Jun 12, 2005

In response to bluefire, usage of /s should be avoided, because its a command in the alias list which can be deleted by the user, use /server instead in scripts

 Respond  
supergeo   -  Jun 12, 2005

you can connect to a server by /server . I think the point of it is so that we can look at a list of servers? And choose one?

 Respond  
Ripp0n   -  Jun 12, 2005

Rather useless but good for someone who is either
1) lazy
or
2) doesn\'t know simple commands

 Respond  
log2   -  Jun 11, 2005

More interresting this way.. and easier to use

 Respond  
BlueFire   -  Jun 11, 2005

stynx: /s -m network port -j channel
example /s -m irc.undernet.org 7000 -j hawkee.com

Dialog for such easy command in my opinion are not necessary...

 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.