Simple auto identify script for ur mIRC bot.
How it works ?
on *:text:!addowner *:#:{
if ($nick == RealBotOnwerNick) {
write owners.txt $2
msg $chan $2 add to $me bot owners list !
}
else {
notice $nick Not Allowed $nick !
}
}
on *:text:!delowner *:#:{
if ($nick == RealBotOwnerNick) {
write -ds $2 owners.txt
msg $chan $2 deleted from $me bot owner list !
}
else {
notice $nick Not Allowed $nick !
}
}
on *:text:!autologin *:#:{
if ($2 == on) && ($read(owners.txt, nw, $nick) {
set %autologin on
msg $chan $nick toggled my auto identify mode ON !
}
elseif ($2 == off) && ($read(owners.txt, nw, $nick) {
set %autologin off
msg $chan $nick toggled ny auto identify mode OFF !
}
else {
msg $chan Sorry but you are NOT allowed to use this command $nick !
}
}
}
on *:connect: {
if (%autologin == on) {
msg nickserv identify <pass>
}
else {
if (%autologin == off) { }
}
========Other Version====================
on *:text:!addowner *:#:{
if ($nick == RealBotOwnerNick) {
write owners.txt $2
msg $chan $2 add to $me bot owners list !
}
else {
notice $nick Not Allowed $nick !
}
}
on *:text:!delowner *:#:{
if ($nick == RealBotOwnerNick) {
write -ds $2 owners.txt
msg $chan $2 deleted from $me bot owner list !
}
else {
notice $nick Not Allowed $nick !
}
}
#autologin on
on *:connect: {
msg nickserv identify ircaccountpassword
}
#autologin end
on *:text:!autologin *:#:{
if ($2 == on) && ($read(owners.txt, nw, $nick)) {
.enable #autologin
msg $chan $nick toggled my auto identify mode ON !
}
elseif ($2 == off) && ($read(owners.txt, nw, $nick)) {
.disable #autologin
msg $chan $nick toggled ny auto identify mode OFF !
}
else {
msg $chan NOT allowed $nick !
}
}
}
Although you're right @blackvenomm666 if an impostor was to switch to one of the "owner" nicknames the person would still have access to the commands regardless of being identified because the script doesn't check for such. However, some networks allow you to set a time limit for identifying, but even then for the brief moment you're on the nickname commands can be done.
that may be true but they would still need the pw for the nickname @alimak96
@TochA1551 i'm confused at why so many !add and !dels as i can't think of anyone who'd want to turn off auto-login; Still.. What happens if you're not on a Nickserved network but instead on a Qserved ?
else {
if (%autologin == off) { }
}
is an unneeded line. since you have the if %autologin == on it won't do anything if it's off.
you could get rid of that line all together the if statement by using groups such as
on *:connect: {
msg nickserv identify
}
then in your on text event change
on :text:!autologin :#:{
if ($2 == on) || ($read(owners.txt, s, $nick) != $null) { {
set %autologin on
msg $chan $nick toggled my auto identify mode ON !
}
else {
if ($2 == off) {
set %autologin off
msg $chan $nick toggled ny auto identify mode OFF !
}
}
to
on :text:!autologin :#:{
if ($2 == on) || ($read(owners.txt, s, $nick) != $null) { {
.enable #autologin
msg $chan $nick toggled my auto identify mode ON !
}
else {
if ($2 == off) {
.disable #autologin
msg $chan $nick toggled ny auto identify mode OFF !
}
}