This is an addon that requires anyone ownering to have to whisper a secondary code in order to owner. The user just has to right click on the persons nickname, and click on "Secure Owner > Make Owner <nickname>". A random code will be given, and stored in an ini file.
When that person tries to owner the users script will deowner that person, and whisper that the secondary code is needed. If the potential owner gives the right code the code is replaced with a new code, and the new code is given to the potential owner. The potential owner is then ownered.
If he/she doesn't give the right code they are given 3 more chances to whisper the right code. If the 3 more chances are used up without the right code given they are immediately kicked, and banned for 5 minutes. Here is the addon code...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;Secondary Code To Owner by, Warrior124.;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
on *:OWNER:#:{
if ($opnick != $me) && (%secondarycode. [ $+ [ $chan ] ] == $true) {
if (%givenpass. [ $+ [ $opnick ] ]) unset %givenpass. [ $+ [ $opnick ] ]
else {
set %needed_code. [ $+ [ $opnick ] ] $ial($opnick).addr
mode # -o $opnick
msg $opnick Sorry $opnick $+ , but a secondary code is required to owner here.
msg $opnick Please give the secondary code you were provided with.
}
}
}
on *:TEXT:*:?:{
if (%needed_code. [ $+ [ $nick ] ]) {
if ($nick ison $comchan($me,1)) set %ialnick. [ $+ [ $nick ] ] $ial($ifmatch).addr
if ($strip($1-) == $readini(SecondaryCodes.ini,$comchan($me,1),%ialnick. [ $+ [ $nick ] ])) {
set %givenpass. [ $+ [ $nick ] ] %ialnick. [ $+ [ $nick ] ]
mode $comchan($me,1) +q $nick
set %newpass $rand(11111,9999999999)
writeini SecondaryCodes.ini $comchan($me,1) %ialnick. [ $+ [ $nick ] ] %newpass
msg $nick Your new pass is: $dc.decode($strip(%newpass))
msg $nick Please remember this pass for next use. Whenever you owner again the pass will change again for security purposes.
unset %newpass
unset %ialnick. [ $+ [ $nick ] ]
unset %needed_code. [ $+ [ $nick ] ]
}
else {
if (!%tryagain) set %tryagain 3
msg $nick Sorry $nick $+ , but that is the wrong code. Please provide the code given to you to owner here. You have %tryagain remaining.
dec %tryagain
if (%tryagain = 0) {
access $comchan($me,1) add deny %ialnick. [ $+ [ $nick ] ] 5
kick $comchan($me,1) $nick [Sorry $nick $+ , but you've used up your chances. Banned 5 minutes]
unset %ialnick. [ $+ [ $nick ] ]
unset %needed_code. [ $+ [ $nick ] ]
}
}
}
}
menu * {
-
Secure Owner is $chr(91) $+ $iif(%secondarycode. [ $+ [ $chan ] ] == $true,On,Off) $+ $chr(93)
.$iif($menu == channel,$iif(%secondarycode. [ $+ [ $chan ] ] == $true,Turn Off?,Turn On?)) : if (%secondarycode. [ $+ [ $chan ] ] == $true) unset %secondarycode. [ $+ [ $chan ] ] | else set %secondarycode. [ $+ [ $chan ] ] $true
.$iif($menu == nicklist,Make Owner $1) : set %newpass $rand(11111,9999999999) | writeini SecondaryCodes.ini $chan $ial($1).addr %newpass | msg $1 Your secondary pass is: %newpass | msg $1 Please remember this pass for next use. Whenever you owner again the pass will change again for security purposes. | unset %newpass | mode $2 +q $1
-
}