Next time you connect to a server it will ask you the questions needed to add this to your ajoin.
on *:START:{
server irc.nixtrixirc.net
play aserver2.txt
}
on *:CONNECT:{
if ($read(aserver.txt, w, * $+ $network $+ *) == $network) {
if (% $+ $network $+ .chans) {
if (% $+ $network $+ .pass) {
msg nickserv identify % $+ $network $+ .pass
join % $+ $network $+ .chans
}
else {
set % $+ $network $+ .pass $?="Enter NickServ Password:"
}
}
else {
set % $+ $network $+ .chans $?="Enter Auto-Join Channels:"
}
}
else {
if ($?!="Do you wish to add this server to auto join?" == $true) {
set % $+ $network $+ .chans $?="Enter Auto-Join Channels:"
timer 1 0 set % $+ $network $+ .pass $?="Enter NickServ Password:"
write aserver.txt $network
write aserver2.txt /server -m $serverip
}
else {
halt
}
}
}
alias serveradd {
if (% $+ $network $+ .chans) {
echo This network is already on your ajoin!
halt
}
else {
write aserver.txt $1
set % $+ $network $+ .chans $?="Enter Auto-Join Channels:"
set % $+ $network $+ .pass $?="Enter NickServ Password:"
write aserver.txt $network
write aserver2.txt /server -m $serverip
}
}
Using the "on connection" routine can be hazardous if the server you're connecting to is a "bounce" server, which will immitate your normal server, which would leave this script to think it's actually connecting to the real server, giving away your information. It's an old IRC hack & this script sorta opens that weakness.
I suggest setting a variable with the connection ID ($cid) and then checking with that, eliminating possibilites of a hack:)