Auto Identify (for mIRC bot)

By TochA1551 on Aug 06, 2012

Simple auto identify script for ur mIRC bot.

How it works ?

  1. You need to create owners.txt file in ur bot's folder (example mIRCbot->create it here)
  2. !addowner nick or !delowner nick to give someone bot owner status
  3. !autologin on/off - to toggle on/off auto identify/login our bot to irc network (only users which was add by us to bot owners list can use that cmd !)
  4. Happy use ;)
 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 !
  }
}
}

Comments

Sign in to comment.
TochA1551   -  Sep 08, 2012

You can always add line that if nick is logged in to irc service = add nick can stay + fake guy would need to ligin with nick to run the script :)

 Respond  
blackvenomm666   -  Sep 06, 2012

some networks won't even allow you to switch to a nickname without having put in the pw.

 Respond  
Abcdefmonkey   -  Sep 05, 2012

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.

 Respond  
blackvenomm666   -  Sep 05, 2012

that may be true but they would still need the pw for the nickname @alimak96

 Respond  
alimak96   -  Sep 05, 2012

Abcdefmonkey , also if you use only nicknames anyone can login with that nickname and have the access to the commands

 Respond  
Abcdefmonkey   -  Aug 20, 2012

Hmm, looks okay. I wouldn't use nicknames as a way to save owners. Preferably, I would use their hostname. Maybe someone who has access to the bot decides to change nicknames, then they wouldn't have access. $address($nick,3) would suffice when saving.

 Respond  
TochA1551   -  Aug 08, 2012

Fixed all problems, script should work good now :)

 Respond  
TochA1551   -  Aug 07, 2012

MoshMage you just change this part:

#autologin on
on *:connect: {
  msg nickserv identify botircpassword
}
#autologin end

just change msg nickserv identify pass to command which are you using to login to Qserver (example msg userlogin login password)

 Respond  
MoshMage   -  Aug 07, 2012

@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 ?

 Respond  
TochA1551   -  Aug 07, 2012

Well idk why but now script don't check's if $nick who used cmd is on owners.txt list

 Respond  
blackvenomm666   -  Aug 06, 2012

also you have some bracket misplacements you may want to fix such as the double one at the end of
f ($2 == on) || ($read(owners.txt, s, $nick) != $null) { {

 Respond  
blackvenomm666   -  Aug 06, 2012

you could really shorten this with some regex but i'm not good at regex so i'll leave that to the pro's lol

 Respond  
blackvenomm666   -  Aug 06, 2012

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

autologin off

on *:connect: {
msg nickserv identify
}

autologin end

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 !
}
}

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.