The original Code was for QAuth by Kirby, i just remodified it to work with Nickserv and Auto Oper instead of using the Quakenet Login being that im not a quakenet user
hope ya like it! also i will be converting this into DCX shortly :)
on *:Load:{ set %opernick $?="Please type your Nick" | set %operpass $?*:"Please type your password" | noop $input(Done. Use /auth to change settings if neede.,uwo,Notice) }
on *:connect: { if ($server == irc.majestic-irc.net) { .ns id %authpass | .oper %oper %operpass | mode $me +i } }
alias auth { dialog $iif($dialog(auth),-v,-md) auth auth }
menu * {
Authorize: auth
}
dialog auth {
title "Xtrm3me Oper"
size -1 -1 100 105
option dbu
Text "Oper Nick", 100, 36 2 26 10, nowrap
text "Oper 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 "Ok", 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 "Clear All", 8, 50 81 25 10
button "Auth Now", 9, 25 81 25 10
}
on *:dialog:auth:*:*: {
if ($devent == init) && ($did == 0) { did -a $dname 1 %oper | did -a $dname 2 %operpass | didtok $dname 7 44 %autochans }
if ($devent == sclick) {
if ($did == 3) { set %oper $did(1) | set %operpass $did(2) }
if ($did == 4) {
if ($did(1) != %oper || $did(2) != %operpass) {
var %authmod $?!="Do you want to save your changes?"
if (%authmod == $true) { set %oper $did(1) | set %operpass $did(2) }
}
dialog -x $dname $dname
}
if ($did == 5) { set %autochans $addtok(%autochans,$?="Channels to add?",44) | did -r $dname 7 | didtok $dname 7 44 %autochans }
if ($did == 6) { set %autochans $remtok(%autochans,$did(7).seltext,1,44) | did -r $dname 7 | didtok $dname 7 44 %autochans }
if ($did == 8) { var %authmod $?!="Are you sure you want to clear everything?" | $iif(%authmod == $true,unset %oper %operpass %autochans) | dialog -x $dname $dname }
if ($did == 9) {
join %autochans
if (!$server) { noop $input(You are not connected to Majestic-Irc,uwo,Error!) }
else { set %oper $did(1) | set %operpass $did(2) | .oper %oper %operpass | mode $me +i }
}
}
}
raw 396:*:{ echo -a mode +i set ( $+ $2 $+ ) | join %autochans }
i would use ini files or txt files to store the pw instead of a variable. a lot of people do not use the same pw for all servers/networks they connect to. also for the channels as well i'd have them added to some sort of file for storing instead of the variable. not only that but it cuts down on variable useage