- Code: Select all
menu * {
mIRC Autojoin:mircajoin
}
dialog mirc_ajoin {
title "mIRC Autojoin/Auto Identify by GrimReaper"
size -1 -1 200 86
option dbu
combo 1, 5 10 60 60, sort size
text "Network Select:", 4, 5 1 38 8
text "Channel Select:", 5, 67 1 38 8
combo 6, 67 10 60 60, sort size
button "Add", 7, 129 10 30 12
button "Delete", 8, 165 10 30 12
button "Refresh", 9, 129 26 30 12
button "Clear Ajoin", 10, 165 26 30 12
button "Ok", 11, 129 42 30 12, ok
button "Save Pass", 12, 165 42 30 12
text "Note: Clear Ajoin will clear", 13, 129 56 63 8
text "all channels for that Network.", 14, 129 63 71 8
text "NickServ Password:", 15, 5 73 48 8
edit "", 16, 58 72 135 10, pass autohs
menu "File", 2
item "Exit", 3, 2, cancel
}
on *:DIALOG:mirc_ajoin:init:*: {
var %majn = 1
while (%majn <= $scon(0)) {
did -a $dname 1 $scon(%majn).network
inc %majn
}
}
on *:DIALOG:mirc_ajoin:sclick:*: {
if ($did == 1) {
if (%Autojoin. [ $+ [ $did($dname,1).text ] ] == $null) {
did -r $dname 6
did -a $dname 6 No current Ajoin.
}
else {
did -r $dname 6
didtok -a $dname 6 44 %Autojoin. [ $+ [ $did($dname,1).text ] ]
did -c $dname 6 1
}
}
if ($did == 7) {
if ($did($dname,6).text == $null) { noop $input(Please enter a channel to add to Autojoin.,uwo,Error!) }
else {
var %majnnet = $did($dname,1).text
var %majnchan = $did($dname,6).text
if ($+(*,%majnchan,*) !iswm %Autojoin. [ $+ [ %majnnet ] ]) { set $+(%,Autojoin.,%majnnet) $addtok(%Autojoin. [ $+ [ %majnnet ] ],%majnchan,44) }
elseif ($+(*,%majnchan,*) iswm %Autojoin. [ $+ [ %majnnet ] ]) { noop $input(That channel is already in the Autojoin.,uwo,Error!) }
did -r $dname 6
didtok -a $dname 6 44 %Autojoin. [ $+ [ $did($dname,1).text ] ]
did -c $dname 6 $did($dname,6).lines
}
}
if ($did == 8) {
if ($did($dname,6).text == $null) { noop $input(Please enter a channel to del from Autojoin.,uwo,Error!) }
else {
var %majnnet = $did($dname,1).seltext
var %majnchan = $did($dname,6)seltext
if (* $+ %majnchan $+ * iswm %Autojoin. [ $+ [ %majnnet ] ]) { set $+(%,Autojoin.,%majnnet) $remtok(%Autojoin. [ $+ [ %majnnet ] ],%majnchan,1,44) }
elseif ($+(*,%majnchan,*) !iswm %Autojoin. [ $+ [ %majnnet ] ]) { noop $input(That channel is not in your Autojoin.,uwo,Error!) }
did -r $dname 6
didtok -a $dname 6 44 %Autojoin. [ $+ [ $did($dname,1).seltext ] ]
did -c $dname 6 $did($dname,6).lines
}
}
if ($did == 9) {
if (%Autojoin. [ $+ [ $did($dname,1).text ] ] == $null) {
did -r $dname 6
did -a $dname 6 No current Ajoin.
}
else {
did -r $dname 6
didtok -a $dname 6 44 %Autojoin. [ $+ [ $did($dname,1).text ] ]
did -c $dname 6 1
}
}
if ($did == 10) {
var %majnnet = $did($dname,1).text
unset %Autojoin. [ $+ [ %majnnet ] ]
did -r $dname 6
did -a $dname 6 No current Ajoin.
}
if ($did == 12) {
if (!$did($dname,16).text) { noop $input(Please enter your NickServ Password:,uwo,Error!) }
else {
set %Autoident. [ $+ [ $did($dname,1).text ] ] $encode($did($dname,16).text,m)
}
}
}
on *:NOTICE:*nickname is registered and protected*:?:{ if ($nick == NickServ) && (%Autoident. [ $+ [ $network ] ] != $null) { .msg NickServ identify $decode(%Autoident. [ $+ [ $network ] ],m) } }
on *:NOTICE:*Password accepted*:?:{ if ($nick == NickServ) { join %AutoJoin. [ $+ [ $network ] ] } }
alias -l mircajoin {
if (!$dialog(mirc_ajoin)) { dialog -m mirc_ajoin mirc_ajoin }
else { noop $input(The Autojoin Dialog is already opened.,uwo,Error!) }
}
Basic right click popup for Status, channel, menubar, query and nicklist will open the Dialog box.
Updated to use $addtok and $remtok, Idea's from one of my mates
Updated again: Told the "Cancel" button didn't work, so added a $did event to close the dialog.
Updated once more.. It now includes an AutoIdentify section, Although you will need to enable/uncheck the decode box in the "mIRC Options < Lock" tab.
Updated again: I have added an AutoIdentify feature to this script. I have tested it and it works.