Quakenet 'Q' Auth Dialog

By Kirby on Nov 18, 2008

My first dialog! :)
This snippet only works for the network Quakenet, and you must have a Q account (auth with Q).
Blitzjager taught me how to make dialogs yesterday, and helped construct this dialog (kudos to him).
Anyways, here it is:

Image

on *:load:{ set %auth $?:"Please type in your Q auth." | set %authpass $?*:"Please type in your Q password." | noop $input(Done. Use /qauth to change settings if needed.,uwo,Notice) }

on *:connect: { if ($network == Quakenet) { .msg Q@CServe.quakenet.org AUTH %auth %authpass | mode $me +x } }

alias -l authchans { set %authchans $addtok(%authchan,$1,44) }

alias QAuth { dialog $iif($dialog(QAuth),-v,-m) QAuth QAuth }

menu * {
  QAuth: QAuth
}

dialog QAuth {
  title "QAuth"
  size -1 -1 100 105
  option dbu
  text "Auth Name", 100, 36 2 26 10, nowrap
  text "Auth Pass", 99, 36 22 26 10, nowrap
  edit "", 1, 25 10 50 10, center autohs
  edit "", 2, 25 30 50 10, center pass autohs
  button "Okay!", 3, 0 93 50 10, ok
  button "Cancel!", 4, 50 93 50 10, cancel
  text "Channels", 98, 36 42 26 10, nowrap
  button "Add", 5, 6 53 25 10
  button "Remove", 6, 6 63 25 10
  list 7, 35 50 55 35, sort vsbar
  button "ClearAll", 8, 50 81 25 10
  button "AuthNow", 9, 25 81 25 10
}
on *:dialog:QAuth:*:*: {
  if ($devent == init) && ($did == 0) { did -a $dname 1 %auth | did -a $dname 2 %authpass | didtok $dname 7 44 %authchans }
  if ($devent == sclick) {
    if ($did == 3) { set %auth $did(1) | set %authpass $did(2) }
    if ($did == 4) {
      if ($did(1) != %auth || $did(2) != %authpass) {
        var %authmod $?!="Do you want to save your changes?"
        if (%authmod == $true) { set %auth $did(1) | set %authpass $did(2) }
      }
      dialog -x $dname $dname
    }
    if ($did == 5) { set %authchans $addtok(%authchans,$?="What channel would you like to add?",44) | did -r $dname 7 | didtok $dname 7 44 %authchans }
    if ($did == 6) { set %authchans $remtok(%authchans,$did(7).seltext,1,44) | did -r $dname 7 | didtok $dname 7 44 %authchans }
    if ($did == 8) { var %authmod $?!="Are you sure you want to clear everything?" | $iif(%authmod == $true,unset %auth %authpass %authchans) | dialog -x $dname $dname }
    if ($did == 9) {
      if ($address($me,4) == *!*@*.users.quakenet.org) { join %authchans }
      if (!$server) { noop $input(You are not connected to Quakenet!,uwo,Error!) }
      else { set %auth $did(1) | set %authpass $did(2) | .msg Q@CServe.quakenet.org AUTH %auth %authpass | mode $me +x }
    }
  }
}

raw 396:*:{ echo -a Mode +x set ( $+ $2 $+ ) | join %authchans }

Comments

Sign in to comment.
pilauda   -  Sep 15, 2009

it says to me: Error allocating stack memory
???

 Respond  
Kirby   -  Feb 07, 2009

I'm working on a multi-server dialog right now. Be sure to expect some updates.

 Respond  
PuNkTuReD   -  Feb 04, 2009

i keep looking at it thinking your authing to the channels, i know they are auto join channels so maybe put that on the dialog, AutoJoin Channels
just a suggestion, its gd to see some quakenet snippets on here, it works hell differently to other servers.
8/10

 Respond  
Kirby   -  Feb 04, 2009

Compressed.

 Respond  
big_boya   -  Dec 23, 2008

oh xD

 Respond  
Kirby   -  Dec 22, 2008

big_boya said

how you work it? :P
When you load the script, it asks you for your Quakenet AuthName and Password; fill those in.
Type in 'QAuth' or right click a menu and hit 'QAuth' to open the dialog.
There, you can add or delete auto-join channels when you connect to Quakenet and mode +x.
Hit the button 'AuthNow!' to authenticate with Q and join the auto-join channels (if you already haven't joined so).

 Respond  
big_boya   -  Dec 22, 2008

how you work it? :P

 Respond  
Simford   -  Nov 20, 2008

It r pretty :D

 Respond  
Blitzjager   -  Nov 19, 2008

Just have to add more servers now xP

 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.