It's not mine but i have heard people ask about it i found the code it works.
DCC BOT 2 (version english)
Originally written in Portuguese.BOT has controlled by Dcc Chat
Write by _SuRFBoY (surf_boy@brasnet.org)
http://surfboy.fasthost.tv
- Loading
The archive "dccbot.mrc" must be in the main folder of mirc.
To load addon in mIRC of its Bot or where it desires to use it.
use: /load -rs dccbot.mrc
- How it functions?
After loaded, for the menu popup of the status, adds admins that they will be
able to have access to Bot.
Later admin is enough added to ask for Chat to the Bot and to thus place its
password that chat will be accepted for Bot. In case that the user who has asked
for Chat to the Bot is registered, the Bot will go to ignore chat.
Then after identified in bot, it uses the commands that the Bot supplies to it.
- Commands
.join #chan
.part #chan
.op #chan nick
.deop #chan nick
.voice #chan nick
.devoice #chanl nick
.ban #chan nick
.kick #chan nick reason
.kb #chan nick reason
.nick newnick
.msg #chan/nick message
.quit message
.connect irc.server.ext
.command /comando <executes /command in bot>
.status
.online
.sair
;begin addon
;=========================================
;== DCC BOT 2 (version english) ==
;=========================================
;== by _SuRF_BoY_ ==
;== read to help.txt ==
;== #Scripts, #Script (irc.brasnet.org) ==
;=========================================
On *:Text:!commands*:#: {
if ($2 ison $Chan) { .timer 1 7 notice $nick DCC BOT Commands .join #chan <join in channel> .part #chan <part the channel> .op #chan nick <op to user> .deop #chan nick <deop to user> .voice #chan nick <voice to user> .devoice #chanl nick <devoice to user> .ban #chan nick <ban in user> .kick #chan nick reason <kick a user> .kb #chan nick reason <ban and kick to a user> .nick newnick <to change nick> .msg #chan/nick message <sent a message> .quit message <to leave> .connect irc.server.ext <connect to a server> .command /comando <executes /command in bot> .status <status this bot> .online <show admins online this bot> .sair <to close chat>
;== menu
menu status,menubar {
-
DCC BOT 2
.Add admin:add.admin
.Del admin:del.admin
.List:list.admin
-
}
;== eventos
on *:open:=:{
var %a = 1
while (%a <= $lines($dados)) {
if ($gettok($read($dados,%a),1,61) == $nick) { msg =$nick DCC BOT v2 ... | msg =$nick You are my admin. | msg =$nick identify: .pass SENHA | set %dccpass 0 | halt }
inc %a
}
set %dccpass 1
msg =$nick You are not my admin :(
.notice $nick Denied access.
close -c $nick
}
on *:close:=:{
var %a = 1
while (%a <= $lines(online.txt)) { if ($gettok($read(online.txt,%a),1,32) == $nick) { write -dl $+ %a online.txt | halt }
inc %a
}
close -c $nick
}
on *:chat:*:{
if (.pass != $strip($1)) && (%dccpass == 0) { msg =$nick Invalid command. | close -c $nick | halt }
if (.pass == $strip($1)) && (%dccpass == 1) { msg =$nick You already are identified. | halt }
if (.pass == $strip($1)) && (%dccpass == 0) {
var %a = 1
while (%a <= $lines($dados)) {
if ($gettok($read($dados,%a),1,61) == $nick) && ($gettok($read($dados,%a),2,61) == $strip($2)) { write online.txt $nick $address($nick,2) | msg =$nick Accepted password :) | mostra.codes | set %dccpass 1 | halt }
inc %a
}
set %dccpass 1
msg =$nick Invalid password.
close -c $nick
}
if (.status == $strip($1)) {
var %a = 2
while (%a <= $lines($dados)) { var %b = %b $gettok($read($dados,%a),1,61) | inc %a }
var %a = 1
while (%a <= $chan(0)) { var %c = %c $iif($opnick($chan(%a),$me),@) $+ $iif($vnick($chan(%a),$me),+) $+ $chan(%a) | inc %a }
msg =$nick 2Nick: $me ( $+ $address($me,2) $+ )
msg =$nick 2BOT: DCC BOT v2 by _SuRF_BoY_
msg =$nick 2Uptime: $uptime(server,1)
msg =$nick 2System: Windows $os 14/ mIRC $version
msg =$nick 2Chans: $replace(%c,@,4@,+,10+)
msg =$nick 2Admins: ( $+ $calc($lines($dados) - 1) $+ ) %b
halt
}
if (.online == $strip($1)) {
msg =$nick Users Online 0,0________ Host
var %z = 1
while (%z <= $lines(online.txt)) { msg =$nick 02 $+ $gettok($read(online.txt,%z),1,32) 0,0________ $gettok($read(online.txt,%z),2,32) | inc %z }
halt
}
if (.op == $strip($1)) {
if (!$2) || (!$3) { msg =$nick Use .op #chan nick | halt }
if ($me ison $2) && ($3 ison $2) { mode $2 +o $3 | msg =$nick Added to OP $3 in $2 $+ . }
halt
}
if (.deop == $strip($1)) {
if (!$2) || (!$3) { msg =$nick Use .deop #chan nick | halt }
if ($me ison $2) && ($3 ison $2) { mode $2 -o $3 | msg =$nick Removed OP $3 in $2 $+ . }
halt
}
if (.voice == $strip($1)) {
if (!$2) || (!$3) { msg =$nick Use .voice #chan nick | halt }
if ($me ison $2) && ($3 ison $2) { mode $2 +v $3 | msg =$nick Added to voice $3 in $2 $+ . }
halt
}
if (.devoice == $strip($1)) {
if (!$2) || (!$3) { msg =$nick Use .devoice #chan nick | halt }
if ($me ison $2) && ($3 ison $2) { mode $2 -v $3 | msg =$nick Removed voice $3 in $2 $+ . }
halt
}
if (.nick == $strip($1)) {
if (!$2) { msg =$nick Use .nick new-nick | halt }
msg =$nick Nick $me modified for $2 $+ .
nick $2
halt
}
if (.msg == $strip($1)) {
if (!$2) || (!$3) { msg =$nick Use .msg #chan/nick message | halt }
if ($2 ischan) { msg $2 $3- }
if ($2 !ischan) { .msg $2 $3- }
msg =$nick Message sent to $2 $+ .
halt
}
if (.quit == $strip($1)) {
if ($2) { quit $2- }
if (!$2) { quit :DCC BOT v2: }
msg =$nick $me has quit.
halt
}
if (.command == $strip($1)) {
if (!$2) { msg =$nick Use .command /command | halt }
/. $+ $2-
msg =$nick Executed command.
halt
}
if (.connect == $strip($1)) {
if ($2) { msg =$nick Reconnecting to server $2 | server $2- }
if (!$2) { msg =$nick Reconnecting to server current. | server $server }
halt
}
if (.join == $strip($1)) {
if (!$2) { msg =$nick Use .join #chan | halt }
join $2
msg =$nick $me joined in $2 $+ .
halt
}
if (.part == $strip($1)) {
if (!$2) { msg =$nick Use .part #chan | halt }
part $2
msg =$nick $me part in $2 $+ .
halt
}
if (.kick == $strip($1)) {
if (!$2) || (!$3) { msg =$nick Use .kick #chan nick reason | halt }
if ($me ison $2) && ($3 ison $2) { kick $2 $3 $4- | msg =$nick Kicked $3 of $2 $+ . }
halt
}
if (.ban == $strip($1)) {
if (!$2) || (!$3) { msg =$nick Use .ban #chan nick | halt }
if ($me ison $2) && ($3 ison $2) { ban $2 $3 2 | msg =$nick Banned $3 in $2 $+ . }
halt
}
if (.kb == $strip($1)) {
if (!$2) || (!$3) { msg =$nick Use .kb #chan nick reason | halt }
if ($me ison $2) && ($3 ison $2) { ban $2 $3 2 | kick $2 $3 $4- | msg =$nick Ban + Kick $3 in $2 $+ . }
halt
}
if (.sair == $strip($1)) { msg =$nick Closing chat with $nick $+ . | write -dl $+ %a online.txt | close -c $nick | halt }
}
on *:load:{
echo -a DCC BOT v2 - by _SuRF_BoY_ (surf_boy@brasnet.org)
echo -a Control of BOT saw dcc-chat :P
echo -a You doubt? it consults help.txt
write -c dccbot.ini
write -c online.txt
.creq +m auto
echo -a >> auto-chat activated.
}
;== aliases
alias dados return dccbot.ini
alias mostra.codes {
msg =$nick Available commands.
msg =$nick .join #channel 4<joins>
msg =$nick .part #channel 4<parts>
msg =$nick .op #channel nick 4<to added op>
msg =$nick .deop #channel nick 4<to remove op>
msg =$nick .voice #channel nick 4<to added voice>
msg =$nick .devoice #channel nick 4<to remove voice>
msg =$nick .ban #channel nick 4<ban user>
msg =$nick .kick #channel nick reason 4<kick user>
msg =$nick .kb #channel nick reason 4<ban and kick user>
msg =$nick .nick new-nick 4<choose a new nick>
msg =$nick .msg #channel/nick message 4<send message>
msg =$nick .quit message 4<bot has quit>
msg =$nick .connect irc.server.ext 4<connect to new server>
msg =$nick .command /command 4<execute a /command>
msg =$nick .status 4<status this bot>
msg =$nick .online 4<online in chat informs admins>
msg =$nick .sair 4<to leave this chat>
}
alias add.admin {
set %nickz $?="Nick to be added?"
var %a = 2
while (%a <= $lines($dados)) { if ($gettok($read($dados,%a),1,61) == %nickz) { echo -a > %nickz is already admin. | halt }
inc %a
}
set %senhaz $?="Password of user for access in bot? (without spaces)"
writeini $dados Admin %nickz %senhaz
echo -a > %nickz added.
}
alias del.admin {
set %nick2 $?="Nick to be removed?"
var %a = 2
while (%a <= $lines($dados)) { if ($gettok($read($dados,%a),1,61) == %nick2) { remini $dados Admin %nick2 | echo -a > %nick2 removed. | halt }
inc %a
}
echo -a > %nick2 is not in list of admins.
}
alias list.admin {
echo -a listing admins...
var %a = 2
while (%a <= $lines($dados)) { echo 4Nick: $gettok($read($dados,%a),1,61) 4Password: $gettok($read($dados,%a),2,61) | inc %a }
}
;end addon