mIRC Home    About    Download    Register    News    Help

Print Thread
#78506 08/04/04 05:11 PM
Joined: Feb 2004
Posts: 33
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Feb 2004
Posts: 33
I am trying to build a auto login/auth/identify script for quakenet and chatbear. Here is the code:
Code:
menu status,menubar {
  Annoyance.Inc AutoLogin
  .QuakeNet
  ..Set Username ( $+ %qnetuname $+ ) :/setqnetuser $$?="Username:"
  ..Set Password ( $+ %qnetpword $+ ) :/setqnetpass $$?="Password:"
  ..Connect :/server -m irc.quakenet.org
  .ChatBear
  ..Set Username ( $+ %cbuname $+ ) :/setcbuser $$?="Username:"
  ..Set Password ( $+ %cbpword $+ ) :/setcbpass $$?="Password:"
  ..Connect :/server -m irc.chatbear.com
  .On/Off ( $+ %autologstatus $+ ) :/autologswitch
  .About :/aboutautolog
}

alias setqnetuser {
  set -n %qnetuname $$1
  echo **Username for Qnet set!
}

alias setqnetpass {
  set -n %qnetpword $$1
  echo **Password for Qnet set!
}

alias setcbuser {
  set -n %cbuname $$1
  echo **Username for ChatBear Set!
}

alias setcbpass {
  set -n %cbpword $$1
  echo **Password for ChatBear set!
}

alias autologswitch {
  if ( %autologstatus == 1 ) {
    set -n %autologstatus 0
    echo **AutoLogin System is OFF
  }
  elseif ( %autologstatus == 0 ) {
    set -n %autologstatus 1
    echo **AutoLogin System is ON
  }
}

alias aboutautolog {
  echo 7,1.:Annoyance.Inc Autologin for Qnet and ChatBear:.
  echo 1,7.:Version 0.1:.
}

on *:CONNECT: {
  if ( %autologstatus == 1 ) {
    if ( $server == irc.quakenet.org ) {
      msg Q@CServe.quakenet.org auth %qnetuname %qnetpword
    }
    if ( $server == irc.chatbear.com ) {
      msg Marvin !identify %cbuname %cbpword
    }
  }
}


Now, when connect to any of the servers that are in the if statements, and with the status as 1, nothing happens. It just connects! WTF!?!?!?! Why won't it do the commands?


Adrenaline starts to flow, thrashing all around, acting like a maniac, WHIPLASH!!!
#78507 08/04/04 07:13 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
This is a old addon i made, maybe this can help you? copy to remote..

Code:
on *:connect: {
  if (%aut_connect == On) .msg Q@CServe.quakenet.org AUTH %qnick %qpass
  if (%aut_connect == On) echo -s $chr(176) $+ $chr(176) Authed to Q on connect.
}

alias sheck_nwork {
  if ($server == $null) { echo -a $chr(176) $+ $chr(176) Connect to a Quakenet first. | halt }
  elseif ($network != quakenet) { echo -a $chr(176) $+ $chr(176) This is only for QuakeNet users. | halt } | qdialog
}

dialog qdialog {
  title "°°Q-Auth°°"
  size -1 -1 100 80
  option dbu
  button  "&Ok!", 1, 60 65 25 10, ok
  box "&Q-Auth", 2, 5 5 90 57
  text "&Your nick  :", 101, 10 18 27 10
  edit "", 102, 37 15 50 10, autohs
  text "&Your pass :", 103, 10 32 27 10
  edit "", 104, 37 30 50 10, autohs
  text "&E-Mail       :", 105, 10 45 27 10
  edit "", 106, 37 45 50 10, autohs
  button  "&Unset!", 3, 20 65 25 10
  menu "&Help", 107
  item "&About?", 108, 107
  item "&How does it work?", 109, 107
  item "&Contact Author", 110, 107
  menu "&Auth on connect?", 111
  item "&Enable/Disable?", 112, 111
}

alias qdialog {
  dialog -m qdialog qdialog
  did -a qdialog 102 %qnick
  did -a qdialog 104 %qpass
  did -a qdialog 106 %qmail
}

on *:dialog:qdialog:*:*: {
  if ($devent == sclick) {
    if ($did == 1) { if (%mail_auth == 1) .msg Q@CServe.quakenet.org EMAIL %qmail | set %mail_auth == 2 }
    if ($did == 3) { did -r qdialog 102 | did -r qdialog 104  | did -r qdialog 106 | unset %qnick | unset %qpass | unset %qmail | set %mail_auth 2 }
  }
  if ($devent == menu) {
    if ($did == 108) { qauth.about }
    if ($did == 109) { qauth.help }
    if ($did == 110) { .run mailto:sparta@ownz.every1.net ?subject=Q-Auth system }
    if ($did == 112) { nwork_sheck }
  }
  if ($did == 102) { set %qnick $did(102).text }
  if ($did == 104) { set %qpass $did(104).text }
  if ($did == 106) { set %mail_auth 1 | set %qmail $did(106).text }
}

