[Bras] Version 7.5b — File Browser

BrasVersion7.5bv7.5 / BrasVersion7.5bv7.5 / events.ini

events.ini — 13.47 KB — Download this file

[script]
n0=on 1:join:#:if $nick == $me { who $chan }
n1=on 1:invite:*:.ignore -iu10 $wildsite
n2=on @1:serverop:mode $chan -o $nick | .notice $nick server op protection
n3=on 1:ctcpreply:*:if ($parm1 == ping) { %ping = $ctime - $parm2 | echo 2 -a 4 $+ $nick ( $+ $address $+ )  $+ $parm1 reply $duration(%ping) } | else { echo 4 -a $nick ( $+ $address $+ )  $+ $parm1 reply 2 $+ $remove($parms,$parm1) }
n4=on 1:text:*:? {
n5=  if (%away.log == on) { inc %away.msg | .ignore -pu10 $wildsite | write page.log [ $+ $atime $+ ] < $+ $nick $+ > $parms | .msg $nick i am currently away right now. your msg has been logged | close -m $nick }
n6=  if (%msgprot == on) { 
n7=    inc % $+ $site $+ msgs | .timer 1 5 /unset % $+ $site $+ msgs
n8=    if (% [ $+ [ $site [ $+ [ msgs ] ] ] ] == %msg.max) { .ignore -pu60 $wildsite | echo 4 -a msg flood detected from 2 $+ $nick ( $+ $address $+ ) | unset % $+ $site $+ msgs | close -m $nick | halt }
n9=  }
n10=}
n11=on @1:join:# {
n12=  if ($level($address($nick,3)) == autoo) || ($level($address($nick,3)) == protect) { mode $chan +o $nick | echo 4 -a $nick 2auto oped in $chan | halt }
n13=  if ($level($address($nick,3)) == autov) { mode $chan +v $nick | echo 4 -a $nick 2auto voiced in $chan | halt }
n14=  if ($level($address($nick,3)) == shitlist) { mode $chan +b $address($nick,4) | kick $chan $nick Y0uR ByTcHListED | echo 4 -a $nick 2kicked from $chan | halt }
n15=}
n16=on @!1:ban:# {
n17=  if (%mass.ban.prot == on) {
n18=    inc % $+ $site $+ ban
n19=    .timer 1 5 /unset % $+ $site $+ ban
n20=    if (% [ $+ [ $site [ $+ [ ban ] ] ] ] == %max.bans) { kick $chan $nick 2mass ban4 protection | unset % $+ $site $+ ban | halt }
n21=  }
n22=  if ($banmask iswm $address($me,1) || ($banmask iswm $address($me,2) || ($banmask iswm $address($me,3) || ($banmask iswm $address($me,4) {
n23=    if (% [ $+ [ $nick [ $+ [ ban ] ] ] ] == on) { halt } | set % $+ $nick $+ ban on | mode $chan -ob+b $nick $banmask *!*@ $+ $site | kick $chan $nick 4don't 2ban me4 bytch | .timer 1 15 /unset % $+ $nick $+ ban
n24=  } 
n25=}
n26=on @!1:kick:# {
n27=  if ($level($address($knick,3)) == protect) { .invite $knick $chan | kick $chan $nick 4 $+ $knick is a 2protected4 user | halt }
n28=  if (%mass.kick.prot == on) {
n29=    inc % $+ $site $+ kick
n30=    .timer 1 5 /unset % $+ $site $+ kick
n31=    if (% [ $+ [ $site [ $+ [ kick ] ] ] ] == %max.kicks) { kick $chan $nick 2mass kick4 protection | unset % $+ $site $+ kick | halt }
n32=  }
n33=}
n34=on @!1:op:# {
n35=  if (%mass.op.prot == on) {
n36=    inc % $+ $site $+ op
n37=    .timer 1 5 /unset % $+ $site $+ op
n38=    if (% [ $+ [ $site [ $+ [ op ] ] ] ] == %max.ops) { kick $chan $nick 2mass op4 protection | unset % $+ $site $+ op | halt }
n39=  }
n40=}
n41=on @!1:deop:# {
n42=  if ($level($address($opnick,3)) == protect) { mode $chan +o-o $opnick $nick | kick $chan $nick 4 $+ $opnick is a 2protected4 user | halt }
n43=  if (%mass.deop.prot == on) {
n44=    inc % $+ $site $+ deop
n45=    .timer 1 5 /unset % $+ $site $+ deop
n46=    if (% [ $+ [ $site [ $+ [ deop ] ] ] ] == %max.deops) { kick $chan $nick 2mass deop4 protection | unset % $+ $site $+ deop | halt }
n47=  }
n48=}
n49=on @!1:nick:# {
n50=  if (%nickprot == on) {
n51=    inc % $+ $site $+ nick
n52=    .timer 1 5 /unset % $+ $site $+ nick
n53=    if (% [ $+ [ $site [ $+ [ nick ] ] ] ] == %max.nicks) { kick $chan $nick 4 $+ %max.nicks $+  consecutive 2nicks4 in 5 seconds | unset % $+ $site $+ deop | halt }
n54=  }
n55=}
n56=on 1:notice:*:* {
n57=  inc % $+ $site $+ notes
n58=  .timer 1 5 /unset % $+ $site $+ notes
n59=  if (% [ $+ [ $site [ $+ [ notes ] ] ] ] == %notice.max) { 
n60=    if (%noticeprot == on) { kick $chan $nick 4 $+ %notice.max $+  consecutive 2notices4 in 5 seconds | unset % $+ $site $+ notes | halt }
n61=    if (%privnoticeprot == on) { .ignore -nu30 | echo 4 -a  $+ $parm1 $+ notice flood detected from 2 $+ $nick ( $+ $address $+ ) | unset % $+ $site $+ notes | halt }
n62=  }
n63=}
n64=on @1:text:*:# {
n65=  if (%kick.ops == no) && ($nick isop $chan) { halt }
n66=  if (%long == on) && ($len($parms) > %long.max) { kick $chan $nick 4try typing something 2smaller | halt }
n67=  if (%textprot == on) { 
n68=    inc % $+ $site $+ lines
n69=    .timer 1 5 /unset % $+ $site $+ lines
n70=    if (% [ $+ [ $site [ $+ [ lines ] ] ] ] == %text.max) { kick $chan $nick 4 $+ %text.max $+  consecutive 2lines4 in 5 seconds | unset % $+ $site $+ lines | halt }
n71=  }
n72=  if (%repeat == on) { 
n73=    if (% [ $+ [ $nick [ $+ [ .text ] ] ] ] == $parms) { kick $chan $nick 4don't 2repeat.4 don't 2repeat... | unset % [ $+ [ $nick [ $+ [ .text ] ] ] ] }
n74=    else { set % [ $+ [ $nick [ $+ [ .text ] ] ] ] $parms | .timer 1 5 /unset % [ $+ [ $nick [ $+ [ .text ] ] ] ] }
n75=  }
n76=  if (%caps == on) {
n77=    %text = $len($parms) | %x = 1 | if (%text < 8) { goto end } | if ($nick == %cap) { goto first } | else { goto start }
n78=    :start
n79=    if (%x > %text) { goto kick } | if ($asc($mid(%x,%text,$parms)) == $asc($upper($mid(%x,%text,$parms)))) { inc %x | goto start } | else { goto end } 
n80=    :kick
n81=    set %cap $nick | kick $chan $nick 4are your 2caps4 locked? | halt
n82=    :first
n83=    if (%x > %text) { goto second } | if ($asc($mid(%x,%text,$parms)) == $asc($upper($mid(%x,%text,$parms)))) { inc %x | goto first } | else { goto end } | halt
n84=    :second
n85=    ban -u60 $chan $nick 3 | kick $chan $nick 4I SAID ARE YOUR 2CAPS4 LOCKED? | unset %cap | halt
n86=    :end
n87=  }
n88=}
n89=on @1:action:*:# {
n90=  if (%kick.ops == no) && ($nick isop $chan) { halt }
n91=  if (%long == on) && ($len($parms) > %long.max) { kick $chan $nick 4try typing something 2smaller | halt }
n92=  if (%actionprot == on) { 
n93=    inc % $+ $site $+ actions
n94=    .timer 1 5 /unset % $+ $site $+ actions
n95=    if (% [ $+ [ $site [ $+ [ actions ] ] ] ] == %action.max) { kick $chan $nick 4 $+ %text.max $+  consecutive 2actions4 in 5 seconds | unset % $+ $site $+ actions | halt }
n96=  }
n97=  if (%repeat == on) { 
n98=    if (% [ $+ [ $nick [ $+ [ .text ] ] ] ] == $parms) { kick $chan $nick 4don't 2repeat.4 don't 2repeat... | unset % [ $+ [ $nick [ $+ [ .text ] ] ] ] }
n99=    else { set % [ $+ [ $nick [ $+ [ .text ] ] ] ] $parms | .timer 1 5 /unset % [ $+ [ $nick [ $+ [ .text ] ] ] ] }
n100=  }
n101=  if (%caps == on) {
n102=    %text = $len($parms) | %x = 1 | if (%text < 8) { goto end } | if ($nick == %cap) { goto first } | else { goto start }
n103=    :start
n104=    if (%x > %text) { goto kick } | if ($asc($mid(%x,%text,$parms)) == $asc($upper($mid(%x,%text,$parms)))) { inc %x | goto start } | else { goto end } 
n105=    :kick
n106=    set %cap $nick | kick $chan $nick 4are your 2caps4 locked? | halt
n107=    :first
n108=    if (%x > %text) { goto second } | if ($asc($mid(%x,%text,$parms)) == $asc($upper($mid(%x,%text,$parms)))) { inc %x | goto first } | else { goto end } | halt
n109=    :second
n110=    ban -u60 $chan $nick 3 | kick $chan $nick 4I SAID ARE YOUR 2CAPS4 LOCKED? | unset %cap | halt
n111=    :end
n112=  }
n113=}
n114=on 1:dns {
n115=  if ($raddress == $null) { echo 4 -a could not resolve $address | halt }
n116=  else {
n117=    if (%dns.type == mail.check) { .creq auto | raw -q privmsg $me : $+ $chr(1) $+ dcc chat chat $longip($raddress) 110 $+ $chr(1) | .enable #mail.check | halt }
n118=    elseif (%dns.type == mail.send) { .creq auto | raw -q privmsg $me : $+ $chr(1) $+ dcc chat chat $longip($raddress) 25 $+ $chr(1) | .enable #mail.send | halt }
n119=    else { echo 2 -a 4resolved $address 4to $raddress | halt }
n120=  }
n121=}
n122=#mail.check off
n123=on 1:chatopen:if ($nick == $me) { .creq ask | msg = $+ $me user %mail.user }
n124=on 1:chat:* {
n125=  if ($nick == $me) {
n126=    if ($parm1 == +ok) {
n127=      if ($parm3 == pop3) { echo 4 -a connection to $parm2 established }
n128=      if (pass isin $parms) { msg = $+ $me pass %mail.pass }
n129=      if ($parm2 == mailbox) && ($parm3 == open,) || ($parm3 == messages) {
n130=        if ($parm4 != 0) { echo 4 -a you have  $+ $parm4 $+  message(s) | msg = $+ $me list | %new.msgs = $parm4 | mail list }
n131=        else { echo 4 -a you have no new messages | msg = $+ $me quit | .disable #mail.check | halt }
n132=      }
n133=    }
n134=    elseif (id: isin $parm1) || ($parm1 == content-type:) || ($parms == .) || ($parm1 == x-authentication-warning:) || ($parm1 == status:) || ($parm1 == X-Mailer:) || ($parm1 == received:) || ($parm1 == comments:) || ($parm1 == Priority:) { halt }
n135=    elseif ($parm1 == -err) { 
n136=      if ($parm2 == bad) && ($parm3 == login) { echo 4 -a login failed. please supply correct user name and password | msg = $+ $me quit | .disable #mail.check | halt }
n137=      elseif ($parm2 == password) && ($parm7 == incorrect) { echo 4 -a login failed. please supply correct password | msg = $+ $me quit | .disable #mail.check | halt }
n138=      else { echo 4 -a login failed. $parm2* | .disable #mail.check | halt }
n139=    }
n140=    elseif ($parm1 isnum) { echo 4 -a message $parm1 - $size($parm2) }
n141=    else { echo 4 -a $parms }
n142=  }
n143=}
n144=#mail.check end
n145=#mail.send off
n146=on 1:chatopen {
n147=  if ($nick == $me) { 
n148=    .creq ask | msg = $+ $me helo $ip | .timer 1 2 msg = $+ $me rset | .timer 1 3 msg = $+ $me mail from: %mail.from | .timer 1 4 msg = $+ $me rcpt to: $+ %mail.to | .timer 1 6 msg = $+ $me data | .timer 1 8 msg = $+ $me x-sender: $+ %mail.from | .timer 1 9 msg = $+ $me x-mailer: $+ .x[bras§ e-mailer 1.1]x. | .timer 1 10 msg = $+ $me content-type:text/plain; charset="us-ascii" | .timer 1 11 msg = $+ $me to: $+ %mail.to
n149=    .timer 1 12 msg = $+ $me from: $+ %mail.from | .timer 1 13 msg = $+ $me  subject: $+ %mail.subject | .timer 1 14 msg = $+ $me %mail.msg | .timer 1 15 msg = $+ $me . | .timer 1 17 msg = $+ $me quit | .timer 1 18 close -c $me | .timer 1 18 echo 4 -a mail successfully sent | .timer 1 19 .disable #mail.send | .timer 1 19 unset %mail.to | .timer 1 19 unset %mail.from | .timer 1 19 unset %mail.subject | .timer 1 19 unset %mail.msg | .timer 1 19 halt
n150=  }
n151=}
n152=#mail.send end
n153=#fserve off
n154=on shitlist:text:%command:#:.ignore -u10 $wildsite | .notice $nick sorry, but you are banned from my file server | echo 4 -a shitlisted user 2[ $+ $nick ][ $+ $address $+ ] tried to access your fserv | halt
n155=on banned:text:%command:#:.ignore -u5 $wildsite | .notice $nick sorry, but you are banned from my file server | echo 4 -a banned user 2[ $+ $nick ][ $+ $address $+ ] tried to access your fserv | halt
n156=on 1:text:%command:#:fserve $nick %dload.max %home.dir
n157=on 1:servopen:msg = $+ $nick welcome to $me $+ 's %title file server | msg = $+ $nick for a list of commands, type help | if (% [ $+ [ $nick [ $+ [ .credits ] ] ] ] == $null) { set % [ $+ [ $nick [ $+ [ .credits ] ] ] ]  %free.credits | msg = $+ $nick you have been awarded  $+ %free.credits $+  free credits as a first time user } | halt
n158=on 1:filercvd:%dload.type:%acc.credit = $lof($filename)  * %dload.max | inc % [ $+ [ $nick [ $+ [ .credits ] ] ] ]  %acc.credit | msg = $+ $nick  $+ %acc.credit $+  credits have been added to your account. | msg = $+ $nick thanks for uploading | msg = $+ $nick %title file server | halt
n159=on 1:serv:*: {
n160=  if ($parm1 == stats) { msg = $+ $nick you currently have  $+ % [ $+ [ $nick [ $+ [ .credits ] ] ] ]  $+  credits | msg = $+ $nick %title file server | halt }
n161=  elseif $parm1 == dir { msg = $+ $nick %title file server }
n162=  elseif $parm1 == cd { msg = $+ $nick %title file server }
n163=  elseif $parm1 == cd.. { msg = $+ $nick %title file server }
n164=  elseif $parm1 == exit { .notice $nick thanks for stopping by my file server. | .notice $nick %title file server }
n165=  elseif $parm1 == help { msg = $+ $nick type dir to list all files in the current directory | msg = $+ $nick type cd <directory> to change to the specified directory | msg = $+ $nick type get <file Name> to get the specified file | msg = $+ $nick type stats to see how many credits you have left | msg = $+ $nick type slots to try your luck at free credits. 25000 credits per play | msg = $+ $nick type exit to exit my file server | halt }
n166=  elseif $parm1 == get { 
n167=    %file.bytes = $lof($cd [ $+ [ \ [ $+ [ $parm2 ] ] ] ] ) 
n168=    if (%file.size == $null) { msg = $+ $nick $$2 - no such file | msg = $+ $nick type help for a list of commands | msg = $+ $nick ( $+ $cd $+ ) }
n169=    if (%file.size > % [ $+ [ $nick [ $+ [ .credits ] ] ] ])   { msg = $+ $nick sorry, but you dont have enough credits to download $parm2 $+ . please upload for access | halt }
n170=    else { msg = $+ $nick now sending $parm2 | dcc send $nick $cd $+ \ $+ $parm2 | halt }
n171=  }
n172=  else { msg = $+ $nick invalid command. type help for a list of commands | halt }
n173=}
n174=#fserve end