$Auth(NICK) $Authnick(AUTH) (Multi bot usage)

Release your script here.
State:
- Author
- What it does
- Perhaps a little guide.
- Also, if the snippet is of any use to the community, it has a chance of getting posted on the main page, so don't hesitate to submit/ask!

$Auth(NICK) $Authnick(AUTH) (Multi bot usage)

Postby Patty » Tue Nov 24, 2009 5:54 pm

REMENBER: /set %MainChan #YOUR_CHANNEL (on ALL the bots (if you need more then 1 ))

Your mIRC folders for multi bot usage will be made as following: (So that they have the same "roof" folder)
../BOT/mIRC1/mIRC.exe
../BOT/mIRC2/mIRC.exe
../BOT/mIRC3/mIRC.exe
and so on..

BOT1 will find and save the auths to ../BOT/Authing.ini Where all your other bots can get the persons auth from.


The script can also be used "JUST" as BOT1.

$auth(NICK)
$autnick(AUTH)

BOT1: (The bot that will log and find all the auths, can also be used as the "ONLY" bot..)
Code: Select all
alias AuthDir {
return " $+ $gettok($mircdir,1- $+ $calc($numtok($mircdir,92) - 1),92) $+ \Authing.ini"
}

alias auth {
if ($readini($AuthDir,$1,auth)) {
return $readini($AuthDir,$1,Auth)
}
elseif (*.users.quakenet.org iswm $address($1,2)) {
writeini -n $AuthDir $replace($1,$chr(91),'91',$chr(93),'93') Auth $gettok($remove($address($1,2),*!*@),1,46)
return $gettok($remove($address($1,2),*!*@),1,46)
}
else {
.timer 1 $rand(3,100) .who $1 n%na
return $false
}
}

alias authNick {
set %AuthNICK $ini($AuthDir,0)
while (%AuthNICK) {
if ($readini($AuthDir,$ini($AuthDir,%AuthNICK),auth) == $1) && ($ini($AuthDir,%AuthNICK) ison %MainChan) {
return $replace($ini($AuthDir,%AuthNICK),'91',$chr(91),'93',$chr(93))
halt
}
dec %AuthNICK
}
return 0
}

on *:join:%MainChan: {
if ($nick == $me) { who $chan n%na }
if (%STOPAUTH == 1) { halt }
set %auth $auth($nick)
if (%auth) { halt }

if (*.users.quakenet.org iswm $address($nick,2)) {
writeini -n $AuthDir $replace($nick,$chr(91),'91',$chr(93),'93') Auth $gettok($remove($address($nick,2),*!*@),1,46)
}

inc -u1 %AntiAuthFlood 1
if (%AntiAuthFlood < 3) {
.who $nick n%na
}
else {
.timer 1 $calc( %AntiAuthFlood + %AntiAuthFlood + %AntiAuthFlood + 5) .who $nick n%na
}
}

raw 354:*:{
writeini -n $AuthDir $replace($2,$chr(91),'91',$chr(93),'93') Auth $3
}

on *:nick: {
if (!$auth($nick)) { halt }
/writeini -n $AuthDir $replace($newnick,$chr(91),'91',$chr(93),'93') Auth $auth($nick)
/remini -n $AuthDir $replace($nick,$chr(91),'91',$chr(93),'93')
%check = $rand(1,2)
.who $newnick n%na
}

on *:PART:%MainChan: {
if (!$auth($nick)) { halt }
/remini -n $AuthDir $replace($nick,$chr(91),'91',$chr(93),'93')
}

on *:QUIT: {
if (!$auth($nick)) { halt }
/remini -n $AuthDir $replace($nick,$chr(91),'91',$chr(93),'93')
}

on *:KICK:%MainChan: {
if (!$auth($nick)) { halt }
/remini -n $AuthDir $replace($nick,$chr(91),'91',$chr(93),'93')
}

on *:DISCONNECT: {
if (!$auth($nick)) { halt }
if ($nick == $me) { write -c $AuthDir | halt }
/remini -n $AuthDir $replace($nick,$chr(91),'91',$chr(93),'93')
}


Bot2: (The "Get Auth ONLY" bot)
Code: Select all
alias AuthDir {
return " $+ $gettok($mircdir,1- $+ $calc($numtok($mircdir,92) - 1),92) $+ \Authing.ini"
}

alias auth {
if ($readini($AuthDir,$1,auth)) {
return $readini($AuthDir,$1,Auth)
}
elseif (*.users.quakenet.org iswm $address($1,2)) {
writeini -n $AuthDir $replace($1,$chr(91),'91',$chr(93),'93') Auth $gettok($remove($address($1,2),*!*@),1,46)
return $gettok($remove($address($1,2),*!*@),1,46)
}
else {
.timer 1 $rand(3,100) .who $1 n%na
return $false
}
}

alias authNick {
set %AuthNICK $ini($AuthDir,0)
while (%AuthNICK) {
if ($readini($AuthDir,$ini($AuthDir,%AuthNICK),auth) == $1) && ($ini($AuthDir,%AuthNICK) ison %MainChan) {
return $replace($ini($AuthDir,%AuthNICK),'91',$chr(91),'93',$chr(93))
halt
}
dec %AuthNICK
}
return 0
}
Patty
 

Return to Mirc Scripting Release

Who is online

Users browsing this forum: No registered users and 2 guests

cron