So what this one does is warns the user not to use caps and if they keep useing them it will kick them if they do it again, and if they still do it they will get banned..Load it in a new remote of a bot and set Ur self as bot owner by typing /owner Urnickhere
alias owner { auser owner $address($1,2) }
on owner:text:!caps*:#:{
if (!$3) { msg $chan commands are !caps on #channel / !caps off #channel / !caps set number / !crooms }
elseif ($2 == on) && ($istok(%capschan,$3,44)) {
msg $chan My Caps Protection Is Already On For $3
}
elseif ($2 == on) {
set %capschan $addtok(%capschan,$3,44)
msg $chan My Caps Protection Is Now ON In $3
}
elseif ($2 == off) && (!$istok(%capschan,$3,44)) {
msg $chan My Caps Protection Is Already OFF For $3
}
elseif ($2 == off) {
set %capschan $remtok(%capschan,$3,1,44)
msg $chan My Caps Protection Is Now OFF In Room $3
}
elseif ($2 == set) {
set %caps $3
msg $chan I Will Now Warn/Kick/Ban For %caps $+ % Caps.
}
}
on owner:text:!crooms:#:{
if (!%capschan) { msg $chan My Caps Protection Is NOT ON In Any Room's }
else { msg $chan My Caps Protection Is On In Room's %capschan }
}
on *:load: {
echo 12 -a You Have Just Loaded Napa182's Caps Control.
echo 12 -a A Script0rs Inc. Production
echo -a 14,1(14,1¯15,1¯0,1¯0,1º $+($chr(171),$chr(164),$chr(88),$chr(167),$chr(199),$chr(174),$chr(238),$chr(254),$chr(116),$chr(48),$chr(174),$chr(167),$chr(88),$chr(164),$chr(187)) º0,1¯15,1¯14,1¯) $+ $chr(153)
}
on *:text:*:%capschan: {
if ($nick(#,$nick,vr)) && ($len($1-) > 5) {
var %percent $calc($regex($1-,/[A-Z]/g)/$len($1-)*100)
if (%percent > %caps) {
inc $+(%,caps,.,$nick,.,$chan)
if ($($+(%,caps,.,$nick,.,$chan),2) == 1) { msg $chan $nick Please Dont Use Cap's Here.. $round(%percent,0) $+ % Of Ur Message Was In Caps! }
if ($($+(%,caps,.,$nick,.,$chan),2) == 2) { kick $chan $nick Please Turn Caps Lock Off Or Next It's A Ban.. $round(%percent,0) $+ % Of Ur Message Was In Caps! }
if ($($+(%,caps,.,$nick,.,$chan),2) == 3) { ban -ku600 # $nick 2 you were warned Not To Use Caps Here. $round(%percent,0) $+ % Of Ur Message Was In Caps | unset $+(%,caps,.,$nick,.,$chan) }
}
}
}
is there a way to make it so that when a an op types !caps on/off
you don't have to enter the channel name. it sets it off/on in the channel where !caps on/off was typed.Keon191, here you go:
on @*:text:*:#:nocaps $1-
on @*:action:*:#:nocaps $1-
on @*:notice:*:#:nocaps $1-
alias -l nocaps {
if (($nick isop #) && ($regex($1-,/^!caps (on|off|set\s(\d+))/iS))) {
goto $replace($regml(1),on,on,off,off,set,set) | :on
if !$istok(%capschan,#,32) {
set %capschan $addtok(%capschan,#,32)
.msg # * My Caps Protection is now ON in: # | halt
}
else { .msg # * Caps Protection is already ON for the channel: # | halt }
:off | if $istok(%capschan,#,32) {
set %capschan $remtok(%capschan,#,1,32)
.msg # * My Caps Protection is now OFF in: # | halt
}
else { .msg # * Caps Protection is either removed or already OFF for the channel: # | halt }
:set | set %caps $regml(2) | .msg # * I Will Now Warn/Kick/Ban for %caps $+ % of Caps. | halt
}
else {
if $findtok(%capschan,#,1,32) {
var %percent $calc($regex($1-,/[A-Z]/g)/$len($1-)*100)
if (($nick(#,$nick,vr)) && ($len($1-) > 5) && (%percent > %caps)) {
inc $+(%,caps,.,$nick,.,#) | if $($+(%,caps,.,$nick,.,#),2) >= 3 {
ban -ku600 # $nick 2 You were warned not to use caps. $&
$round(%percent,0) $+ % of your message was in caps.
unset $+(%,caps,.,$nick,.,#)
}
elseif $($+(%,caps,.,$nick,.,#),2) = 2 {
kick # $nick Please turn caps lock off or next offense is going to be a ban. $&
$round(%percent,0) $+ % of your message was in caps!
}
else {
msg # $nick $+ , please DO NOT use caps. $round(%percent,0) $+ % of your message was in caps!
}
}
}
}
}
Opps, my bad. Actually my modification for napa182's script does not have those commands anymore.
All the commands you need currently are:
!caps on #chan <- This is to add the channels you want the script to work in. You can add as many as you want.
!caps off #chan <- This is to remove the script from working in the channels that you've set initially.
!caps set NumberHere <- This is to set the caps percentage allowance.Only ops can initiate these commands, and they won't be affected by the script. This script will only watch for voiced and regular users.
is there any way for this to warn the user 1 time and then just kick him every time he uses caps aftermichealkenny, here you go:
on @*:text:*:#:nocaps $1-
on @*:action:*:#:nocaps $1-
on @*:notice:*:#:nocaps $1-
alias -l nocaps {
if (($nick isop #) && ($regex($1-,/^!caps (on|off|set) (\43\S+|\d+)/iS))) {
goto $replace($regml(1),on,on,off,off,set,set) | :on
if !$istok(%capschan,$regml(2),32) {
set %capschan $addtok(%capschan,$regml(2),32)
.msg # * My Caps Protection is now ON in: $regml(2) | halt
}
else { .msg # * Caps Protection is already ON for the channel: $regml(2) | halt }
:off | if $istok(%capschan,$regml(2),32) {
set %capschan $remtok(%capschan,$regml(2),1,32)
.msg # * My Caps Protection is now OFF in: $regml(2) | halt
}
else { .msg # * Caps Protection is either removed or already OFF for the channel: $regml(2) | halt }
:set | set %caps $regml(2) | .msg # * I Will Now Warn/Kick/Ban for %caps $+ % of Caps. | halt
}
else {
if $findtok(%capschan,#,1,32) {
var %percent $calc($regex($1-,/[A-Z]/g)/$len($1-)*100)
if (($nick(#,$nick,vr)) && ($len($1-) > 5) && (%percent > %caps)) {
inc -e $+(%,caps,.,$nick,.,#) | if $($+(%,caps,.,$nick,.,#),2) > 1 {
kick # $nick You were warned one time not to use caps.
}
else {
msg # $nick $+ , please DO NOT use caps.
}
}
}
}
}
Keon191,
Just remove the alias owner
Then under those two text events, change them to:
The 1st text event:
[i]on :text:!caps:#:{
if ($nick isop $chan) && (!$3) {[/i]
The 2nd text event:
[i]on *:text:!crooms:#:{
if ($nick isop $chan) && (!%capschan) {[/i]
The rest remain the same.
All the text events can be combined into one. But I doubt napa182 will update this, as he said this snippet bores him. :/
@Klasic Kumputerz why are you asking the same thing in ever Cap snippet ffs wait for someone to reply instead of asking over and over. this is such an old snippet and il
prob never rewrite it so if you would read the command line in the f'n script it would tell you.
Yes i know this is n old snippet an needs to be redone but it bores me
um not anyone only the addy that is added as owner can trigger the commands. it's for uses as a bot code so you have to use it on a bot unless you make it an on input or an alias to use for ur self.
for this code to be triggered the person has to have typed a $len count of 5 so it wont go off for LOL.
what you do is load the code into ur bot's remote. then on ur bots side type /owner nick_you_want_as_owner
then on users side type !caps on #room_for_it_to_work_on
!caps set 50 for 50%
OK, I got it sorted out.
APPARENTLY I, as the /owner, can NOT set the parameters myself! I have to login with another client to manage it.
Does this mean anyone can do "!caps off" if they want?
I logged in remotely with another computer as just a regular user, not added to the /owner list, and was able to do "!caps set 30" and "!caps off" and it worked.
I thought only OPS could update it, or the owner? When I (after doing /owner Swoop) type "!crooms" I get nothing.
Lastly, is it possible to check word count for CapsKicker to only do its work on sentances with more than two words? I don't want "LOL" for example to ban someone even though that's 100% caps.
Thanks.
Thanks, that was quick!
I load it and the banner comes up saying it was loaded so that's good.
Then I run /owner nick and i get echoed back I was added, that's good...
very good