alias nwork_sheck {
  set %auth_to_Q $?!="Do you want to Auth to Q on Conect?" 
  if (%auth_to_Q == $true) { set %aut_connect On | echo -a $chr(176) $+ $chr(176) Auth to Q on connect Enabled! | unset %auth_to_Q }
  if (%auth_to_Q == $false) { set %aut_connect Off | echo -a $chr(176) $+ $chr(176) Auth to Q on connect Disabled! | unset %auth_to_Q }
}

alias rec.passq {
  if (%qmail == $null) { echo -a $chr(176) $+ $chr(176) Edit the setings in Auth System, make shure to enter a valid E-mail address, dialog open in 5 sec. | .timerauth 1 5 sheck_nwork | halt }
  else .msg Q@CServe.quakenet.org REQUESTPASSWORD %qmail
}

menu channel {
  . $+ $chr(176) $+ $chr(176) Quaknet-system $chr(176) $+ $chr(176)
  .. $+ $chr(176) Auth System $chr(176) $+ :{ sheck_nwork }
  ..-
  .. $+ $chr(176) Q-Bot $chr(176)
  ... $+ $chr(176) Show added users:{ .msg Q chanlev # }
  ...-
  .... $+ $chr(176) Bitchmode $chr(176) $+ 
  .....Enable:{ .msg q chanflags # +b }
  .....Disable:{ .msg q chanflags # -b }
  .. $+ $chr(176) Channel limit $chr(176) $+ 
  ...Enable:{ .msg q chanflags # +c }
  ...Disable:{ .msg q chanflags # -c }
  .. $+ $chr(176) Force topic $chr(176) $+ 
  ...Enable:{ .msg q chanflags # +f }
  ...Disable:{ .msg q chanflags # -f }
  .. $+ $chr(176) Protect ops $chr(176) $+ 
  ...Enable:{ .msg q chanflags # +p }
  ...Disable:{ .msg q chanflags # -p }
  .. $+ $chr(176) Save topic $chr(176) $+ 
  ...Enable:{ .msg q chanflags # +t }
  ...Disable:{ .msg q chanflags # -t }
  .. $+ $chr(176) Welcome message $chr(176) $+ 
  ...Enable:{ .msg q chanflags # +w $$?="Channel welcome message" }
  ...Disable:{ .msg q chanflags # -w }
  ..-
  ... $+ $chr(176) Deop all $chr(176) $+ :{ .msg Q deopall # }
  .. $+ $chr(176) Show auth history $chr(176) $+ :{ .msg Q authhistory # }
  .. $+ $chr(176) Show banlist $chr(176) $+ :{ .msg Q banlist # }
  .. $+ $chr(176) Clear all bans $chr(176) $+ :{ .msg Q banclear # }
  .. $+ $chr(176) Clear chanmodes $chr(176) $+ :{ .msg Q clearchan # }
  .. $+ $chr(176) Set topic $chr(176) $+ :{ .msg Q settopic # $$?="topic?" }
  .. $+ $chr(176) Set autolimit $chr(176) $+ :{ .msg Q autolimit # }
  ..-
  .. $+ $chr(176) Recover lost password $chr(176) $+ :{ rec.passq }
  .-
  . $+ $chr(176) L-Bot $chr(176)
  .. $+ $chr(176) Add a user:{ .msg L ADDUSER $active nick $$?="Enter nick to add" }
  .. $+ $chr(176) Remove a user:{ .msg L REMOVEUSER $active nick $$?="Enter nick to remove" }
  ..-
  .. $+ $chr(176) Welcome msg
  ...Enable:{ .msg L WELCOME $active $$?="Channel welcome message" }
  ...Disable:{ .msg L WELCOME $active remove }
  ... $+ $chr(176) Clearchan:{ .msg L CLEARCHAN #channel }
  .. $+ $chr(176) Recover:{ .msg L RECOVER $$?="Enter channel to recover (#channel)" }
}


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#78508 08/04/04 07:46 PM
Joined: Feb 2004
Posts: 33
M
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Feb 2004
Posts: 33
WTF!?!?! Big code. I alreasy got it to work my way. The reason it didn't work is cos quakenet don't use it's irc address as server. I put this on the if statement now.

Code:
if (quakenet.org isin $server)


And it worked!


Adrenaline starts to flow, thrashing all around, acting like a maniac, WHIPLASH!!!
#78509 08/04/04 09:10 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
as i said it was a old addon.. and the reason it looks big is that it have a dialog too..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Link Copied to Clipboard