; ; bofh.mrc ; ; To install the script copy it to your mIRC directory (usually c:\mirc) and type "/load -rs bofh2.mrc" ; inside mIRC, then you just have to rightclick in any channel and you'll see a new little menu called ; "bofh". The design of the script is very simple, when you add a channel (using the add button) the ; script will start monitoring that channel for floods and try to protect the channel from them. ; ; A lot of people dont understand the different between the channel and the private protection. ; A channel flood (72 lines in 60 seconds) means that the script will think the channel is taking a ; huge flood from lots of different people and block them by moderating (+m) it. ; A private flood is when one single client on a channel floods too much (10 lines in 10 seconds) ; and the script will kick it, without doing anything to block the channel (no moderation). ; ; I hope I've explained this now :) ; ; If you check the "kick opped" and "kick voiced" boxes all the floodprotections will apply for ; people with op and voice aswell. The "banlimit full -> +i" option means that you can choose how ; many bans you want to have on the channel before it will stop putting new bans and lock the channel ; until the number of bans goes below the banlimit number. Remember that if you dont tell it to ; set +i it still wont try to ban anyone if the bans on the channel are above the banlimit number but ; just kick them (so they can rejoin, making for a nice kickflood if the client continues to flood). ; If you want to disable a special protection set the lines option to -1 and no checking will be done, ; this works if you set the locking time to -1 aswell. ; I dont think any of the other options require any explanation, well perhaps the deop and kick ; could be elaborated a little. If any op (not you, of course) deops the # of people within the # ; of seconds he's kickbanned. Simple as that. ; Addition: the join check will check for sites (the part after the @ in everyones hostmask) when ; looking for privateflooders - this could be a bother with many people using one vhost etc. but ; just change the setting of this happens. The global check goes for total # of joins. The end. ; ; Version History: ; * fixed some lame repeat thing where I couldnt spell ; * added old close code for full banlist, automatic (read bofh.ini if you wanna change the setting) ; * yay! setting the lines to -1 will disable the protection ; * yay!! setting to -1 actually works after fixing the code ; * -1 works for banlimit too ; * request from crillo, separate control codes kick selection...will add later <-- fixed ; * todo: change the banlimit setting gui (maybe, it's pretty good NOT to have people fiddle with) <-- fixed ; * added massdeop/kick protection (kickbans offender according to settings), might add join/part spam protection too ; * fixed all this information to make it easier for newbies to understand. ; * added join spam checking...finally done! I HATE THIS -- IT SUCKED TO WRITE, NEVER AGAIN!!! ARGH!!!!! ; ; ; Please remember that this script is still beta and might not work as you want or might not work at all. ; So far I've done about 88% of the script and right now it works perfectly, no bugs or anything - yet... ; ; -- ; Faile ; alias bofh_caps { var %i $1- if (%i !isalpha) { var %j = 1 while (%j <= $len(%i)) { if (($asc($mid(%i,%j,1)) !isnum 65-122) || ($asc($mid(%i,%j,1)) isnum 91-96)) { set %i $remove(%i, $mid(%i,%j,1)) dec %j } inc %j } } if ($len(%i) > 9) { return $calc(($len($removecs(%i,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,å,ä,ö)) / $len(%i)) * 100) } } menu channel,status,query { - bofh:bofh } dialog bofh { title "bofh - the continued nightmare" size -1 -1 420 400 option pixels button "done", 1, 10 365 100 25, ok button "add", 2, 10 290 100 25 button "remove", 3, 10 315 100 25 edit "-", 101, 225 25 40 17 edit "-", 102, 225 40 40 17 edit "-", 103, 225 55 40 17 edit "-", 104, 225 70 40 17 edit "-", 105, 225 85 40 17 edit "-", 106, 225 115 40 17 edit "-", 107, 225 130 40 17 edit "-", 108, 225 145 40 17 edit "-", 109, 225 160 40 17 edit "-", 110, 225 175 40 17 edit "-", 111, 225 190 40 17 edit "-", 112, 225 205 40 17 edit "-", 113, 225 220 40 17 edit "-", 114, 225 235 40 17 edit "-", 115, 225 250 40 17 edit "-", 116, 225 265 40 17 edit "-", 117, 320 25 40 17 edit "-", 118, 320 40 40 17 edit "-", 119, 320 55 40 17 edit "-", 120, 320 70 40 17 edit "-", 121, 320 115 40 17 edit "-", 122, 320 130 40 17 edit "-", 123, 320 160 40 17 edit "-", 124, 320 175 40 17 edit "-", 125, 320 190 40 17 edit "-", 126, 320 205 40 17 edit "-", 127, 320 220 40 17 check "kick opped...", 128, 130 295 130 20 check "kick voiced...", 129, 130 315 130 20 check "banlimit full -> +i...", 130, 130 335 130 20 check "kick for bold...", 131, 265 295 130 20 check "kick for color...", 132, 265 315 130 20 check "kick for reverse...", 133, 265 335 130 20 check "kick for underline...", 134, 265 355 130 20 list 201, 10 10 100 270, sort text "channel...", 301, 120 15 50 15 text "action/text..............", 302, 130 30 95 15 text "ctcp........................", 303, 130 45 95 15 text "join..........................", 304, 130 60 95 15 text "notice.....................", 305, 130 75 95 15 text "lock for...............", 306, 130 90 95 15 text "private...", 307, 120 105 50 15 text "action/text..............", 308, 130 120 95 15 text "action/text repeat.", 309, 130 135 95 15 text "caps percentage...", 310, 130 150 95 15 text "ctcp........................", 311, 130 165 95 15 text "join..........................", 312, 130 180 95 15 text "notice.....................", 313, 130 195 95 15 text "deop.......................", 314, 130 210 95 15 text "kick........................", 315, 130 225 95 15 text "ban for...............", 316, 130 240 95 15 text "banlimit...................", 317, 130 255 95 15 text "bantype..................", 318, 130 270 95 15 text "lines in......", 319, 265 30 56 15 text "lines in......", 320, 265 45 56 15 text "joins in.....", 321, 265 60 56 15 text "lines in......", 322, 265 75 56 15 text "seconds...", 323, 265 90 56 15 text "lines in......", 324, 265 120 56 15 text "repeats in..", 325, 265 135 56 15 text "lines in......", 326, 265 165 56 15 text "joins in.....", 327, 265 180 56 15 text "lines in......", 328, 265 195 56 15 text "deops in....", 329, 265 210 56 15 text "kicks in.....", 330, 265 225 56 15 text "seconds...", 331, 265 240 60 15 text "bans...", 332, 265 255 60 15 text "seconds...", 333, 360 30 50 15 text "seconds...", 334, 360 45 50 15 text "seconds...", 335, 360 60 50 15 text "seconds...", 336, 360 75 50 15 text "seconds...", 337, 360 120 50 15 text "seconds...", 338, 360 135 50 15 text "seconds...", 339, 360 165 50 15 text "seconds...", 340, 360 180 50 15 text "seconds...", 341, 360 195 50 15 text "seconds...", 342, 360 210 50 15 text "seconds...", 343, 360 225 50 15 } alias bofh { dialog -m bofh_dialog bofh } on *:dialog:bofh_dialog:init:*:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { did -a bofh_dialog 201 $gettok($read(bofh.ini, 1), %i, 32) inc %i } } on *:dialog:bofh_dialog:sclick:2:{ var %i $$?="channel?" did -a bofh_dialog 201 %i write -l1 bofh.ini $read(bofh.ini, 1) %i writeini bofh.ini %i channelactiontextlines 72 writeini bofh.ini %i channelactiontextseconds 60 writeini bofh.ini %i channelctcplines 5 writeini bofh.ini %i channelctcpseconds 60 writeini bofh.ini %i channeljoinlines 72 writeini bofh.ini %i channeljoinseconds 60 writeini bofh.ini %i channelnoticelines 5 writeini bofh.ini %i channelnoticeseconds 60 writeini bofh.ini %i channellockseconds 120 writeini bofh.ini %i privateactiontextlines 10 writeini bofh.ini %i privateactiontextseconds 10 writeini bofh.ini %i privateactiontextrepeatlines 3 writeini bofh.ini %i privateactiontextrepeatseconds 60 writeini bofh.ini %i privatebanseconds 1200 writeini bofh.ini %i privatebanlimit 30 writeini bofh.ini %i privatebanlimitfullclose 1 writeini bofh.ini %i privatebantype 3 writeini bofh.ini %i privatecaps -1 writeini bofh.ini %i privatectcplines 3 writeini bofh.ini %i privatectcpseconds 60 writeini bofh.ini %i privatedeoplines 3 writeini bofh.ini %i privatedeopseconds 10 writeini bofh.ini %i privatejoinlines 3 writeini bofh.ini %i privatejoinseconds 60 writeini bofh.ini %i privatekicklines 3 writeini bofh.ini %i privatekickseconds 10 writeini bofh.ini %i privatekickbold 0 writeini bofh.ini %i privatekickcolor 0 writeini bofh.ini %i privatekickopped 0 writeini bofh.ini %i privatekickreverse 0 writeini bofh.ini %i privatekickunderline 0 writeini bofh.ini %i privatekickvoiced 0 writeini bofh.ini %i privatenoticelines 3 writeini bofh.ini %i privatenoticeseconds 60 } on *:dialog:bofh_dialog:sclick:3:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($did(201).seltext == $gettok($read(bofh.ini, 1), %i, 32)) { write -l1 bofh.ini $deltok($read(bofh.ini, 1), %i, 32) break } inc %i } remini bofh.ini $did(201).seltext did -d bofh_dialog 201 $did(201).sel } on *:dialog:bofh_dialog:sclick:201:{ did -ar bofh_dialog 101 $readini(bofh.ini, $did(201).seltext, channelactiontextlines) did -ar bofh_dialog 102 $readini(bofh.ini, $did(201).seltext, channelctcplines) did -ar bofh_dialog 103 $readini(bofh.ini, $did(201).seltext, channeljoinlines) did -ar bofh_dialog 104 $readini(bofh.ini, $did(201).seltext, channelnoticelines) did -ar bofh_dialog 105 $readini(bofh.ini, $did(201).seltext, channellockseconds) did -ar bofh_dialog 106 $readini(bofh.ini, $did(201).seltext, privateactiontextlines) did -ar bofh_dialog 107 $readini(bofh.ini, $did(201).seltext, privateactiontextrepeatlines) did -ar bofh_dialog 108 $readini(bofh.ini, $did(201).seltext, privatecaps) did -ar bofh_dialog 109 $readini(bofh.ini, $did(201).seltext, privatectcplines) did -ar bofh_dialog 110 $readini(bofh.ini, $did(201).seltext, privatejoinlines) did -ar bofh_dialog 111 $readini(bofh.ini, $did(201).seltext, privatenoticelines) did -ar bofh_dialog 112 $readini(bofh.ini, $did(201).seltext, privatedeoplines) did -ar bofh_dialog 113 $readini(bofh.ini, $did(201).seltext, privatekicklines) did -ar bofh_dialog 114 $readini(bofh.ini, $did(201).seltext, privatebanseconds) did -ar bofh_dialog 115 $readini(bofh.ini, $did(201).seltext, privatebanlimit) did -ar bofh_dialog 116 $readini(bofh.ini, $did(201).seltext, privatebantype) did -ar bofh_dialog 117 $readini(bofh.ini, $did(201).seltext, channelactiontextseconds) did -ar bofh_dialog 118 $readini(bofh.ini, $did(201).seltext, channelctcpseconds) did -ar bofh_dialog 119 $readini(bofh.ini, $did(201).seltext, channeljoinseconds) did -ar bofh_dialog 120 $readini(bofh.ini, $did(201).seltext, channelnoticeseconds) did -ar bofh_dialog 121 $readini(bofh.ini, $did(201).seltext, privateactiontextseconds) did -ar bofh_dialog 122 $readini(bofh.ini, $did(201).seltext, privateactiontextrepeatseconds) did -ar bofh_dialog 123 $readini(bofh.ini, $did(201).seltext, privatectcpseconds) did -ar bofh_dialog 124 $readini(bofh.ini, $did(201).seltext, privatenoticeseconds) did -ar bofh_dialog 125 $readini(bofh.ini, $did(201).seltext, privatenoticeseconds) did -ar bofh_dialog 126 $readini(bofh.ini, $did(201).seltext, privatedeopseconds) did -ar bofh_dialog 127 $readini(bofh.ini, $did(201).seltext, privatekickseconds) if ($readini(bofh.ini, $did(201).seltext, privatekickopped) == 1) { did -c bofh_dialog 128 } | else { did -u bofh_dialog 128 } if ($readini(bofh.ini, $did(201).seltext, privatekickvoiced) == 1) { did -c bofh_dialog 129 } | else { did -u bofh_dialog 129 } if ($readini(bofh.ini, $did(201).seltext, privatebanlimitfullclose) == 1) { did -c bofh_dialog 130 } | else { did -u bofh_dialog 130 } if ($readini(bofh.ini, $did(201).seltext, privatekickbold) == 1) { did -c bofh_dialog 131 } | else { did -u bofh_dialog 131 } if ($readini(bofh.ini, $did(201).seltext, privatekickcolor) == 1) { did -c bofh_dialog 132 } | else { did -u bofh_dialog 132 } if ($readini(bofh.ini, $did(201).seltext, privatekickreverse) == 1) { did -c bofh_dialog 133 } | else { did -u bofh_dialog 133 } if ($readini(bofh.ini, $did(201).seltext, privatekickunderline) == 1) { did -c bofh_dialog 134 } | else { did -u bofh_dialog 134 } } on *:dialog:bofh_dialog:edit:101:{ if (($did(101).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext channelactiontextlines $did(101).text } } on *:dialog:bofh_dialog:edit:102:{ if (($did(102).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext channelctcplines $did(102).text } } on *:dialog:bofh_dialog:edit:103:{ if (($did(103).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext channeljoinlines $did(103).text } } on *:dialog:bofh_dialog:edit:104:{ if (($did(104).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext channelnoticelines $did(104).text } } on *:dialog:bofh_dialog:edit:105:{ if (($did(105).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext channellockseconds $did(105).text } } on *:dialog:bofh_dialog:edit:106:{ if (($did(106).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privateactiontextlines $did(106).text } } on *:dialog:bofh_dialog:edit:107:{ if (($did(107).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privateactiontextrepeatlines $did(107).text } } on *:dialog:bofh_dialog:edit:108:{ if (($did(108).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatecaps $did(108).text } } on *:dialog:bofh_dialog:edit:109:{ if (($did(109).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatectcplines $did(109).text } } on *:dialog:bofh_dialog:edit:110:{ if (($did(110).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatejoinlines $did(110).text } } on *:dialog:bofh_dialog:edit:111:{ if (($did(111).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatenoticelines $did(111).text } } on *:dialog:bofh_dialog:edit:112:{ if (($did(112).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatedeoplines $did(112).text } } on *:dialog:bofh_dialog:edit:113:{ if (($did(113).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatekicklines $did(113).text } } on *:dialog:bofh_dialog:edit:114:{ if (($did(114).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatebanseconds $did(114).text } } on *:dialog:bofh_dialog:edit:115:{ if (($did(115).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatebanlimit $did(115).text } } on *:dialog:bofh_dialog:edit:116:{ if (($did(116).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatebantype $did(116).text } } on *:dialog:bofh_dialog:edit:117:{ if (($did(117).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext channelactiontextseconds $did(117).text } } on *:dialog:bofh_dialog:edit:118:{ if (($did(118).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext channelctcpseconds $did(118).text } } on *:dialog:bofh_dialog:edit:119:{ if (($did(119).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext channeljoinseconds $did(119).text } } on *:dialog:bofh_dialog:edit:120:{ if (($did(119).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext channelnoticeseconds $did(120).text } } on *:dialog:bofh_dialog:edit:121:{ if (($did(121).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privateactiontextseconds $did(121).text } } on *:dialog:bofh_dialog:edit:122:{ if (($did(122).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privateactiontextrepeatseconds $did(122).text } } on *:dialog:bofh_dialog:edit:123:{ if (($did(123).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatectcpseconds $did(123).text } } on *:dialog:bofh_dialog:edit:124:{ if (($did(124).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatejoinseconds $did(124).text } } on *:dialog:bofh_dialog:edit:125:{ if (($did(125).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatenoticeseconds $did(125).text } } on *:dialog:bofh_dialog:edit:126:{ if (($did(126).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatedeopseconds $did(126).text } } on *:dialog:bofh_dialog:edit:127:{ if (($did(127).text != $null) && ($did(201).seltext != $null)) { writeini bofh.ini $did(201).seltext privatekickseconds $did(127).text } } on *:dialog:bofh_dialog:sclick:128:{ if ($did(201).seltext != $null) { if ($did(128).state == 1) { writeini bofh.ini $did(201).seltext privatekickopped 1 } | else { writeini bofh.ini $did(201).seltext privatekickopped 0 } } } on *:dialog:bofh_dialog:sclick:129:{ if ($did(201).seltext != $null) { if ($did(129).state == 1) { writeini bofh.ini $did(201).seltext privatekickvoiced 1 } | else { writeini bofh.ini $did(201).seltext privatekickvoiced 0 } } } on *:dialog:bofh_dialog:sclick:130:{ if ($did(201).seltext != $null) { if ($did(130).state == 1) { writeini bofh.ini $did(201).seltext privatebanlimitfullclose 1 } | else { writeini bofh.ini $did(201).seltext privatebanlimitfullclose 0 } } } on *:dialog:bofh_dialog:sclick:131:{ if ($did(201).seltext != $null) { if ($did(131).state == 1) { writeini bofh.ini $did(201).seltext privatekickbold 1 } | else { writeini bofh.ini $did(201).seltext privatekickbold 0 } } } on *:dialog:bofh_dialog:sclick:132:{ if ($did(201).seltext != $null) { if ($did(132).state == 1) { writeini bofh.ini $did(201).seltext privatekickcolor 1 } | else { writeini bofh.ini $did(201).seltext privatekickcolor 0 } } } on *:dialog:bofh_dialog:sclick:133:{ if ($did(201).seltext != $null) { if ($did(133).state == 1) { writeini bofh.ini $did(201).seltext privatekickreverse 1 } | else { writeini bofh.ini $did(201).seltext privatekickreverse 0 } } } on *:dialog:bofh_dialog:sclick:134:{ if ($did(201).seltext != $null) { if ($did(134).state == 1) { writeini bofh.ini $did(201).seltext privatekickunderline 1 } | else { writeini bofh.ini $did(201).seltext privatekickunderline 0 } } } ctcp @*:*:#:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($chan == $gettok($read(bofh.ini, 1), %i, 32)) { if (($nick isreg $chan) || (($nick isvoice $chan) && ($readini(bofh.ini, $chan, privatekickvoiced) == 1)) || (($nick isop $chan) && ($readini(bofh.ini, $chan, privatekickopped) == 1))) { if (($readini(bofh.ini, $chan, channelctcplines) != -1) && ($readini(bofh.ini, $chan, channellockseconds) != -1)) { if (%bofh_channelctcp [ $+ [ $chan ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, channelctcpseconds) ] %bofh_channelctcp $+ $chan } | else { inc %bofh_channelctcp $+ $chan } if ((%bofh_channelctcp [ $+ [ $chan ] ] >= $readini(bofh.ini, $chan, channelctcplines)) && (m !isin $gettok($chan($chan).mode,1,32))) { mode $chan +m | .timer 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -m | unset %bofh_channelctcp $+ $chan } } if ($readini(bofh.ini, $chan, privatectcplines) != -1) { if (%bofh_privatectcp [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, privatectcpseconds) ] %bofh_privatectcp $+ $chan $+ $address } | else { inc %bofh_privatectcp $+ $chan $+ $address } if (%bofh_privatectcp [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, privatectcplines)) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick $readini(bofh.ini, $chan, privatectcplines) line(s) in $readini(bofh.ini, $chan, privatectcpseconds) second(s) | unset %bofh_privatectcp $+ $chan $+ $address } } } } inc %i } } on @*:action:*:#:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($chan == $gettok($read(bofh.ini, 1), %i, 32)) { if (($nick isreg $chan) || (($nick isvoice $chan) && ($readini(bofh.ini, $chan, privatekickvoiced) == 1)) || (($nick isop $chan) && ($readini(bofh.ini, $chan, privatekickopped) == 1))) { if (($readini(bofh.ini, $chan, channelactiontextlines) != -1) && ($readini(bofh.ini, $chan, channellockseconds) != -1)) { if (%bofh_channelactiontext [ $+ [ $chan ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, channelactiontextseconds) ] %bofh_channelactiontext $+ $chan } | else { inc %bofh_channelactiontext $+ $chan } if ((%bofh_channelactiontext [ $+ [ $chan ] ] >= $readini(bofh.ini, $chan, channelactiontextlines)) && (m !isin $gettok($chan($chan).mode,1,32))) { mode $chan +m | .timer 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -m | unset %bofh_channelactiontext $+ $chan } } if ($readini(bofh.ini, $chan, privateactiontextlines) != -1) { if (%bofh_privateactiontext [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, privateactiontextseconds) ] %bofh_privateactiontext $+ $chan $+ $address } | else { inc %bofh_privateactiontext $+ $chan $+ $address } if (%bofh_privateactiontext [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, privateactiontextlines)) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick $readini(bofh.ini, $chan, privateactiontextlines) line(s) in $readini(bofh.ini, $chan, privateactiontextseconds) second(s) | unset %bofh_privateactiontext $+ $chan $+ $address } } if (($readini(bofh.ini, $chan, privatecaps) != -1) && ($bofh_caps($1-) >= $readini(bofh.ini, $chan, privatecaps))) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick [ $readini(bofh.ini, $chan, privatecaps) ] $+ % caps } if ((($readini(bofh.ini, $chan, privatekickbold) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, privatekickcolor) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, privatekickreverse) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, privatekickunderline) == 1) && ( isin $1-))) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick control code(s) } if ($readini(bofh.ini, $chan, privateactiontextrepeatlines) != -1) { if (%bofh_privateactiontextrepeat [ $+ [ $chan ] $+ [ $address ] ] == $1-) { if (%bofh_privateactiontextrepeats [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, privateactiontextrepeatseconds) ] %bofh_privateactiontextrepeats $+ $chan $+ $address } | else { inc %bofh_privateactiontextrepeats $+ $chan $+ $address } } if (%bofh_privateactiontextrepeats [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, privateactiontextrepeatlines)) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick $readini(bofh.ini, $chan, privateactiontextrepeatlines) repeat(s) in $readini(bofh.ini, $chan, privateactiontextrepeatseconds) second(s) | unset %bofh_privateactiontextrepeats $+ $chan $+ $address } set -u $+ [ $readini(bofh.ini, $chan, privateactiontextrepeatseconds) ] %bofh_privateactiontextrepeat $+ $chan $+ $address $1- } } } inc %i } } on @*:ban:#:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($chan == $gettok($read(bofh.ini, 1), %i, 32)) { if (($readini(bofh.ini, $chan, privatebanlimitfullclose) == 1) && ($ibl($chan,0) >= $readini(bofh.ini, $chan, privatebanlimit)) && (i !isin $gettok($chan($chan).mode,1,32))) { mode $chan +i | set %bofh_privatebanlimit $+ $chan 1 } } inc %i } } on *:connect:{ unset %bofh_* } on !@*:deop:#:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($chan == $gettok($read(bofh.ini, 1), %i, 32)) { if ($readini(bofh.ini, $chan, privatedeoplines) != -1) { if (%bofh_privatedeop [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, privatedeopseconds) ] %bofh_privatedeop $+ $chan $+ $address } | else { inc %bofh_privatedeop $+ $chan $+ $address } if (%bofh_privatedeop [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, privatedeoplines)) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick $readini(bofh.ini, $chan, privatedeoplines) deop(s) in $readini(bofh.ini, $chan, privatedeopseconds) second(s) | unset %bofh_privatedeop $+ $chan $+ $address } } } inc %i } } on @*:join:#:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($chan == $gettok($read(bofh.ini, 1), %i, 32)) { if (($readini(bofh.ini, $chan, channeljoinlines) != -1) && ($readini(bofh.ini, $chan, channellockseconds) != -1)) { if (%bofh_channeljoin [ $+ [ $chan ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, channeljoinseconds) ] %bofh_channeljoin $+ $chan } | else { inc %bofh_channeljoin $+ $chan } if ((%bofh_channeljoin [ $+ [ $chan ] ] >= $readini(bofh.ini, $chan, channeljoinlines)) && (i !isin $gettok($chan($chan).mode,1,32))) { mode $chan +i | .timer 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -i | unset %bofh_channeljoin $+ $chan } } if ($readini(bofh.ini, $chan, privatejoinlines) != -1) { if (%bofh_privatejoin [ $+ [ $chan ] $+ [ $site ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, privatejoinseconds) ] %bofh_privatejoin $+ $chan $+ $site } | else { inc %bofh_privatejoin $+ $chan $+ $site } if (%bofh_privatejoin [ $+ [ $chan ] $+ [ $site ] ] >= $readini(bofh.ini, $chan, privatejoinlines)) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $site } | unset %bofh_privatejoin $+ $chan $+ $site } } } inc %i } } on !@*:kick:#:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($chan == $gettok($read(bofh.ini, 1), %i, 32)) { if ($readini(bofh.ini, $chan, privatekicklines) != -1) { if (%bofh_privatekick [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, privatekickseconds) ] %bofh_privatekick $+ $chan $+ $address } | else { inc %bofh_privatekick $+ $chan $+ $address } if (%bofh_privatekick [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, privatekicklines)) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick $readini(bofh.ini, $chan, privatekicklines) kick(s) in $readini(bofh.ini, $chan, privatekickseconds) second(s) | unset %bofh_privatekick $+ $chan $+ $address } } } inc %i } } on @*:notice:*:#:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($chan == $gettok($read(bofh.ini, 1), %i, 32)) { if (($nick isreg $chan) || (($nick isvoice $chan) && ($readini(bofh.ini, $chan, privatekickvoiced) == 1)) || (($nick isop $chan) && ($readini(bofh.ini, $chan, privatekickopped) == 1))) { if (($readini(bofh.ini, $chan, channelnoticelines) != -1) && ($readini(bofh.ini, $chan, channellockseconds) != -1)) { if (%bofh_channelnotice [ $+ [ $chan ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, channelnoticeseconds) ] %bofh_channelnotice $+ $chan } | else { inc %bofh_channelnotice $+ $chan } if ((%bofh_channelnotice [ $+ [ $chan ] ] >= $readini(bofh.ini, $chan, channelnoticelines)) && (m !isin $gettok($chan($chan).mode,1,32))) { mode $chan +m | .timer 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -m | unset %bofh_channelnotice $+ $chan } } if ($readini(bofh.ini, $chan, privatenoticelines) != -1) { if (%bofh_privatenotice [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, privatenoticeseconds) ] %bofh_privatenotice $+ $chan $+ $address } | else { inc %bofh_privatenotice $+ $chan $+ $address } if (%bofh_privatenotice [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, privatenoticelines)) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick $readini(bofh.ini, $chan, privatenoticelines) line(s) in $readini(bofh.ini, $chan, privatenoticeseconds) second(s) | unset %bofh_privatenotice $+ $chan $+ $address } } } } inc %i } } on @*:text:*:#:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($chan == $gettok($read(bofh.ini, 1), %i, 32)) { if (($nick isreg $chan) || (($nick isvoice $chan) && ($readini(bofh.ini, $chan, privatekickvoiced) == 1)) || (($nick isop $chan) && ($readini(bofh.ini, $chan, privatekickopped) == 1))) { if (($readini(bofh.ini, $chan, channelactiontextlines) != -1) && ($readini(bofh.ini, $chan, channellockseconds) != -1)) { if (%bofh_channelactiontext [ $+ [ $chan ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, channelactiontextseconds) ] %bofh_channelactiontext $+ $chan } | else { inc %bofh_channelactiontext $+ $chan } if ((%bofh_channelactiontext [ $+ [ $chan ] ] >= $readini(bofh.ini, $chan, channelactiontextlines)) && (m !isin $gettok($chan($chan).mode,1,32))) { mode $chan +m | .timer 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -m | unset %bofh_channelactiontext $+ $chan } } if ($readini(bofh.ini, $chan, privateactiontextlines) != -1) { if (%bofh_privateactiontext [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, privateactiontextseconds) ] %bofh_privateactiontext $+ $chan $+ $address } | else { inc %bofh_privateactiontext $+ $chan $+ $address } if (%bofh_privateactiontext [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, privateactiontextlines)) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick $readini(bofh.ini, $chan, privateactiontextlines) line(s) in $readini(bofh.ini, $chan, privateactiontextseconds) second(s) | unset %bofh_privateactiontext $+ $chan $+ $address } } if (($readini(bofh.ini, $chan, privatecaps) != -1) && ($bofh_caps($1-) >= $readini(bofh.ini, $chan, privatecaps))) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick [ $readini(bofh.ini, $chan, privatecaps) ] $+ % caps } if ((($readini(bofh.ini, $chan, privatekickbold) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, privatekickcolor) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, privatekickreverse) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, privatekickunderline) == 1) && ( isin $1-))) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick control code(s) } if ($readini(bofh.ini, $chan, privateactiontextrepeatlines) != -1) { if (%bofh_privateactiontextrepeat [ $+ [ $chan ] $+ [ $address ] ] == $1-) { if (%bofh_privateactiontextrepeats [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, privateactiontextrepeatseconds) ] %bofh_privateactiontextrepeats $+ $chan $+ $address } | else { inc %bofh_privateactiontextrepeats $+ $chan $+ $address } } if (%bofh_privateactiontextrepeats [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, privateactiontextrepeatlines)) { if (($readini(bofh.ini, $chan, privatebanseconds) != -1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, privatebanseconds) ] $chan $nick $readini(bofh.ini, $chan, privatebantype) } | kick $chan $nick $readini(bofh.ini, $chan, privateactiontextrepeatlines) repeat(s) in $readini(bofh.ini, $chan, privateactiontextrepeatseconds) second(s) | unset %bofh_privateactiontextrepeats $+ $chan $+ $address } set -u $+ [ $readini(bofh.ini, $chan, privateactiontextrepeatseconds) ] %bofh_privateactiontextrepeat $+ $chan $+ $address $1- } } } inc %i } } on @*:unban:#:{ var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($chan == $gettok($read(bofh.ini, 1), %i, 32)) { if ((%bofh_privatebanlimit [ $+ [ $chan ] ] != $null) && ($ibl($chan,0) < $readini(bofh.ini, $chan, privatebanlimit))) { unset %bofh_privatebanlimit $+ $chan | if (i isin $gettok($chan($chan).mode,1,32)) { mode $chan -i } } } inc %i } }