; ; bofh.mrc ; ; ; If you're reading this you're probably wondering what this script is and why you downloaded it? ; ; It's a floodprotection script that helps people keeping their channels spamfree and clean, ; and is meant to be easy to use and highly configurable. To get started simply load the script into ; mIRC by typing "/load -rs bofh.mrc" and after that "/bofh" to configure it. Now a new window ; will appear inside mIRC where you configure bofh to your needs, such as add and remove ; channels, set channel and user settings and other options. ; ; A few things I feel I should mention (READ THIS!): ; ; * it's protected against floods and wont excess flood from the server, also understands to use ; multiple servers for counting penalties ; * the user join protection checks for $site joins (*!*@host) ; * deop and kick protections are active even if ignoreop or ignorevoice are checked ; * the caps protection wont trigger unless the length of the text is ten characters or more ; ; If you feel like it, you can write your own GUI instead of mine. Just write a interface for ; changing the bofh.ini file and you're set :) ; ; BTW, there are a few "secret" or "hidden" settings only available when manually ; editing bofh.ini for experienced users. Normal users shouldnt bother with these, ever. ; ; ; -- ; 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,query,status { - BOFH:bofh } dialog bofh { title "BOFH: The Continued Nightmare" size -1 -1 317 174 option dbu button "Done", 1, 21 132 37 12, default ok list 2, 2 3 75 100, sort size button "Add", 3, 2 106 37 10 button "Remove", 4, 40 106 37 10 text "version 0.61a", 5, 3 163 74 8, center ; channel tab "Channel", 100, 81 1 231 168 check "Enabled", 101, 85 16 30 10, tab 100 check "Action/Text -->", 102, 87 27 47 10, tab 100 check "CTCP -->", 103, 87 36 47 10, tab 100 check "Join -->", 104, 87 45 47 10, tab 100 check "Notice -->", 105, 87 54 47 10, tab 100 check "Lock -->", 106, 87 63 47 10, tab 100 edit "", 107, 135 27 20 10, tab 100 edit "", 108, 135 36 20 10, tab 100 edit "", 109, 135 45 20 10, tab 100 edit "", 110, 135 54 20 10, tab 100 edit "", 111, 135 63 20 10, tab 100 text "lines in", 112, 157 29 17 8, tab 100 text "lines in", 113, 157 38 17 8, tab 100 text "lines in", 114, 157 47 17 8, tab 100 text "lines in", 115, 157 56 17 8, tab 100 text "seconds.", 116, 157 65 22 8, tab 100 edit "", 117, 175 27 20 10, tab 100 edit "", 118, 175 36 20 10, tab 100 edit "", 119, 175 45 20 10, tab 100 edit "", 120, 175 54 20 10, tab 100 text "seconds.", 121, 197 29 22 8, tab 100 text "seconds.", 122, 197 38 22 8, tab 100 text "seconds.", 123, 197 47 22 8, tab 100 text "seconds.", 124, 197 56 22 8, tab 100 check "Ignore users with op.", 125, 87 74 60 10, tab 100 check "Ignore users with voice.", 126, 87 83 67 10, tab 100 ; user tab "User", 200 check "Enabled", 201, 85 16 30 10, tab 200 check "Action/Text -->", 202, 87 27 47 10, tab 200 check "Caps -->", 203, 87 36 47 10, tab 200 check "CTCP -->", 204, 87 45 47 10, tab 200 check "Deop -->", 205, 87 54 47 10, tab 200 check "Join -->", 206, 87 63 47 10, tab 200 check "Kick -->", 207, 87 72 47 10, tab 200 check "Notice -->", 208, 87 81 47 10, tab 200 check "Repeat -->", 209, 87 90 47 10, tab 200 check "Ban -->", 210, 87 100 47 10, tab 200 edit "", 211, 135 27 20 10, tab 200 edit "", 212, 135 36 20 10, tab 200 edit "", 213, 135 45 20 10, tab 200 edit "", 214, 135 54 20 10, tab 200 edit "", 215, 135 63 20 10, tab 200 edit "", 216, 135 72 20 10, tab 200 edit "", 217, 135 81 20 10, tab 200 edit "", 218, 135 90 20 10, tab 200 combo 219, 135 100 60 80, tab 200 size drop text "lines in", 220, 157 29 17 8, tab 200 text "%", 221, 157 38 6 8, tab 200 text "lines in", 222, 157 47 17 8, tab 200 text "lines in", 223, 157 56 17 8, tab 200 text "lines in", 224, 157 65 17 8, tab 200 text "lines in", 225, 157 74 17 8, tab 200 text "lines in", 226, 157 83 17 8, tab 200 text "lines in", 227, 157 92 17 8, tab 200 text "for", 228, 197 102 8 8, tab 200 edit "", 229, 175 27 20 10, tab 200 edit "", 230, 175 45 20 10, tab 200 edit "", 231, 175 54 20 10, tab 200 edit "", 232, 175 63 20 10, tab 200 edit "", 233, 175 72 20 10, tab 200 edit "", 234, 175 81 20 10, tab 200 edit "", 235, 175 90 20 10, tab 200 edit "", 236, 205 100 22 10, tab 200 text "seconds.", 237, 197 29 22 8, tab 200 text "seconds.", 238, 197 47 22 8, tab 200 text "seconds.", 239, 197 56 22 8, tab 200 text "seconds.", 240, 197 65 22 8, tab 200 text "seconds.", 241, 197 74 22 8, tab 200 text "seconds.", 242, 197 83 22 8, tab 200 text "seconds.", 243, 197 92 22 8, tab 200 text "seconds and limit to", 244, 228 102 48 8, tab 200 edit "", 245, 276 100 16 10, tab 200 text "bans.", 246, 294 102 14 8, tab 200 check "Ignore users with op.", 247, 87 111 63 10, tab 200 check "Ignore users with voice.", 248, 87 120 69 10, tab 200 check "Set +i when the banlist is full.", 249, 87 129 82 10, tab 200 check "Kick users who use bold.", 250, 188 112 69 10, tab 200 check "Kick users who use color.", 251, 188 121 70 10, tab 200 check "Kick users who use underline.", 252, 188 130 79 10, tab 200 check "Kick users who use reverse.", 253, 188 139 79 10, tab 200 check "Kick users who mention channels.", 254, 188 148 90 10, tab 200 check "Kick users who mention urls.", 255, 188 157 79 10, tab 200 ; help tab "Help", 300 text "BOFH: The Continued Nightmare", 301, 94 18 212 8, tab 300 center text "The Channel protection:", 302, 89 29 59 8, tab 300 text "This protection is meant to protect a channel from large floods, such as floods from many different users (clones) or if everyone starts spamming at the same time. When a flood is detected the channel will be locked with +i or +m to prevent any further flooding. Using this protection and also giving everyone voice on your channel is a bad idea since the +m lock will be practically pointless.", 303, 87 39 222 34, tab 300 text "The User protection:", 304, 89 76 50 8, tab 300 text "This protection will detect individual users on channels and kickban them if they are flooding, using caps or control codes, depending on your settings. It will never lock the channel like the Channel protection but just punish individual users.", 305, 87 86 222 21, tab 300 text "Both of these protections have an automatic protection against flooding the server and will never excess flood or try to send too much data, it will simply ignore the action it should have taken and do it the next time it gets a chance.", 306, 87 110 222 21, tab 300 text "faile@quakenet.org -- http://faile.chas.nu", 307, 94 159 211 8, tab 300 center } alias bofh { dialog -m bofh_dialog bofh } on *:dialog:bofh_dialog:init:*:{ did -a $dname 219 *!user@host did -a $dname 219 *!*user@host did -a $dname 219 *!*@host did -a $dname 219 *!*user@*.host did -a $dname 219 *!*@*.host did -a $dname 219 nick!user@host did -a $dname 219 nick!*user@host did -a $dname 219 nick!*@host did -a $dname 219 nick!*user@*.host did -a $dname 219 nick!*@*.host var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { did -a $dname 2 $gettok($read(bofh.ini, 1), %i, 32) inc %i } } on *:dialog:bofh_dialog:sclick:2:{ ; channel if ($readini(bofh.ini, $did(2).seltext, channelactiontext) == 1) { did -c $dname 102 } | else { did -u $dname 102 } if ($readini(bofh.ini, $did(2).seltext, channelctcp) == 1) { did -c $dname 103 } | else { did -u $dname 103 } if ($readini(bofh.ini, $did(2).seltext, channeljoin) == 1) { did -c $dname 104 } | else { did -u $dname 104 } if ($readini(bofh.ini, $did(2).seltext, channelnotice) == 1) { did -c $dname 105 } | else { did -u $dname 105 } if ($readini(bofh.ini, $did(2).seltext, channellock) == 1) { did -c $dname 106 } | else { did -u $dname 106 } if ($readini(bofh.ini, $did(2).seltext, channelignoreop) == 1) { did -c $dname 125 } | else { did -u $dname 125 } if ($readini(bofh.ini, $did(2).seltext, channelignorevoice) == 1) { did -c $dname 126 } | else { did -u $dname 126 } did -ar $dname 107 $readini(bofh.ini, $did(2).seltext, channelactiontextlines) did -ar $dname 108 $readini(bofh.ini, $did(2).seltext, channelctcplines) did -ar $dname 109 $readini(bofh.ini, $did(2).seltext, channeljoinlines) did -ar $dname 110 $readini(bofh.ini, $did(2).seltext, channelnoticelines) did -ar $dname 111 $readini(bofh.ini, $did(2).seltext, channellockseconds) did -ar $dname 117 $readini(bofh.ini, $did(2).seltext, channelactiontextseconds) did -ar $dname 118 $readini(bofh.ini, $did(2).seltext, channelctcpseconds) did -ar $dname 119 $readini(bofh.ini, $did(2).seltext, channeljoinseconds) did -ar $dname 120 $readini(bofh.ini, $did(2).seltext, channelnoticeseconds) if ($readini(bofh.ini, $did(2).seltext, channelenabled) == 1) { did -c $dname 101 | did -e $dname 102 | did -e $dname 103 | did -e $dname 104 | did -e $dname 105 | did -e $dname 106 | did -e $dname 125 | did -e $dname 126 if ($did(102).state == 1) { did -e $dname 107 | did -e $dname 117 } | else { did -b $dname 107 | did -b $dname 117 } if ($did(103).state == 1) { did -e $dname 108 | did -e $dname 118 } | else { did -b $dname 108 | did -b $dname 118 } if ($did(104).state == 1) { did -e $dname 109 | did -e $dname 119 } | else { did -b $dname 109 | did -b $dname 119 } if ($did(105).state == 1) { did -e $dname 110 | did -e $dname 120 } | else { did -b $dname 110 | did -b $dname 120 } if ($did(106).state == 1) { did -e $dname 111 } | else { did -u $dname 106 | did -b $dname 111 } } else { did -u $dname 101 | did -b $dname 102 | did -b $dname 103 | did -b $dname 104 | did -b $dname 105 | did -b $dname 106 | did -b $dname 107 | did -b $dname 108 | did -b $dname 109 | did -b $dname 110 | did -b $dname 111 | did -b $dname 117 | did -b $dname 118 | did -b $dname 119 | did -b $dname 120 | did -b $dname 125 | did -b $dname 126 } ; user if ($readini(bofh.ini, $did(2).seltext, useractiontext) == 1) { did -c $dname 202 } | else { did -u $dname 202 } if ($readini(bofh.ini, $did(2).seltext, usercaps) == 1) { did -c $dname 203 } | else { did -u $dname 203 } if ($readini(bofh.ini, $did(2).seltext, userctcp) == 1) { did -c $dname 204 } | else { did -u $dname 204 } if ($readini(bofh.ini, $did(2).seltext, userdeop) == 1) { did -c $dname 205 } | else { did -u $dname 205 } if ($readini(bofh.ini, $did(2).seltext, userjoin) == 1) { did -c $dname 206 } | else { did -u $dname 206 } if ($readini(bofh.ini, $did(2).seltext, userkick) == 1) { did -c $dname 207 } | else { did -u $dname 207 } if ($readini(bofh.ini, $did(2).seltext, usernotice) == 1) { did -c $dname 208 } | else { did -u $dname 208 } if ($readini(bofh.ini, $did(2).seltext, userrepeat) == 1) { did -c $dname 209 } | else { did -u $dname 209 } if ($readini(bofh.ini, $did(2).seltext, userban) == 1) { did -c $dname 210 } | else { did -u $dname 210 } if ($readini(bofh.ini, $did(2).seltext, userignoreop) == 1) { did -c $dname 247 } | else { did -u $dname 247 } if ($readini(bofh.ini, $did(2).seltext, userignorevoice) == 1) { did -c $dname 248 } | else { did -u $dname 248 } if ($readini(bofh.ini, $did(2).seltext, userbanlimitfulllock) == 1) { did -c $dname 249 } | else { did -u $dname 249 } if ($readini(bofh.ini, $did(2).seltext, userkickbold) == 1) { did -c $dname 250 } | else { did -u $dname 250 } if ($readini(bofh.ini, $did(2).seltext, userkickcolor) == 1) { did -c $dname 251 } | else { did -u $dname 251 } if ($readini(bofh.ini, $did(2).seltext, userkickreverse) == 1) { did -c $dname 252 } | else { did -u $dname 252 } if ($readini(bofh.ini, $did(2).seltext, userkickunderline) == 1) { did -c $dname 253 } | else { did -u $dname 253 } if ($readini(bofh.ini, $did(2).seltext, userkickchannelads) == 1) { did -c $dname 254 } | else { did -u $dname 254 } if ($readini(bofh.ini, $did(2).seltext, userkickurlads) == 1) { did -c $dname 255 } | else { did -u $dname 255 } did -ar $dname 211 $readini(bofh.ini, $did(2).seltext, useractiontextlines) did -ar $dname 212 $readini(bofh.ini, $did(2).seltext, usercapspercentage) did -ar $dname 213 $readini(bofh.ini, $did(2).seltext, userctcplines) did -ar $dname 214 $readini(bofh.ini, $did(2).seltext, userdeoplines) did -ar $dname 215 $readini(bofh.ini, $did(2).seltext, userjoinlines) did -ar $dname 216 $readini(bofh.ini, $did(2).seltext, userkicklines) did -ar $dname 217 $readini(bofh.ini, $did(2).seltext, usernoticelines) did -ar $dname 218 $readini(bofh.ini, $did(2).seltext, userrepeatlines) did -c $dname 219 $calc($readini(bofh.ini, $did(2).seltext, userbantype) + 1) did -ar $dname 229 $readini(bofh.ini, $did(2).seltext, useractiontextseconds) did -ar $dname 230 $readini(bofh.ini, $did(2).seltext, userctcpseconds) did -ar $dname 231 $readini(bofh.ini, $did(2).seltext, userdeopseconds) did -ar $dname 232 $readini(bofh.ini, $did(2).seltext, userjoinseconds) did -ar $dname 233 $readini(bofh.ini, $did(2).seltext, userkickseconds) did -ar $dname 234 $readini(bofh.ini, $did(2).seltext, usernoticeseconds) did -ar $dname 235 $readini(bofh.ini, $did(2).seltext, userrepeatseconds) did -ar $dname 236 $readini(bofh.ini, $did(2).seltext, userbanseconds) did -ar $dname 245 $readini(bofh.ini, $did(2).seltext, userbanlimit) if ($readini(bofh.ini, $did(2).seltext, userenabled) == 1) { did -c $dname 201 | did -e $dname 202 | did -e $dname 203 | did -e $dname 204 | did -e $dname 205 | did -e $dname 206 | did -e $dname 207 | did -e $dname 208 | did -e $dname 209 | did -e $dname 210 | did -e $dname 247 | did -e $dname 248 | did -e $dname 249 | did -e $dname 250 | did -e $dname 251 | did -e $dname 252 | did -e $dname 253 | did -e $dname 254 | did -e $dname 255 if ($did(202).state == 1) { did -e $dname 211 | did -e $dname 229 } | else { did -b $dname 211 | did -b $dname 229 } if ($did(203).state == 1) { did -e $dname 212 } | else { did -b $dname 212 } if ($did(204).state == 1) { did -e $dname 213 | did -e $dname 230 } | else { did -b $dname 213 | did -b $dname 230 } if ($did(205).state == 1) { did -e $dname 214 | did -e $dname 231 } | else { did -b $dname 214 | did -b $dname 231 } if ($did(206).state == 1) { did -e $dname 215 | did -e $dname 232 } | else { did -b $dname 215 | did -b $dname 232 } if ($did(207).state == 1) { did -e $dname 216 | did -e $dname 233 } | else { did -b $dname 216 | did -b $dname 233 } if ($did(208).state == 1) { did -e $dname 217 | did -e $dname 234 } | else { did -b $dname 217 | did -b $dname 234 } if ($did(209).state == 1) { did -e $dname 218 | did -e $dname 235 } | else { did -b $dname 218 | did -b $dname 235 } if ($did(210).state == 1) { did -e $dname 219 | did -e $dname 236 | did -e $dname 245 } | else { did -b $dname 219 | did -b $dname 236 | did -b $dname 245 } } else { did -u $dname 201 | did -b $dname 202 | did -b $dname 203 | did -b $dname 204 | did -b $dname 205 | did -b $dname 206 | did -b $dname 207 | did -b $dname 208 | did -b $dname 209 | did -b $dname 210 | did -b $dname 211 | did -b $dname 212 | did -b $dname 213 | did -b $dname 214 | did -b $dname 215 | did -b $dname 216 | did -b $dname 217 | did -b $dname 218 | did -b $dname 219 | did -b $dname 229 | did -b $dname 230 | did -b $dname 231 | did -b $dname 232 | did -b $dname 233 | did -b $dname 234 | did -b $dname 235 | did -b $dname 236 | did -b $dname 245 | did -b $dname 247 | did -b $dname 248 | did -b $dname 249 | did -b $dname 250 | did -b $dname 251 | did -b $dname 252 | did -b $dname 253 | did -b $dname 254 | did -b $dname 255 } } on *:dialog:bofh_dialog:sclick:3:{ var %i $$?="Channel?" did -a $dname 2 %i write -l1 bofh.ini $read(bofh.ini, 1) %i writeini bofh.ini %i enabled 1 writeini bofh.ini %i channelenabled 1 writeini bofh.ini %i channelactiontext 1 writeini bofh.ini %i channelactiontextlines 72 writeini bofh.ini %i channelactiontextseconds 60 writeini bofh.ini %i channelctcp 1 writeini bofh.ini %i channelctcplines 5 writeini bofh.ini %i channelctcpseconds 60 writeini bofh.ini %i channeljoin 1 writeini bofh.ini %i channeljoinlines 72 writeini bofh.ini %i channeljoinseconds 60 writeini bofh.ini %i channelnotice 1 writeini bofh.ini %i channelnoticelines 5 writeini bofh.ini %i channelnoticeseconds 60 writeini bofh.ini %i channellock 1 writeini bofh.ini %i channellockseconds 120 writeini bofh.ini %i channelignoreop 1 writeini bofh.ini %i channelignorevoice 1 writeini bofh.ini %i userenabled 1 writeini bofh.ini %i useractiontext 1 writeini bofh.ini %i useractiontextlines 10 writeini bofh.ini %i useractiontextseconds 10 writeini bofh.ini %i useractioncaps 1 writeini bofh.ini %i usercaps 0 writeini bofh.ini %i usercapspercentage 80 writeini bofh.ini %i userctcp 1 writeini bofh.ini %i userctcplines 3 writeini bofh.ini %i userctcpseconds 60 writeini bofh.ini %i userdeop 0 writeini bofh.ini %i userdeoplines 3 writeini bofh.ini %i userdeopseconds 10 writeini bofh.ini %i userjoin 1 writeini bofh.ini %i userjoinlines 3 writeini bofh.ini %i userjoinseconds 60 writeini bofh.ini %i userkick 0 writeini bofh.ini %i userkicklines 3 writeini bofh.ini %i userkickseconds 10 writeini bofh.ini %i usernotice 1 writeini bofh.ini %i usernoticelines 3 writeini bofh.ini %i usernoticeseconds 60 writeini bofh.ini %i userrepeat 1 writeini bofh.ini %i userrepeatlines 3 writeini bofh.ini %i userrepeatseconds 60 writeini bofh.ini %i userban 1 writeini bofh.ini %i userbantype 3 writeini bofh.ini %i userbanseconds 1200 writeini bofh.ini %i userbanlimit 30 writeini bofh.ini %i userignoreop 1 writeini bofh.ini %i userignorevoice 1 writeini bofh.ini %i userignoreregular 0 writeini bofh.ini %i userbanlimitfulllock 1 writeini bofh.ini %i userkickbold 0 writeini bofh.ini %i userkickcolor 0 writeini bofh.ini %i userkickreverse 0 writeini bofh.ini %i userkickunderline 0 writeini bofh.ini %i userkickchannelads 0 writeini bofh.ini %i userkickurlads 0 } on *:dialog:bofh_dialog:sclick:4:{ if ($did(2).seltext != $null) { var %i = 1 while (%i <= $numtok($read(bofh.ini, 1), 32)) { if ($did(2).seltext == $gettok($read(bofh.ini, 1), %i, 32)) { write -l1 bofh.ini $deltok($read(bofh.ini, 1), %i, 32) } inc %i } remini bofh.ini $did(2).seltext did -d $dname 2 $did(2).sel } } ; channel on *:dialog:bofh_dialog:sclick:101:{ if ($did(2).seltext != $null) { if ($did(101).state == 1) { writeini bofh.ini $did(2).seltext channelenabled 1 did -e $dname 102 | did -e $dname 103 | did -e $dname 104 | did -e $dname 105 | did -e $dname 106 | did -e $dname 107 | did -e $dname 108 | did -e $dname 109 | did -e $dname 110 | did -e $dname 111 | did -e $dname 117 | did -e $dname 118 | did -e $dname 119 | did -e $dname 120 | did -e $dname 125 | did -e $dname 126 if ($did(102).state == 1) { did -e $dname 107 | did -e $dname 117 } | else { did -b $dname 107 | did -b $dname 117 } if ($did(103).state == 1) { did -e $dname 108 | did -e $dname 118 } | else { did -b $dname 108 | did -b $dname 118 } if ($did(104).state == 1) { did -e $dname 109 | did -e $dname 119 } | else { did -b $dname 109 | did -b $dname 119 } if ($did(105).state == 1) { did -e $dname 110 | did -e $dname 120 } | else { did -b $dname 110 | did -b $dname 120 } if ($did(106).state == 1) { did -e $dname 111 } | else { did -b $dname 111 } } else { writeini bofh.ini $did(2).seltext channelenabled 0 did -b $dname 102 | did -b $dname 103 | did -b $dname 104 | did -b $dname 105 | did -b $dname 106 | did -b $dname 107 | did -b $dname 108 | did -b $dname 109 | did -b $dname 110 | did -b $dname 111 | did -b $dname 117 | did -b $dname 118 | did -b $dname 119 | did -b $dname 120 | did -b $dname 125 | did -b $dname 126 } } } on *:dialog:bofh_dialog:sclick:102:{ if ($did(2).seltext != $null) { if ($did(102).state == 1) { writeini bofh.ini $did(2).seltext channelactiontext 1 | did -e $dname 107 | did -e $dname 117 } else { writeini bofh.ini $did(2).seltext channelactiontext 0 | did -b $dname 107 | did -b $dname 117 } } } on *:dialog:bofh_dialog:sclick:103:{ if ($did(2).seltext != $null) { if ($did(103).state == 1) { writeini bofh.ini $did(2).seltext channelctcp 1 | did -e $dname 108 | did -e $dname 118 } else { writeini bofh.ini $did(2).seltext channelctcp 0 | did -b $dname 108 | did -b $dname 118 } } } on *:dialog:bofh_dialog:sclick:104:{ if ($did(2).seltext != $null) { if ($did(104).state == 1) { writeini bofh.ini $did(2).seltext channeljoin 1 | did -e $dname 109 | did -e $dname 119 } else { writeini bofh.ini $did(2).seltext channeljoin 0 | did -b $dname 109 | did -b $dname 119 } } } on *:dialog:bofh_dialog:sclick:105:{ if ($did(2).seltext != $null) { if ($did(105).state == 1) { writeini bofh.ini $did(2).seltext channelnotice 1 | did -e $dname 110 | did -e $dname 120 } else { writeini bofh.ini $did(2).seltext channelnotice 0 | did -b $dname 110 | did -b $dname 120 } } } on *:dialog:bofh_dialog:sclick:106:{ if ($did(2).seltext != $null) { if ($did(106).state == 1) { writeini bofh.ini $did(2).seltext channellock 1 | did -e $dname 111 } else { writeini bofh.ini $did(2).seltext channellock 0 | did -b $dname 111 } } } on *:dialog:bofh_dialog:edit:107:{ if (($did(107).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext channelactiontextlines $did(107).text } } on *:dialog:bofh_dialog:edit:108:{ if (($did(108).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext channelctcplines $did(108).text } } on *:dialog:bofh_dialog:edit:109:{ if (($did(109).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext channeljoinlines $did(109).text } } on *:dialog:bofh_dialog:edit:110:{ if (($did(110).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext channelnoticelines $did(110).text } } on *:dialog:bofh_dialog:edit:111:{ if (($did(111).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext channellockseconds $did(111).text } } on *:dialog:bofh_dialog:edit:117:{ if (($did(117).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext channelactiontextseconds $did(117).text } } on *:dialog:bofh_dialog:edit:118:{ if (($did(118).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext channelctcpseconds $did(118).text } } on *:dialog:bofh_dialog:edit:119:{ if (($did(119).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext channeljoinseconds $did(119).text } } on *:dialog:bofh_dialog:edit:120:{ if (($did(120).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext channelnoticeseconds $did(120).text } } on *:dialog:bofh_dialog:sclick:125:{ if ($did(2).seltext != $null) { if ($did(125).state == 1) { writeini bofh.ini $did(2).seltext channelignoreop 1 } | else { writeini bofh.ini $did(2).seltext channelignoreop 0 } } } on *:dialog:bofh_dialog:sclick:126:{ if ($did(2).seltext != $null) { if ($did(126).state == 1) { writeini bofh.ini $did(2).seltext channelignorevoice 1 } | else { writeini bofh.ini $did(2).seltext channelignorevoice 0 } } } ; user on *:dialog:bofh_dialog:sclick:201:{ if ($did(2).seltext != $null) { if ($did(201).state == 1) { writeini bofh.ini $did(2).seltext userenabled 1 did -c $dname 201 | did -e $dname 202 | did -e $dname 203 | did -e $dname 204 | did -e $dname 205 | did -e $dname 206 | did -e $dname 207 | did -e $dname 208 | did -e $dname 209 | did -e $dname 210 | did -e $dname 247 | did -e $dname 248 | did -e $dname 249 | did -e $dname 250 | did -e $dname 251 | did -e $dname 252 | did -e $dname 253 | did -e $dname 254 | did -e $dname 255 if ($did(202).state == 1) { did -e $dname 211 | did -e $dname 229 } | else { did -b $dname 211 | did -b $dname 229 } if ($did(203).state == 1) { did -e $dname 212 } | else { did -b $dname 212 } if ($did(204).state == 1) { did -e $dname 213 | did -e $dname 230 } | else { did -b $dname 213 | did -b $dname 230 } if ($did(205).state == 1) { did -e $dname 214 | did -e $dname 231 } | else { did -b $dname 214 | did -b $dname 231 } if ($did(206).state == 1) { did -e $dname 215 | did -e $dname 232 } | else { did -b $dname 215 | did -b $dname 232 } if ($did(207).state == 1) { did -e $dname 216 | did -e $dname 233 } | else { did -b $dname 216 | did -b $dname 233 } if ($did(208).state == 1) { did -e $dname 217 | did -e $dname 234 } | else { did -b $dname 217 | did -b $dname 234 } if ($did(209).state == 1) { did -e $dname 218 | did -e $dname 235 } | else { did -b $dname 218 | did -b $dname 235 } if ($did(210).state == 1) { did -e $dname 219 | did -e $dname 236 | did -e $dname 245 } | else { did -b $dname 219 | did -b $dname 236 | did -b $dname 245 } } else { writeini bofh.ini $did(2).seltext userenabled 0 did -u $dname 201 | did -b $dname 202 | did -b $dname 203 | did -b $dname 204 | did -b $dname 205 | did -b $dname 206 | did -b $dname 207 | did -b $dname 208 | did -b $dname 209 | did -b $dname 210 | did -b $dname 211 | did -b $dname 212 | did -b $dname 213 | did -b $dname 214 | did -b $dname 215 | did -b $dname 216 | did -b $dname 217 | did -b $dname 218 | did -b $dname 219 | did -b $dname 229 | did -b $dname 230 | did -b $dname 231 | did -b $dname 232 | did -b $dname 233 | did -b $dname 234 | did -b $dname 235 | did -b $dname 236 | did -b $dname 245 | did -b $dname 247 | did -b $dname 248 | did -b $dname 249 | did -b $dname 250 | did -b $dname 251 | did -b $dname 252 | did -b $dname 253 | did -b $dname 254 | did -b $dname 255 } } } on *:dialog:bofh_dialog:sclick:202:{ if ($did(2).seltext != $null) { if ($did(202).state == 1) { writeini bofh.ini $did(2).seltext useractiontext 1 | did -e $dname 211 | did -e $dname 229 } else { writeini bofh.ini $did(2).seltext useractiontext 0 | did -b $dname 211 | did -b $dname 229 } } } on *:dialog:bofh_dialog:sclick:203:{ if ($did(2).seltext != $null) { if ($did(203).state == 1) { writeini bofh.ini $did(2).seltext usercaps 1 | did -e $dname 212 } else { writeini bofh.ini $did(2).seltext usercaps 0 | did -b $dname 212 } } } on *:dialog:bofh_dialog:sclick:204:{ if ($did(2).seltext != $null) { if ($did(204).state == 1) { writeini bofh.ini $did(2).seltext userctcp 1 | did -e $dname 213 | did -e $dname 230 } else { writeini bofh.ini $did(2).seltext userctcp 0 | did -b $dname 213 | did -b $dname 230 } } } on *:dialog:bofh_dialog:sclick:205:{ if ($did(2).seltext != $null) { if ($did(205).state == 1) { writeini bofh.ini $did(2).seltext userdeop 1 | did -e $dname 214 | did -e $dname 231 } else { writeini bofh.ini $did(2).seltext userdeop 0 | did -b $dname 214 | did -b $dname 231 } } } on *:dialog:bofh_dialog:sclick:206:{ if ($did(2).seltext != $null) { if ($did(206).state == 1) { writeini bofh.ini $did(2).seltext userjoin 1 | did -e $dname 215 | did -e $dname 232 } else { writeini bofh.ini $did(2).seltext userjoin 0 | did -b $dname 215 | did -b $dname 232 } } } on *:dialog:bofh_dialog:sclick:207:{ if ($did(2).seltext != $null) { if ($did(207).state == 1) { writeini bofh.ini $did(2).seltext userkick 1 | did -e $dname 216 | did -e $dname 233 } else { writeini bofh.ini $did(2).seltext userkick 0 | did -b $dname 216 | did -b $dname 233 } } } on *:dialog:bofh_dialog:sclick:208:{ if ($did(2).seltext != $null) { if ($did(208).state == 1) { writeini bofh.ini $did(2).seltext usernotice 1 | did -e $dname 217 | did -e $dname 234 } else { writeini bofh.ini $did(2).seltext usernotice 0 | did -b $dname 217 | did -b $dname 234 } } } on *:dialog:bofh_dialog:sclick:209:{ if ($did(2).seltext != $null) { if ($did(209).state == 1) { writeini bofh.ini $did(2).seltext userrepeat 1 | did -e $dname 218 | did -e $dname 235 } else { writeini bofh.ini $did(2).seltext userrepeat 0 | did -b $dname 218 | did -b $dname 235 } } } on *:dialog:bofh_dialog:sclick:210:{ if ($did(2).seltext != $null) { if ($did(210).state == 1) { writeini bofh.ini $did(2).seltext userban 1 | did -e $dname 219 | did -e $dname 236 | did -e $dname 245 } else { writeini bofh.ini $did(2).seltext userban 0 | did -b $dname 219 | did -b $dname 236 | did -b $dname 245 } } } on *:dialog:bofh_dialog:edit:211:{ if (($did(211).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext useractiontextlines $did(211).text } } on *:dialog:bofh_dialog:edit:212:{ if (($did(212).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext usercapspercentage $did(212).text } } on *:dialog:bofh_dialog:edit:213:{ if (($did(213).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userctcplines $did(213).text } } on *:dialog:bofh_dialog:edit:214:{ if (($did(214).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userdeoplines $did(214).text } } on *:dialog:bofh_dialog:edit:215:{ if (($did(215).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userjoinlines $did(215).text } } on *:dialog:bofh_dialog:edit:216:{ if (($did(216).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userkicklines $did(216).text } } on *:dialog:bofh_dialog:edit:217:{ if (($did(217).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext usernoticelines $did(217).text } } on *:dialog:bofh_dialog:edit:218:{ if (($did(218).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userrepeatlines $did(218).text } } on *:dialog:bofh_dialog:sclick:219:{ if ($did(2).seltext != $null) { writeini bofh.ini $did(2).seltext userbantype $calc($did(219).sel - 1) } } on *:dialog:bofh_dialog:edit:229:{ if (($did(229).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext useractiontextseconds $did(229).text } } on *:dialog:bofh_dialog:edit:230:{ if (($did(230).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userctcpseconds $did(230).text } } on *:dialog:bofh_dialog:edit:231:{ if (($did(231).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userdeopseconds $did(231).text } } on *:dialog:bofh_dialog:edit:232:{ if (($did(232).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userjoinseconds $did(232).text } } on *:dialog:bofh_dialog:edit:233:{ if (($did(233).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userkickseconds $did(233).text } } on *:dialog:bofh_dialog:edit:234:{ if (($did(234).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext usernoticeseconds $did(234).text } } on *:dialog:bofh_dialog:edit:235:{ if (($did(235).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userrepeatseconds $did(235).text } } on *:dialog:bofh_dialog:edit:236:{ if (($did(236).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userbanseconds $did(236).text } } on *:dialog:bofh_dialog:edit:245:{ if (($did(245).text != $null) && ($did(2).seltext != $null)) { writeini bofh.ini $did(2).seltext userbanlimit $did(245).text } } on *:dialog:bofh_dialog:sclick:247:{ if ($did(2).seltext != $null) { if ($did(247).state == 1) { writeini bofh.ini $did(2).seltext userignoreop 1 } | else { writeini bofh.ini $did(2).seltext userignoreop 0 } } } on *:dialog:bofh_dialog:sclick:248:{ if ($did(2).seltext != $null) { if ($did(248).state == 1) { writeini bofh.ini $did(2).seltext userignorevoice 1 } | else { writeini bofh.ini $did(2).seltext userignorevoice 0 } } } on *:dialog:bofh_dialog:sclick:249:{ if ($did(2).seltext != $null) { if ($did(249).state == 1) { writeini bofh.ini $did(2).seltext userbanlimitfulllock 1 } | else { writeini bofh.ini $did(2).seltext userbanlimitfulllock 0 } } } on *:dialog:bofh_dialog:sclick:250:{ if ($did(2).seltext != $null) { if ($did(250).state == 1) { writeini bofh.ini $did(2).seltext userkickbold 1 } | else { writeini bofh.ini $did(2).seltext userkickbold 0 } } } on *:dialog:bofh_dialog:sclick:251:{ if ($did(2).seltext != $null) { if ($did(251).state == 1) { writeini bofh.ini $did(2).seltext userkickcolor 1 } | else { writeini bofh.ini $did(2).seltext userkickcolor 0 } } } on *:dialog:bofh_dialog:sclick:252:{ if ($did(2).seltext != $null) { if ($did(252).state == 1) { writeini bofh.ini $did(2).seltext userkickreverse 1 } | else { writeini bofh.ini $did(2).seltext userkickreverse 0 } } } on *:dialog:bofh_dialog:sclick:253:{ if ($did(2).seltext != $null) { if ($did(253).state == 1) { writeini bofh.ini $did(2).seltext userkickunderline 1 } | else { writeini bofh.ini $did(2).seltext userkickunderline 0 } } } on *:dialog:bofh_dialog:sclick:254:{ if ($did(2).seltext != $null) { if ($did(254).state == 1) { writeini bofh.ini $did(2).seltext userkickchannelads 1 } | else { writeini bofh.ini $did(2).seltext userkickchannelads 0 } } } on *:dialog:bofh_dialog:sclick:255:{ if ($did(2).seltext != $null) { if ($did(255).state == 1) { writeini bofh.ini $did(2).seltext userkickurlads 1 } | else { writeini bofh.ini $did(2).seltext userkickurlads 0 } } } on *:load:{ if ($version < 6) { echo -a You're using mIRC version $version which is incompatible with this script. echo -a This script requires that you use mIRC version 6.0 or higher and will now echo -a automatically unload. Visit http://www.mirc.com for the latest mIRC. unload -rs $script } else { echo -a Loaded $script $+ . echo -a Type "/bofh" to configure. } } on *:unload:{ echo -a Unloaded $script $+ . echo -a * Removing temporary variables used... unset %bofh* echo -a * ...done! } ctcp @*:*:#:{ if ($readini(bofh.ini, $chan, enabled) == 1) { if ((($nick isreg $chan) && ($readini(bofh.ini, $chan, userignoreregular) == 0)) || (($nick isvoice $chan) && ($readini(bofh.ini, $chan, userignorevoice) == 0)) || (($nick isop $chan) && ($readini(bofh.ini, $chan, userignoreop) == 0))) { if (($readini(bofh.ini, $chan, channelenabled) == 1) && ($readini(bofh.ini, $chan, channelctcp) == 1) && ($readini(bofh.ini, $chan, channellock) == 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)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { mode $chan +m | .timerbofh $+ $chan $+ m 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -m | inc -z %bofh_flood $+ $cid 5 | unset %bofh_channelctcp $+ $chan } } if (($readini(bofh.ini, $chan, userenabled) == 1) && ($readini(bofh.ini, $chan, userctcp) == 1)) { if (%bofh_userctcp [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, userctcpseconds) ] %bofh_userctcp $+ $chan $+ $address } | else { inc %bofh_userctcp $+ $chan $+ $address } if ((%bofh_userctcp [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, userctcplines)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick $readini(bofh.ini, $chan, userctcplines) ctcps in $readini(bofh.ini, $chan, userctcpseconds) seconds | inc -z %bofh_flood $+ $cid 5 | unset %bofh_userctcp $+ $chan $+ $address } } } } } on @*:action:*:#:{ if ($readini(bofh.ini, $chan, enabled) == 1) { if ((($nick isreg $chan) && ($readini(bofh.ini, $chan, userignoreregular) == 0)) || (($nick isvoice $chan) && ($readini(bofh.ini, $chan, userignorevoice) == 0)) || (($nick isop $chan) && ($readini(bofh.ini, $chan, userignoreop) == 0))) { if (($readini(bofh.ini, $chan, channelenabled) == 1) && ($readini(bofh.ini, $chan, channelactiontext) == 1) && ($readini(bofh.ini, $chan, channellock) == 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)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { mode $chan +m | .timerbofh $+ $chan $+ m 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -m | inc -z %bofh_flood $+ $cid 5 | unset %bofh_channelactiontext $+ $chan } } if ($readini(bofh.ini, $chan, userenabled) == 1) { if ($readini(bofh.ini, $chan, useractiontext) == 1) { if (%bofh_useractiontext [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, useractiontextseconds) ] %bofh_useractiontext $+ $chan $+ $address } | else { inc %bofh_useractiontext $+ $chan $+ $address } if ((%bofh_useractiontext [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, useractiontextlines)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick $readini(bofh.ini, $chan, useractiontextlines) lines in $readini(bofh.ini, $chan, useractiontextseconds) seconds | inc -z %bofh_flood $+ $cid 5 | unset %bofh_useractiontext $+ $chan $+ $address } } if (($readini(bofh.ini, $chan, usercaps) == 1) && ($bofh_caps($1-) >= $readini(bofh.ini, $chan, usercapspercentage)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick [ $readini(bofh.ini, $chan, usercapspercentage) ] $+ % caps } if ((($readini(bofh.ini, $chan, userkickbold) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, userkickcolor) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, userkickreverse) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, userkickunderline) == 1) && ( isin $1-)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick bold/color/reverse/underline | inc -z %bofh_flood $+ $cid 5 } if (((($readini(bofh.ini, $chan, userkickchannelads) == 1) && ($chr(35) isin $1-)) || (($readini(bofh.ini, $chan, userkickurlads) == 1) && ((http isin $1-) || (www isin $1-)))) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick channel/url advertisement | inc -z %bofh_flood $+ $cid 5 } if ($readini(bofh.ini, $chan, userrepeat) == 1) { if (%bofh_userrepeat [ $+ [ $chan ] $+ [ $address ] ] == $1-) { if (%bofh_userrepeats [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, userrepeatseconds) ] %bofh_userrepeats $+ $chan $+ $address } | else { inc %bofh_userrepeats $+ $chan $+ $address } } if ((%bofh_userrepeats [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, userrepeatlines)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick $readini(bofh.ini, $chan, userrepeatlines) repeats in $readini(bofh.ini, $chan, userrepeatseconds) seconds | inc -z %bofh_flood $+ $cid 5 | unset %bofh_userrepeats $+ $chan $+ $address } set -u $+ [ $readini(bofh.ini, $chan, userrepeatseconds) ] %bofh_userrepeat $+ $chan $+ $address $1- } } } } } on @*:ban:#:{ if (($readini(bofh.ini, $chan, enabled) == 1) && ($readini(bofh.ini, $chan, userbanlimitfulllock) == 1) && ($ibl($chan,0) >= $readini(bofh.ini, $chan, userbanlimit)) && (i !isin $gettok($chan($chan).mode,1,32)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { mode $chan +i | inc -z %bofh_flood $+ $cid 5 | set %bofh_userbanlimitfull $+ $chan 1 } } on *:connect:{ unset %bofh_* } on !@*:deop:#:{ if (($readini(bofh.ini, $chan, enabled) == 1) && ($readini(bofh.ini, $chan, userdeop) == 1)) { if (%bofh_userdeop [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, userdeopseconds) ] %bofh_userdeop $+ $chan $+ $address } | else { inc %bofh_userdeop $+ $chan $+ $address } if ((%bofh_userdeop [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, userdeoplines)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick $readini(bofh.ini, $chan, userdeoplines) deops in $readini(bofh.ini, $chan, userdeopseconds) seconds | inc -z %bofh_flood $+ $cid 5 | unset %bofh_userdeop $+ $chan $+ $address } } } on !@*:join:#:{ if ($readini(bofh.ini, $chan, enabled) == 1) { if (($readini(bofh.ini, $chan, channelenabled) == 1) && ($readini(bofh.ini, $chan, channeljoin) == 1) && ($readini(bofh.ini, $chan, channellock) == 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)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { mode $chan +i | .timerbofh $+ $chan $+ i 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -i | inc -z %bofh_flood $+ $cid 5 | unset %bofh_channeljoin $+ $chan } } if (($readini(bofh.ini, $chan, userenabled) == 1) && ($readini(bofh.ini, $chan, userjoin) == 1)) { if (%bofh_userjoin [ $+ [ $chan ] $+ [ $site ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, userjoinseconds) ] %bofh_userjoin $+ $chan $+ $site } | else { inc %bofh_userjoin $+ $chan $+ $site } if ((%bofh_userjoin [ $+ [ $chan ] $+ [ $site ] ] >= $readini(bofh.ini, $chan, userjoinlines)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $site } | inc -z %bofh_flood $+ $cid 5 | unset %bofh_userjoin $+ $chan $+ $site } } } } on !@*:kick:#:{ if (($readini(bofh.ini, $chan, enabled) == 1) && ($readini(bofh.ini, $chan, userenabled) == 1) && ($readini(bofh.ini, $chan, userkick) == 1)) { if (%bofh_userkick [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, userkickseconds) ] %bofh_userkick $+ $chan $+ $address } | else { inc %bofh_userkick $+ $chan $+ $address } if ((%bofh_userkick [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, userkicklines)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick $readini(bofh.ini, $chan, userkicklines) kicks in $readini(bofh.ini, $chan, userkickseconds) seconds | inc -z %bofh_flood $+ $cid 5 | unset %bofh_userkick $+ $chan $+ $address } } } on @*:notice:*:#:{ if ($readini(bofh.ini, $chan, enabled) == 1) { if ((($nick isreg $chan) && ($readini(bofh.ini, $chan, userignoreregular) == 0)) || (($nick isvoice $chan) && ($readini(bofh.ini, $chan, userignorevoice) == 0)) || (($nick isop $chan) && ($readini(bofh.ini, $chan, userignoreop) == 0))) { if (($readini(bofh.ini, $chan, channelenabled) == 1) && ($readini(bofh.ini, $chan, channelnotice) == 1) && ($readini(bofh.ini, $chan, channellock) == 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)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { mode $chan +m | .timerbofh $+ $chan $+ m 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -m | inc -z %bofh_flood $+ $cid 5 | unset %bofh_channelnotice $+ $chan } } if (($readini(bofh.ini, $chan, userenabled) == 1) && ($readini(bofh.ini, $chan, usernotice) == 1)) { if (%bofh_usernotice [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, usernoticeseconds) ] %bofh_usernotice $+ $chan $+ $address } | else { inc %bofh_usernotice $+ $chan $+ $address } if ((%bofh_usernotice [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, usernoticelines)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick $readini(bofh.ini, $chan, usernoticelines) notices in $readini(bofh.ini, $chan, usernoticeseconds) seconds | inc -z %bofh_flood $+ $cid 5 | unset %bofh_usernotice $+ $chan $+ $address } } } } } on @*:text:*:#:{ if ($readini(bofh.ini, $chan, enabled) == 1) { if ((($nick isreg $chan) && ($readini(bofh.ini, $chan, userignoreregular) == 0)) || (($nick isvoice $chan) && ($readini(bofh.ini, $chan, userignorevoice) == 0)) || (($nick isop $chan) && ($readini(bofh.ini, $chan, userignoreop) == 0))) { if (($readini(bofh.ini, $chan, channelenabled) == 1) && ($readini(bofh.ini, $chan, channelactiontext) == 1) && ($readini(bofh.ini, $chan, channellock) == 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)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { mode $chan +m | .timerbofh $+ $chan $+ m 1 [ $readini(bofh.ini, $chan, channellockseconds) ] mode $chan -m | inc -z %bofh_flood $+ $cid 5 | unset %bofh_channelactiontext $+ $chan } } if ($readini(bofh.ini, $chan, userenabled) == 1) { if ($readini(bofh.ini, $chan, useractiontext) == 1) { if (%bofh_useractiontext [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, useractiontextseconds) ] %bofh_useractiontext $+ $chan $+ $address } | else { inc %bofh_useractiontext $+ $chan $+ $address } if ((%bofh_useractiontext [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, useractiontextlines)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick $readini(bofh.ini, $chan, useractiontextlines) lines in $readini(bofh.ini, $chan, useractiontextseconds) seconds | inc -z %bofh_flood $+ $cid 5 | unset %bofh_useractiontext $+ $chan $+ $address } } if (($readini(bofh.ini, $chan, usercaps) == 1) && ($bofh_caps($1-) >= $readini(bofh.ini, $chan, usercapspercentage)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick [ $readini(bofh.ini, $chan, usercapspercentage) ] $+ % caps | inc -z %bofh_flood $+ $cid 5 } if ((($readini(bofh.ini, $chan, userkickbold) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, userkickcolor) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, userkickreverse) == 1) && ( isin $1-)) || (($readini(bofh.ini, $chan, userkickunderline) == 1) && ( isin $1-)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick bold/color/reverse/underline | inc -z %bofh_flood $+ $cid 5 } if (((($readini(bofh.ini, $chan, userkickchannelads) == 1) && ($chr(35) isin $1-)) || (($readini(bofh.ini, $chan, userkickurlads) == 1) && ((http isin $1-) || (www isin $1-)))) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick channel/url advertisement | inc -z %bofh_flood $+ $cid 5 } if ($readini(bofh.ini, $chan, userrepeat) == 1) { if (%bofh_userrepeat [ $+ [ $chan ] $+ [ $address ] ] == $1-) { if (%bofh_userrepeats [ $+ [ $chan ] $+ [ $address ] ] == $null) { inc -u $+ [ $readini(bofh.ini, $chan, userrepeatseconds) ] %bofh_userrepeats $+ $chan $+ $address } | else { inc %bofh_userrepeats $+ $chan $+ $address } } if ((%bofh_userrepeats [ $+ [ $chan ] $+ [ $address ] ] >= $readini(bofh.ini, $chan, userrepeatlines)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { if (($readini(bofh.ini, $chan, userban) == 1) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit))) { ban -u $+ [ $readini(bofh.ini, $chan, userbanseconds) ] $chan $nick $readini(bofh.ini, $chan, userbantype) } | kick $chan $nick $readini(bofh.ini, $chan, userrepeatlines) repeats in $readini(bofh.ini, $chan, userrepeatseconds) seconds | inc -z %bofh_flood $+ $cid 5 | unset %bofh_userrepeats $+ $chan $+ $address } set -u $+ [ $readini(bofh.ini, $chan, userrepeatseconds) ] %bofh_userrepeat $+ $chan $+ $address $1- } } } } } on @*:unban:#:{ if (($readini(bofh.ini, $chan, enabled) == 1) && (%bofh_userbanlimitfull [ $+ [ $chan ] ] != $null) && ($ibl($chan,0) < $readini(bofh.ini, $chan, userbanlimit)) && ((%bofh_flood [ $+ [ $cid ] ] == $null) || (%bofh_flood [ $+ [ $cid ] ] < 60))) { inc -z %bofh_flood $+ $cid 5 | unset %bofh_userbanlimitfull $+ $chan | if (i isin $gettok($chan($chan).mode,1,32)) { mode $chan -i } } }