mIRCStorm V2.0.0 — File Browser
mIRCStormV2.0.0v2.0.0 / mIRCStormV2.0.0v2.0.0 / mIRCStormV2.0.0 / Scripts / protections.mrc
protections.mrc — 7.77 KB — Download this file
;mIRCStorm V2.0.0 - Protections.mrc
;
;Website: http://www.mIRCStorm.co.uk
;Author: Evil_Dave (Evil_Dave@mIRCStorm.co.uk)
;
;Note, Users Known To The Bot Are No Long Punished Foor
;Doind Bad Things, Such As Channel Flood.
;========================================================
;===================Protections.mrc======================
;========================================================
on *:START:{
if (($readini database\mircstorm.ini DefualtModes FloodLines == $null) || ($readini database\mircstorm.ini DefualtModes FloodLines == $null)) {
writeini database\mircstorm.ini DefualtModes FloodLines 8 | writeini database\mircstorm.ini DefualtModes FloodSecs 14
}
if (($readini database\mircstorm.ini DefualtModes FloodNoticeLines == $null) || ($readini database\mircstorm.ini DefualtModes FloodNoticeSecs == $null)) {
writeini database\mircstorm.ini DefualtModes FloodNoticeLines 5 | writeini database\mircstorm.ini DefualtModes FloodNoticeSecs 9
}
}
========================================================
==================Joining User Checks===================
========================================================
on *:JOIN:#:{
var %bot.protections.onjoin.mask [ $address($nick,3) ]
if ( $readini Database\mircstorm.user BannedMasks $+ $chan %bot.protections.onjoin.mask == banned ) { /ban $chan %bot.protections.onjoin.mask | /kick $chan $nick You Have Been Banned! }
}
========================================================
===================Flood Protection=====================
========================================================
on *:text:*:#:{
if (!%bot.PunishOps. [ $+ [ $chan ] ]) {
if (($readini database\mircStorm.chan $chan $nick != $null) || ($readini database\mircStorm.chan global $nick != $null)) { halt }
}
inc -u [ $+ [ %bot.protect.flood.secs. [ $+ [ $chan ] ] ] ] %bot.flood.lines. [ $+ [ $chan $+ . [ $+ [ $nick ] ] ] ] ] 1
if (%bot.flood.lines. [ $+ [ $chan $+ . [ $+ [ $nick ] ] ] ] >= %bot.protect.flood.lines. [ $+ [ $chan ] ] ) {
if (%bot.flood.warnings. [ $+ [ $chan $+ . [ $+ [ $nick ] ] ] ] >= 1) {
unset %bot.flood.lines. [ $+ [ $chan $+ . [ $+ [ $nick ] ] ] ]
.kick $chan $nick $readini Personality\ $+ %bot.Personality.file FloodKick MSGKickForFlooding
halt
}
else {
unset %bot.flood.lines. [ $+ [ $chan $+ . [ $+ [ $nick ] ] ] ]
.msg $chan $readini Personality\ $+ %bot.Personality.file FloodKick MSGWarningForFlooding
inc %bot.flood.warnings. [ $+ [ $chan $+ . [ $+ [ $nick ] ] ] ] 1
}
}
if (%bot.swearkick. [ $+ [ $chan ] ]) {
if ($exists(database\swearkick. [ $+ [ $chan ] ])) {
set %bot.swearkick.lines $lines(database\swearkick. [ $+ [ $chan ] ])
set %bot.swearkick.temp 0
while ( %bot.swearkick.temp <= %bot.swearkick.lines) {
if ( $read -l [ $+ [ %bot.swearkick.temp ] ] database\swearkick. [ $+ [ $chan ] ] isin $1- ) { kick $chan $nick $readini Personality\ $+ %bot.Personality.file SwearKick BannedWordKick | halt }
inc %bot.swearkick.temp
}
}
}
if (%bot.nocolour. [ $+ [ $chan ] ]) {
if ( isin $1-) {
.msg $chan that person is using colour!!!
kick $chan $nick $readini Personality\ $+ %bot.Personality.file NoColour UsingColourKick | halt
}
}
}
on *:action:*:#:{
if (($readini database\mircStorm.chan $chan $nick != $null) || ($readini database\mircStorm.chan global $nick != $null)) { halt }
inc -u [ $+ [ %bot.protect.flood.secs. [ $+ [ $chan ] ] ] ] %bot.flood.lines. [ $+ [ $nick ] ] 1
if (%bot.flood.lines. [ $+ [ $nick ] ] >= %bot.protect.flood.lines. [ $+ [ $chan ] ] ) {
if (%bot.flood.warnings. [ $+ [ $nick ] ] >= 1) {
unset %bot.flood.lines. [ $+ [ $nick ] ]
.kick $chan $nick $readini Personality\ $+ %bot.Personality.file FloodKick MSGKickForFlooding
halt
}
else {
unset %bot.flood.lines. [ $+ [ $nick ] ]
.msg $chan $readini Personality\ $+ %bot.Personality.file FloodKick MSGWarningForFlooding
inc %bot.flood.warnings. [ $+ [ $nick ] ] 1
}
}
}
on ^*:notice:*:*:{
inc -u [ $+ [ %bot.protect.notice.secs ] ] %bot.notice.lines. [ $+ [ $nick ] ] 1
if (%bot.notice.lines. [ $+ [ $nick ] ] >= %bot.protect.notice.lines) {
if (%bot.notice.warnings. [ $+ [ $nick ] ] > 1) {
unset %bot.notice.lines. [ $+ [ $nick ] ]
/msg $nick $readini Personality\ $+ %bot.Personality.file FloodNotice DontNoticeFloodMe1
/msg $nick $readini Personality\ $+ %bot.Personality.file FloodNotice DontNoticeFloodMe2 | /msg %bot.home $readini Personality\ $+ %bot.Personality.file FloodNotice MSGHomeOnNoticeFlood
/ignore -u600 $nick
halt
}
else {
unset %bot.notice.lines. [ $+ [ $nick ] ]
/msg $nick $readini Personality\ $+ %bot.Personality.file FloodNotice MSGWarningForFlooding
inc %bot.notice.warnings. [ $+ [ $nick ] ] 1
}
}
}
on ^*:open:?: {
if ($query(0) > 5) {
ignore -pu45 *
msg %bot.home Protection Enabled: Query window flood detected, ignoring messages for 45 seconds.
close -m
haltdef
}
}
;Note: The above query protection was made by Evolution from botshed.com
on *:BAN:#:{
if ( $nick == $me ) { /writeini database\mircstorm.user BannedMasks $+ $chan $banmask Banned | halt }
if ( ($readini database\mircStorm.chan $chan $nick >= 6) || ($readini database\mircStorm.chan global $nick != $null) ) {
.writeini database\mircstorm.user BannedMasks $+ $chan $banmask Banned
.notice $nick $readini Personality\ $+ %bot.Personality.file Ban ManualBanAllowed
halt
}
set %bot.dcc.command Ban ( $+ $banmask $+ ) | set %bot.dcc.command.nick $nick | set %bot.dcc.command.chan $chan | /dcctalk
}
on *:UNBAN:#:{
if ( $nick == $me ) { /remini database\mircstorm.user BannedMasks $+ $chan $banmask | halt }
if ( $readini database\mircstorm.user BannedMasks $+ $chan $banmask == Banned ) {
if ( ($readini database\mircStorm.chan $chan $nick >= 6) || ($readini database\mircStorm.chan global $nick != $null) ) {
.notice $nick $readini Personality\ $+ %bot.Personality.file Ban ManualUnbanAllowed
.remini database\mircstorm.user BannedMasks $+ $chan $banmask
halt
}
/ban $chan $banmask 3 | .notice $nick That Mask ( $+ $banmask $+ ) Is Listed With Me. Please Login And Unban Using The Unban Command. See Help For Details. | halt
}
set %bot.dcc.command UnBan ( $+ $banmask $+ ) | set %bot.dcc.command.nick $nick | set %bot.dcc.command.chan $chan | /dcctalk
}
on *:TOPIC:#:{
if ( %bot.topiclock.first == first ) { unset %bot.topiclock.first | halt }
if ( $1- == %bot.topic.lock. [ $+ [ $chan ] ] ) { halt }
if ( %bot.topic.lock. [ $+ [ $chan ] ] != $null ) {
/msg $chan The Topic Has Been Locked. It Must Be Unlocked To Be Changed. Usage: $me UnlockTopic
/topic $chan %bot.topic.lock. [ $+ [ $chan ] ]
}
}
on *:MODE:#:{
if ( %bot.mode.lock. [ $+ [ $chan ] ] == $null ) { set %bot.mode.lock. [ $+ [ $chan ] ] off | halt }
if ( %bot.mode.lock. [ $+ [ $chan ] ] == on ) {
if ( $nick == $me ) { halt }
if ( $left($1-,1) == + ) { set %bot.mode.1 + | set %bot.mode.2 - }
if ( $left($1-,1) == - ) { set %bot.mode.1 - | set %bot.mode.2 + }
set %bot.mode.mode $replace($1-,%bot.mode.1,%bot.mode.2)
/mode $chan %bot.mode.mode
/msg $chan ModeLock Is Enabled For $chan $+ . To Unlock: $me ModeLock Off
}
unset %bot.dcc.command | unset %bot.dcc.command.nick | unset %bot.dcc.command.chan
}
on *:KICK:#:set %bot.dcc.command User Kicked ( $+ $knick $+ ) For Reason ( $+ $1- $+ ) | set %bot.dcc.command.nick $nick | set %bot.dcc.command.chan $chan | /dcctalk
on *:RAWMODE:#:{
set %bot.dcc.command Mode Change ( $+ $nick $1- $+ ) | unset %bot.dcc.command.nick $nick | set %bot.dcc.command.chan $chan | /dcctalk
}