- Code: Select all
on *:CONNECT: {
.timercheck 0 3600 idlecheck
}
alias idlecheck {
.remove bnc\check.txt
set -u60 %antispam 1
unset %bnc.*
set %bnc.check 1
/msg -sBNC who
}
on *:text:.bncpart*:%outputchan: {
if (!%antispam) {
if ($owner($nick)) {
set -u3 %antispam 1
if (!$2) {
.msg %outputchan %ctstart ERROR! use like this: .bncpart #channel (ident) %ctstop
}
if (!$3) {
var %x = 1
while (%x <= $calc($lines(bnc\idents.txt) + 1)) {
if (%x == $calc($lines(bnc\idents.txt) + 1)) {
.msg %outputchan %ctstart All idents have parted $2 %ctstop
break
}
sbnc simul $gettok($read(bnc\idents.txt,%x),1,32) part $2
inc %x
}
}
elseif ($4) {
var %x = 1
while (%x <= $calc($numtok($3-,32) + 1)) {
if (%x == $calc($numtok($3-,32) + 1)) {
.msg %outputchan %ctstart The idents have parted $2 %ctstop
break
}
if (!$read(bnc\idents.txt,w,$gettok($3-,%x,32) *)) {
.msg %outputchan %ctstart $gettok($3-,%x,32) is not added as an ident. %ctstop
inc %x
}
else {
sbnc simul $gettok($3-,%x,32) part $2
inc %x
}
}
}
else {
sbnc simul $3 part $2
.msg %outputchan %ctstart $3 has parted $2 %ctstop
}
}
}
}
on *:text:.bncjoin*:%outputchan: {
if (!%antispam) {
if ($owner($nick)) {
set -u3 %antispam 1
if (!$2) {
.msg %outputchan %ctstart ERROR! use like this: .bncjoin #channel (ident) %ctstop
}
elseif (!$3) {
var %x = 1
while (%x <= $calc($lines(bnc\idents.txt) + 1)) {
if (%x == $calc($lines(bnc\idents.txt) + 1)) {
.msg %outputchan %ctstart All idents have joined $2 %ctstop
break
}
sbnc simul $gettok($read(bnc\idents.txt,%x),1,32) join $2
inc %x
}
}
elseif ($4) {
var %x = 1
while (%x <= $calc($numtok($3-,32) + 1)) {
if (%x == $calc($numtok($3-,32) + 1)) {
break
}
else {
.timer 1 %x { sbnc simul $gettok($3-,%x,32) join $2 }
.timer 1 $calc(%x + 3) { joincheck $gettok($3-,%x,32) $2 }
set -u20 %bnc.join. [ $+ [ $gettok($3-,%x,32) ] ] 1
inc %x
}
}
}
else {
sbnc simul $3 join $2
.timer 1 3 { joincheck $3 $2 }
set -u5 %bnc.join. [ $+ [ $3 ] ] 1
}
}
}
}
alias joincheck {
if (%bnc.join. [ $+ [ $1 ] ]) {
.msg %outputchan %ctstart $1 did not join $2 %ctstop
}
else {
.msg %outputchan %ctstart $1 joined $2 %ctstop
}
}
on *:text:.bncblacklist*:%outputchan: {
if (!%antispam) {
if ($admin($nick)) {
if (!$2 || !$3) {
.notice $nick %ctstart ERROR! Use like this: .bncblacklist add/del auth/host %ctstop
}
elseif ($2 == add) {
if ($readini(bnc.ini,blacklist,$3)) {
.notice $nick %ctstart ERROR! $3 is already Blacklisted %ctstop
}
else {
writeini bnc.ini blacklist $3 1
.msg $chan %ctstart $3 was added to the Blacklist %ctstop
}
}
elseif ($2 == del) {
if (!$readini(bnc.ini,blacklist,$3)) {
.notice $nick %ctstart ERROR! $3 is not Blacklisted %ctstop
}
else {
remini bnc.ini blacklist $3
.msg $chan %ctstart $3 was deleted from the Blacklist %ctstop
}
}
}
}
}
on *:text:.bncprotect*:%outputchan: {
if (!%antispam) {
if ($admin($nick)) {
if (!$2) {
.notice $nick %ctstart ERROR! Use like this: .bncprotect ident %ctstop
}
elseif (!$readini(bnc.ini,$2,auth)) {
.notice $nick %ctstart ERROR! $2 is not added %ctstop
}
else {
if ($readini(bnc.ini,$2,protect) == yes) {
writeini bnc.ini $2 protect no
.msg $chan %ctstart $2 is NOT protected anymore %ctstop
}
else {
writeini bnc.ini $2 protect yes
.msg $chan %ctstart $2 is now protected %ctstop
}
}
}
}
}
on *:text:.bncrequest*:%outputchan: {
if (!%antispam) {
if ($admin($nick)) {
set -u3 %antispam 1
if (!$2) {
.notice $nick %ctstart ERROR! use like this: .bncrequest on/off (reason) %ctstop
}
elseif (%requeststatus == $2) {
.msg $chan %ctstart Request is already $2 %ctstop
}
else {
set %requeststatus $2
.msg $chan %ctstart Request is now $2 %ctstop
if ($2 == on) {
topic %requestchan %ctstart For help with a Bouncer use: .bnchelp %ctmidt Bot version %version %ctmidt Request: 9ON %ctstop
unset %requestdetail
}
elseif ($2 == off) {
if (!$3-) {
topic %requestchan %ctstart For help with a Bouncer use: .bnchelp %ctmidt Bot version %version %ctmidt Request: 4OFF %ctstop
set %requestdetail See topic!
}
else {
topic %requestchan %ctstart $3- %ctmidt Bot version %version %ctmidt Request: 4OFF %ctstop
set %requestdetail $3-
}
}
}
}
}
}
on *:TEXT:.bnckill*:%outputchan: {
if (!%antispam) {
if ($admin($nick)) {
set -u3 %antispam 1
if (!$2) {
.notice $nick %ctstart ERROR! Use like this: .bnckill IDENT %ctstop
}
elseif (!$readini(bnc.ini,$2,auth)) {
.notice $nick ERROR! $2 is not added as an ident %ctstop
}
else {
sbnc kill $2
.notice $nick %ctstart $2 was killed %ctstop
}
}
}
}
on *:text:.bncstatus:%outputchan: {
if ($admin($nick)) {
if (!%antispam) {
set -u60 %antispam 1
unset %bnc.*
set %bnc.status 1
/msg -sBNC who
}
}
}
on *:TEXT:.bncmsg*:%outputchan: {
if (!%antispam) {
if ($admin($nick)) {
set -u3 %antispam 1
if (!$2 || !$3) {
.notice $nick %ctstart ERROR! Use like this: .bncmsg IDENT MSG %ctstop
}
elseif (!$readini(bnc.ini,$2,auth)) {
.notice $nick ERROR! $2 is not added as an ident %ctstop
}
else {
set %bnc.msg 1
sbnc tcl setctx $2 $+ $chr(59) bncreply " %ctstart $3- (Admin: $nick $+ ) %ctstop "
}
}
}
}
on *:TEXT:.bncglobal*:%outputchan: {
if (!%antispam) {
if ($admin($nick)) {
set -u3 %antispam 1
if (!$2) {
.notice $nick %ctstart ERROR! Use like this: .bncglobal MSG %ctstop
}
else {
sbnc global %ctstart $2- %ctstop
}
}
}
}
on *:part:%MAINCHAN: {
if ($readini(bnc.ini,$remove($gettok($address($nick,1),1,64),*!*),auth)) {
sbnc simul $remove($gettok($address($nick,1),1,64),*!*) join $chan
sbnc tcl setctx $remove($gettok($address($nick,1),1,64),*!*) ; bncreply " %ctstart You are violating Bouncer rules! Stay at %mainchan %ctstop "
}
}
on *:kick:%mainchan: {
if ($readini(bnc.ini,$remove($gettok($address($nick,1),1,64),*!*),auth)) {
sbnc simul $remove($gettok($address($knick,1),1,64),*!*) join $chan
}
}
on *:TEXT:.bncpass:%REQUESTCHAN: {
if (!%antispam) {
if ($3 && $admin($nick)) {
if (!$readini(bnc.ini,$2,auth)) {
.notice $nick %ctstart ERROR! That ident is not added %ctstop
}
else {
var %randpw = $rand(a,z) $+ $rand(a,z) $+ $rand(a,z) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(a,z)
sbnc resetpass $2 %randpw
.msg %outputchan %ctstart BNC 8,1reset %ctmidt Ident: $2 %ctmidt Nick: $3 %ctmidt Auth: $readini(bnc.ini,$3,auth) %ctmidt Host: $remove($address($2,2),*!*@) %ctstop
.cprivmsg $2 %requestchan Direct link use: $read(bnc\link.txt,3)
.timer 1 2 { .cprivmsg $3 %requestchan %ctstart Ident: $2 %ctmidt Ip: %ip %ctmidt Port: %port %ctmidt Password: %randpw %ctstop }
}
}
else {
set %bnc.reset $nick
set -u7 %antispam 1
who $nick n%nar
}
}
}
on *:text:.bncidle:%outputchan: {
if (!%antispam) {
if ($admin($nick)) {
set %antispam 1
set %bnc.idle 1
/msg -sBNC who
}
}
}
on *:TEXT:.bncwhoami:%REQUESTCHAN: {
if (!%antispam) {
set %bnc.whoami $nick
set -u7 %antispam 1
who $nick n%nar
}
}
on *:TEXT:.help*:%outputchan: {
if (!%antispam) {
if ($nick !isreg $chan) {
set -u5 %antispam 1
if (!$2) {
.cnotice $nick $chan %ctstart Commands: .bncadd|.bncdel|.bncpass|.bncidle|.bncstatus|.bncglobal|.bncrequest %ctstop
.cnotice $nick $chan %ctstart --------- .bncblacklist|.bncprotect|.bnckill|.bncmsg|.bncjoin|.bncpart %ctstop
.cnotice $nick $chan %ctstart For more help use: .help <command> EXAMPLE: .help bncdeny
}
else {
var %x = 1
while (%x <= $calc($lines(bnc\adminhelp.txt) + 1)) {
if (%x == $calc($lines(bnc\adminhelp.txt) + 1)) {
.cnotice $nick $chan %ctstart ERROR! That command does not exist %ctstop
}
if ($gettok($read(bnc\adminhelp.txt,%x),1,128) == $2) {
.cnotice $nick $chan %ctstart $gettok($read(bnc\adminhelp.txt,%x),4,128) %ctstop
.cnotice $nick $chan %ctstart $gettok($read(bnc\adminhelp.txt,%x),2,128) EXAMPLE: $gettok($read(bnc\adminhelp.txt,%x),3,128) %ctstop
break
}
inc %x
}
}
}
}
}
alias -l bnclist {
var %i = 1
while (%i <= $lines(bnc\help.txt)) {
var %bnclist = $addtok(%bnclist,$chr(91) $+ %i $+ $chr(93) $left($gettok($read(bnc\help.txt,%i),1,126),1) $+ $right($gettok($read(bnc\help.txt,%i),1,126),-1) %ctmidt ,32)
inc %i
}
return %bnclist
}
on *:text:.bnchelp*:%requestchan: {
if (!$2) {
.cnotice $nick $chan %ctstart Hi $nick $+ , you have got the following options: %ctstop
.cnotice $nick $chan %ctstart $left($bnclist,-9) %ctstop
.cnotice $nick $chan %ctstart Write .bnchelp 1/2/3 etc, to get help on that problem. %ctstop
}
if ($2 == list) && ($nick isop %requestchan) {
var %i = 1
while (%i <= $lines(bnc\help.txt)) {
.timer 1 %i { .cnotice $nick $chan %ctstart $+ %i $+ / $+ $+ $gettok($read(bnc\help.txt,%i),1,126) $+ %ctstop $gettok($read(bnc\help.txt,%i),2-,126) $+ }
inc %i
}
}
if ($2 == commands) && ($nick isop %requestchan) {
.cnotice $nick $chan %ctstart BNC help commands: %ctstop
.cnotice $nick $chan %ctstart .bnchelp add|del|edit|list|N %ctstop
}
if ($2 == edit) && ($nick isop %requestchan) {
if (!$3) {
.cnotice $nick ERROR! use like this: .bnchelp edit <N> <NEW TEXT HERE> %ctstop
}
if ($3 isnum) {
if (!$read(bnc\help.txt,$3)) {
.cnotice $nick $chan %ctstart Could not find $3 in my database. %ctstop
}
else {
.cnotice $nick $chan %ctstart $gettok($read(bnc\help.txt,$3),1,32) was reset and updated to: $chr(91) $+ $3 $+ / $+ $gettok($read(bnc\help,n,$3),1,126) $+ $chr(93) $4- %ctstop
write -l $+ $readn bnc\help.txt $gettok($read(bnc\help.txt,n,$3),1,126) $+ $chr(126) $+ $4-
}
}
}
if ($2 == add) && ($nick isop %requestchan) {
if (!$3) {
.cnotice $nick $chan ERROR! use like this: .bnchelp add <Headline~New text here> %ctstop
}
elseif ($read(bnc\help.txt,w,$gettok($3-,1,126) $+ $chr(126))) {
.cnotice $nick $chan %ctstart $3 already exists. %ctstop
}
else {
write bnc\help.txt $3-
.cnotice $nick $chan %ctstart Successfully added $3 %ctstop
}
}
if ($2 == del) && ($nick isop %requestchan) {
if (!$3) {
.cnotice $nick ERROR! use like this: .bnchelp del Nr %ctstop
}
if ($3 isnum) {
if ($3 > $lines(bnc\help.txt)) {
.cnotice $nick $chan %ctstart There is not that many entries added %ctstop
}
else {
.cnotice $nick $chan %ctstart $gettok($read(bnc\help.txt,$3),1,32) was deleted %ctstop
$read(bnc\help.txt,$3)
write -dl $+ $readn bnc\help.txt
}
}
}
else {
if ($2 isnum && $read(bnc\help.txt,$2)) {
.cnotice $nick $chan %ctstart $+ $2 $+ $+ / $+ $+ $gettok($read(bnc\help.txt,$2),1,126) $+ %ctstop $gettok($read(bnc\help.txt,$2),2-,126)
}
else {
var %x = 1
var %y = 0
while (%x <= $lines(bnc\help.txt)) {
if ($2- isin $gettok($read(bnc\help.txt,n,%x),1,126)) {
inc %y
.timer 1 %y .cnotice $nick $chan %ctstart $+ %x $+ $+ / $+ $+ $gettok($read(bnc\help.txt,n,%x),1,126) $+ %ctstop $gettok($read(bnc\help.txt,n,%x),2-,126)
}
inc %x
}
}
}
}
on *:text:.bncadd*:%outputchan: {
if (!%antispam) {
if ($admin($nick)) {
set -u3 %antispam 1
if (!$2 || !$3 || !$4) {
.notice $nick ERROR! Use like this: .bncadd ident nick auth
}
elseif ($read(bnc\idents.txt,w,$2 *)) {
.notice $nick %ctstart ERROR! That ident already exists. %ctstop
}
else {
set -u36000 %rbnc. [ $+ [ $2 ] ] 1
var %randpw = $rand(a,z) $+ $rand(a,z) $+ $rand(a,z) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(a,z)
sbnc adduser $2 %randpw
sbnc simul $2 sbnc set realname 7,1 ~ 15Bouncer by #EvilAC 7~
sbnc simul $2 sbnc set server irc.quakenet.org 6667
writeini bnc.ini AUTHS $4 $2
writeini bnc.ini $2 auth $4
.msg $chan %ctstart BNC 9,1added %ctmidt Ident: $2 %ctmidt Nick: $3 %ctmidt AUTH: $4 %ctmidt Host: $remove($address($3,2),*!*@) %ctstop
.cprivmsg $3 %requestchan %ctstart Rules: Idle %mainchan - Be AUTH'd and mode +x - Follow Quakenet's Rules - Do NOT get KILLED by S %ctstop
.cprivmsg $3 %requestchan %ctstart Direct link for connecting to your BNC just paste: $read(bnc\link.txt,3) %ctstop
.timer 1 2 { .cprivmsg $3 %requestchan %ctstart Ident: $2 %ctmidt Ip: %ip %ctmidt Port: %port %ctmidt Password: %randpw %ctstop }
}
}
}
}
on *:text:.bncdel*:%REQUESTCHAN,%outputchan: {
if (!%antispam) {
if (%requeststatus == on) {
if ($2 && $admin($nick) && $chan == %outputchan) {
if ($readini(bnc.ini,$2,auth)) {
.msg %outputchan %ctstart BNC 4deleted %ctmidt Ident: $2 %ctmidt Auth: $readini(bnc.ini,$2,auth) %ctmidt Host: $iif($readini(bnc.ini,$2,ip),$readini(bnc.ini,$2,ip),None) %ctmidt Reason: Requestet by Admin %ctstop
deluser $2 Your Bouncer was deleted by admin: $nick
}
else {
.notice $nick %ctstart ERROR! That ident is not added %ctstop
}
}
else {
unset %bnc.*
set %bnc.del 1
set %bnc.nick $nick
set -u20 %antispam 1
who $nick n%nar
}
}
else {
.notice $nick %ctstart .bncdel is currently disabled (Reason: %requestdetail $+ ) %ctstop
}
}
}
on *:text:.Rbnc*:%REQUESTCHAN: {
if (!%antispam) {
if (%requeststatus == on) {
if (!$2) {
.notice $nick %ctstart ERROR! Use like this: .Rbnc IDENT %ctstop
}
elseif ($isbnc($address($nick,2))) {
.notice $2 %ctstart ERROR! You do not meet the requirements to get a BNC. %ctstop
}
elseif ($2 !isalpha) {
.notice $nick %ctstart ONLY letters a-Z can be in your ident. %ctstop
}
elseif ($len($2) > 9) {
.notice $nick %ctstart Your ident is too long, max 9 characters. %ctstop
}
elseif ($readini(bnc.ini,$2,auth)) {
.notice $nick %ctstart ERROR! That ident is already in use. %ctstop
}
else {
unset %bnc.*
set %bnc.rbnc 1
set %bnc.nick $nick
set -u20 %antispam 1
set -u20 %bnc.ident $2
.msg -sBNC vhosts
}
}
else {
.notice $nick %ctstart .rBNC is currently disabled (Reason: %requestdetail $+ ) %ctstop
}
}
}
alias deluser {
sbnc tcl setctx $1 ; bncreply " %ctstart $2- %ctstop "
sbnc deluser $1
if ($readini(bnc.ini,$1,auth)) { remini bnc.ini AUTHS $readini(bnc.ini,$1,auth) }
if ($readini(bnc.ini,$1,ip)) { remini bnc.ini IPS $readini(bnc.ini,$1,ip) }
if ($1) { remini bnc.ini $1 }
}
raw 354:*: {
/haltdef
if (%bnc.whoami) {
if ($3 == 0) {
.notice $2 %ctstart ERROR! You MUST be AUTH'd to use .bncwhoami %ctstop
}
elseif ($readini(bnc.ini,auths,$3)) {
.notice $2 %ctstart Your have a Bouncer %ctmidt Ident: $readini(bnc.ini,auths,$3) %ctmidt Auth: $3 %ctstop
}
else {
.notice $2 %ctstart ERROR! You do not have a bouncer %ctstop
}
}
if (%bnc.reset) {
if ($3 == 0) {
.notice $2 %ctstart ERROR! You MUST be AUTH'd to use .bncpass %ctstop
}
elseif ($readini(bnc.ini,auths,$3)) {
var %randpw = $rand(a,z) $+ $rand(a,z) $+ $rand(a,z) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(a,z)
sbnc resetpass $readini(bnc.ini,auths,$3) %randpw
.msg %outputchan %ctstart BNC 8,1reset %ctmidt Ident: $readini(bnc.ini,auths,$3) %ctmidt Nick: $2 %ctmidt Auth: $3 %ctmidt Host: $remove($address($2,2),*!*@) %ctstop
.cprivmsg $2 %requestchan Direct link use: $read(bnc\link.txt,2)
.timer 1 2 { .cprivmsg $2 %requestchan %ctstart Ident: $readini(bnc.ini,auths,$3) %ctmidt Ip: %ip %ctmidt Port: %port %ctmidt Password: %randpw %ctstop }
}
else {
.notice $2 %ctstart ERROR! You do not have a bouncer %ctstop
}
}
if (%bnc.del) {
if ($readini(bnc.ini,blacklist,$3)) {
ban -k %requestchan $2 1 %ctstart Black Listed %ctstop
}
elseif ($3 == 0) {
.notice $2 %ctstart ERROR! You MUST be AUTH'd to use .bncdel %ctstop
}
elseif (!$readini(bnc.ini,auths,$3)) {
.notice $2 %ctstart ERROR! You do not have a Bouncer with that AUTH %ctstop
}
else {
.msg %outputchan %ctstart BNC 4deleted %ctmidt Ident: $readini(bnc.ini,auths,$3) %ctmidt Auth: $3 %ctmidt Host: $iif($readini(bnc.ini,$readini(bnc.ini,auths,$3),ip),$readini(bnc.ini,$readini(bnc.ini,auths,$3),ip),None) %ctmidt Reason: Requestet by User %ctstop
deluser $readini(bnc.ini,auths,$3) Bouncer deleted!
}
unset %antispam
unset %bnc.*
}
if (%bnc.rbnc) {
if ($readini(bnc.ini,blacklist,$3)) {
ban -k %requestchan $2 1 %ctstart Black Listed %ctstop
}
elseif (bnc !isin $4- && bouncer !isin $4- && $chr(35) !isin $4- && hosted !isin $4-) {
if ($3 == 0) {
.notice $2 %ctstart ERROR! You MUST be AUTH'd to use .rbnc %ctmidt if you dont have an AUTH use /msg Q hello your@email your@email %ctstop
}
elseif ($readini(bnc.ini,AUTHS,$3)) {
.notice $2 %ctstart ERROR! You already have a BNC. Your ident is: $readini(bnc.ini,AUTHS,$3) %ctstop
}
else {
set -u36000 %rbnc. [ $+ [ %bnc.ident ] ] 1
var %randpw = $rand(a,z) $+ $rand(a,z) $+ $rand(a,z) $+ $rand(0,9) $+ $rand(0,9) $+ $rand(a,z)
sbnc adduser %bnc.ident %randpw
sbnc simul %bnc.ident sbnc set realname 7,1 ~ 15Bouncer by #EvilAC 7~
sbnc simul %bnc.ident sbnc set server irc.quakenet.org 6667
writeini bnc.ini %bnc.ident auth $3
writeini bnc.ini AUTHS $3 %bnc.ident
.msg %outputchan %ctstart BNC 9,1added %ctmidt Ident: %bnc.ident %ctmidt Nick: $2 %ctmidt Auth: $3 %ctmidt Host: $remove($address($2,2),*!*@) %ctmidt %bnc.numrbnc $+ / $+ %bnc.numrbnc2 %ctstop
.cprivmsg $2 %requestchan %ctstart Rules: Idle %mainchan - Be AUTH'd and mode +x - Follow Quakenet's Rules - Do NOT get KILLED by S %ctstop
.cprivmsg $2 %requestchan %ctstart Direct link for connecting to your BNC just paste: $read(bnc\link.txt,1) %ctstop
.timer 1 2 { .cprivmsg $2 %requestchan %ctstart Ident: %bnc.ident %ctmidt Ip: %ip %ctmidt Port: %port %ctmidt Password: %randpw %ctstop }
}
}
else {
.notice $2 %ctstart ERROR! You do not meet the requirements to get a BNC. %ctstop
}
}
unset %bnc.*
unset %antispam
}
on *:TEXT:.version*:?: {
if ($owner($nick)) {
if (!$2) {
.msg $nick %ctstart ERROR! use like this: .version x.xxx %ctstop
}
else {
set %version $2
.msg $nick %ctstart Version is now: $2 %ctstop
}
}
}
on *:TEXT:.mainchan*:?: {
if ($owner($nick)) {
if (!$2) {
.msg $nick %ctstart ERROR! use like this: .MAINCHAN #channel %ctstop
}
elseif ($left($2,1) != $chr(35)) {
.msg $nick %ctstart ERROR! Remember $chr(35) in the channel name. %ctstop
}
else {
set %mainchan $2
.msg $nick %ctstart Mainchan is now: $2 %ctstop
}
}
}
on *:TEXT:.requestchan*:?: {
if ($owner($nick)) {
if (!$2) {
.msg $nick %ctstart ERROR! use like this: .REQUESTCHAN #channel %ctstop
}
elseif ($left($2,1) != $chr(35)) {
.msg $nick %ctstart ERROR! Remember $chr(35) in the channel name. %ctstop
}
else {
set %requestchan $2
.msg $nick %ctstart Requestchan is now: $2 %ctstop
}
}
}
on *:TEXT:.outputchan*:?: {
if ($owner($nick)) {
if (!$2) {
.msg $nick %ctstart ERROR! use like this: .OUTPUTCHAN #channel %ctstop
}
elseif ($left($2,1) != $chr(35)) {
.msg $nick %ctstart ERROR! Remember $chr(35) in the channel name. %ctstop
}
else {
set %outputchan $2
.msg $nick %ctstart Outputchan is now: $2 %ctstop
}
}
}
on *:TEXT:.port*:?: {
if ($owner($nick)) {
if (!$2) {
.msg $nick %ctstart ERROR! use like this: .port 6666 %ctstop
}
else {
set %port $2
.msg $nick %ctstart Port is now: $2 %ctstop
}
}
}
on *:TEXT:.ip*:?: {
if ($owner($nick)) {
if (!$2) {
.msg $nick %ctstart ERROR! use like this: .ip the.ip.you.have %ctstop
}
else {
set %ip $2
.msg $nick %ctstart IP is now: $2 %ctstop
}
}
}
alias owner {
if (*!*@int.users* iswm $address($1,5)) {
return $true
}
else {
return $false
}
}
alias admin {
if ($owner($1)) {
return $true
}
if ($1 isop %outputchan) {
return $true
}
}
alias isbnc {
var %txt = $gettok($1,2,64)
if (.users.quakenet.org isin %txt) {
return $false
}
if (bnc isin %txt) {
return $true
}
if (bouncer isin %txt) {
return $true
}
if (server isin %txt) {
return $true
}
else {
var %x = 1
while (%x <= $calc($len(%txt) + 1)) {
if (%x == $calc($len(%txt) + 1)) {
if (!%tal) {
return $true
}
elseif (%tal < 3) {
return $true
}
else {
return $false
}
break
}
if ($mid(%txt,%x,1) isnum) {
if (!%tal) {
var %tal = 1
inc %x
}
else {
inc %tal
inc %x
}
}
else {
inc %x
}
}
}
}
on *:TEXT:*:?: {
if ($nick == -sBNC) {
if (Trying to reconnect isin $1-) {
.timer 1 20 sbnc simul $7 join %mainchan
}
if (logged on isin $1-) {
unset %rbnc. [ $+ [ $2 ] ]
var %ident = $2
var %host = $gettok($6,1,41)
if ($readini(bnc.ini,%ident,protect) == yes) {
halt
}
if ($readini(bnc.ini,blacklist,%host)) {
.msg %outputchan %ctstart BNC 4deleted %ctmidt Ident: %ident %ctmidt Auth: $readini(bnc.ini,%ident,auth) %ctmidt Host: %host %ctmidt Reason: Blacklisted %ctstop
deluser %ident You are Blacklisted and your Bouncer will be deleted!
}
elseif ($readini(bnc.ini,ips,%host) && $readini(bnc.ini,ips,%host) != %ident) {
.msg %outputchan %ctstart BNC 4deleted %ctmidt Ident: %ident %ctmidt Auth: $readini(bnc.ini,%ident,auth) %ctmidt Host: %host %ctmidt Reason: Clone %ctstop
remini bnc.ini AUTHS $readini(bnc.ini,%ident,auth)
remini bnc.ini %ident
sbnc tcl setctx %ident $+ $chr(59) bncreply " %ctstart You are a Clone and your Bouncer will be deleted! %ctstop "
sbnc deluser %ident
}
else {
writeini bnc.ini ips %host %ident
writeini bnc.ini %ident ip %host
}
dns %host
}
if (%bnc.status == 1) {
if ($1- == End of USERS.) {
inc %bnc.status
.msg -sbnc vhosts
}
if ($chr(42) isin $gettok($1-,1,32)) {
inc %bnc.online
}
if (Last seen isin $1- && $chr(42) !isin $gettok($1,1,40)) {
if (!$read(bnc\ignore.txt,w,$remove($remove($gettok($gettok($1-,1,32),1,40),@),*))) {
var %bnc.tid = $translate($gettok($gettok($1-,5-,32),1,93)), %bnc.ident = $remove($remove($gettok($gettok($1-,1,32),1,40),@),*), %bnc.nick = $gettok($gettok($gettok($1-,1,32),2-,40),1,41)
if ($calc($ctime - $ctime(%bnc.tid)) > 1209600) {
if ($left($gettok($1-,5,32),5) == Never) {
if (!%rbnc. [ $+ [ %bnc.ident ] ]) {
inc %bnc.10H
inc %bnc.10Htotal
}
else {
inc %bnc.10Htotal
}
}
else {
inc %bnc.2Weeks
}
}
}
}
}
if (%bnc.status == 2) {
if ($1- == -- End of VHOSTS.) {
.msg %outputchan %ctstart Usage: %bnc.numstatus $+ / $+ %bnc.numstatus2 %ctmidt Online: %bnc.online %ctmidt 2Weeks: $iif(%bnc.2Weeks,%bnc.2Weeks,0) %ctmidt 10H: $iif(%bnc.10H,%bnc.10H,0) $chr(40) $+ $iif(%bnc.10Htotal,%bnc.10Htotal,0) $+ $chr(41) %ctmidt Sync: $ini(bnc.ini,AUTHS,0) $chr(91) $+ $round($calc($ini(bnc.ini,AUTHS,0) / %bnc.numstatus * 100),0) $+ $chr(37) $+ $chr(93) %ctstop
unset %bnc.*
unset %antispam
}
else {
if ($left($3,1) isnum) {
inc %bnc.numstatus $left($3,1)
inc %bnc.numstatus2 $right($3,1)
}
}
}
if (%bnc.rbnc) {
if ($1- == -- End of VHOSTS.) {
if (%bnc.numrbnc < %bnc.numrbnc2) {
who %bnc.nick n%nar
unset %bnc.nick
}
else {
.notice %bnc.nick %ctstart ERROR! No free slots are left %ctstop
unset %bnc.*
}
}
else {
inc %bnc.numrbnc $left($3,1)
inc %bnc.numrbnc2 $right($3,1)
}
}
if (%bnc.idle) {
if ($nick == -sBNC) {
if ($gettok($gettok($1,2,40),1,41) !ison %mainchan && $remove($remove($gettok($1,1,40),$chr(42),1),$chr(64),1) != quickbnc) {
inc %bnc.badidentscounter
if ($len(%bnc.badidents) < 300) {
set -u10 %bnc.badidents $addtok(%bnc.badidents,$remove($remove($gettok($1,1,40),$chr(42),1),$chr(64),1),32)
}
}
if (End of USERS. isin $1-) {
dec %bnc.badidentscounter
.timer 1 5 .msg %outputchan %ctstart Idents not on %mainchan $+ : $iif($len($left(%bnc.badidents,-4)) > 1,$left(%bnc.badidents,-4),None) $chr(91) $+ $iif(!%bnc.badidentscounter,0,%bnc.badidentscounter) $+ $chr(93) %ctstop
unset %antispam
unset %bnc.*
}
}
}
if (%bnc.check) {
if ($1- == End of USERS.) {
unset %antispam
unset %bnc.*
var %x = 1
var %counter = 1
while (%x <= $lines(bnc\check.txt)) {
if ($gettok($gettok($read(bnc\check.txt,%x),5,32),1,93) == Never) {
if (!%rbnc. [ $+ [ $remove($gettok($read(bnc\check.txt,%x),1,40),@,*) ] ]) {
.timer 1 $calc(2 * %counter) .msg %outputchan %ctstart BNC 4deleted %ctmidt Ident: $remove($gettok($read(bnc\check.txt,%x),1,40),@,*) %ctmidt Auth: $readini(bnc.ini,$remove($gettok($read(bnc\check.txt,%x),1,40),@,*),auth) %ctmidt Host: $iif($readini(bnc.ini,$remove($gettok($read(bnc\check.txt,%x),1,40),@,*),ip),$readini(bnc.ini,$remove($gettok($read(bnc\check.txt,%x),1,40),@,*),ip),none) %ctmidt Reason: Bouncer not logged into the first 10 Hours %ctstop
.timer 1 $calc(2 * %counter) deluser $remove($gettok($read(bnc\check.txt,%x),1,40),@,*)
inc %x
}
else {
inc %x
}
}
elseif ($calc($ctime - $ctime($gettok($gettok($read(bnc\check.txt,%x),5-,32),1,93))) > 1209600 && $readini(bnc.ini,$remove($gettok($read(bnc\check.txt,%x),1,40),@,*),protect) != yes && $chr(42) !isin $gettok($read(bnc\check.txt,%x),1,40) && $remove($gettok($read(bnc\check.txt,%x),1,40),@,*) != quickbnc) {
.timer 1 $calc(2 * %counter) .msg %outputchan %ctstart BNC 4deleted %ctmidt Ident: $remove($gettok($read(bnc\check.txt,%x),1,40),@,*) %ctmidt Auth: $readini(bnc.ini,$remove($gettok($read(bnc\check.txt,%x),1,40),@,*),auth) %ctmidt Host: $iif($readini(bnc.ini,$remove($gettok($read(bnc\check.txt,%x),1,40),@,*),ip),$readini(bnc.ini,$remove($gettok($read(bnc\check.txt,%x),1,40),@,*),ip),none) %ctmidt Reason: Bouncer idle more than 2 weeks %ctstop
.timer 1 $calc(2 * %counter) deluser $remove($gettok($read(bnc\check.txt,%x),1,40),@,*)
inc %counter
inc %x
}
else {
inc %x
}
}
}
else {
write bnc\check.txt $1-
}
}
}
}
alias translate { var %out = $replace($1-,Dez,Dec,Okt,Oct,März,Mar,Mär,Mar,Mai,May,Juni,June,Juli,July,T,$chr(32)) | return %out }
alias -l max.who {
return 500
}
alias -l delay.who {
return 60
}
alias -l repeat.who {
return 30
}
on *:join:%noremovechan: {
if ($nick == $me) {
if (!$.timer($+($cid,.ial-update.update))) {
.timer $+ $cid $+ .ial-update.update 1 $$delay.who ial-update.update
}
if ($nick == $me && $chan == %noremovechan) {
.timerconnect off
}
}
}
on *:load:{ scon -am1 .timer $!+ $!cid $!+ .ial-update.update 1 $$delay.who ial-update.update }
alias ial-update.update {
var %c, %n
if ($ial) {
if (!$hget($+(ial-update.,$cid))) { var %c = $ial-update.chan($max.who,400)
if (%c) { ial-update.hash %c | .quote WHO %c }
else { var %n = $ial-update.nick($max.who,400)
if (%n) { ial-update.hash %n | .quote WHO %n }
}
}
if (%c) || (%n) || ($hget($+(ial-update.,$cid))) { .timer $+ $cid $+ .ial-update.update 1 $$repeat.who ial-update.update }
}
}
alias -l ial-update.sort {
var %x = 1, %c
while (%x <= $comchan($me,0)) {
if ($chan($comchan($me,%x)).ial == $false) { var %c = $addtok(%c,$+($nick($comchan($me,%x),0),.,%x),32) }
inc %x
}
return $sorttok(%c,32,n)
}
alias -l ial-update.max {
var %x = 1, %t = 0, %c = $ial-update.sort, %w
while (%x <= $numtok(%c,32)) && (%t < $1) { inc %t $gettok($gettok(%c,%x,32),1,46)
if (%t > $1) { break }
var %w = $addtok(%w,$gettok($gettok(%c,%x,32),2,46),32)
inc %x
}
return %w
}
alias -l ial-update.chan {
var %x = 1, %l = 0, %c = $ial-update.max($1), %w
while (%x <= $numtok(%c,32)) && (%l < $2) { inc %l $len(%chan)
if (%l > $2) { break }
var %w = $addtok(%w,$comchan($me,$gettok(%c,%x,32)),44)
inc %x
}
return %w
}
alias -l ial-update.nick {
var %x = 1
while ($chan($comchan($me,%x)).ial != $false) && (%x <= $comchan($me,0)) { inc %x }
if ($chan($comchan($me,%x)).ial == $false) { var %y = 1, %t = 0, %l = 0, %w
while (%t <= $1) && (%l < $2) && (%y <= $nick($comchan($me,%x),0)) {
if (!$ial($nick($comchan($me,%x),%y))) { inc %l $len($nick($comchan($me,%x),%y))
if (%l > $2) { break }
var %w = $addtok(%w,$nick($comchan($me,%x),%y),44)
}
inc %y
}
return %w
}
}
and my problem is
(20:48:13) (@EvilAC`menu) |EvilAC| BNC deleted |EvilAC| Ident: Kaisar |EvilAC| Auth: aBdUl- |EvilAC| Host: 39.211.178.24 |EvilAC| Reason: Bouncer idle more than 2 weeks |EvilAC|
and this bnc is only 2hours old and it still delete because 14days "idle"
i hope you can help me