mIRC Home    About    Download    Register    News    Help

Print Thread
#60049 12/11/03 09:27 PM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
hey I got theys 3 add-ons I made and they are all channel protection things like badword kicker and flood kicker and clone kicker ok and i added an on off script like this
menu channel {
[[Tools]]
.channel Tools
..Badwords
...switch script $iif($group(#script) == on,off,on): $iif($group(#script) == on,.disable,.enable) #script
}
#script off
script here script hereashdsajdkjasdkasjdkjasdlkj
}
#script end

it works fine but the problem is that when I click on it turns them all on and I dont want them all one. Like if im in a chat and i just want flood kicker on i click flood on and alll of a sudden it turns them all on can anyone help?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
#60050 12/11/03 10:02 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Use more groups.. I'd use..

#protection.flood off
; flood script here
#protection.flood end

#protection.clone off
; clone script here
#protection.clone end

#protection.badwords off
; bad words filter here
#protection.badwords end

then use #protection.<name> and to disable/enable them all, use .[dis|en]able #protection.*


-KingTomato
#60051 12/11/03 10:13 PM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
ok im a little lost i did the
#protection.flood off
; flood script here
#protection.flood end
thing and this is what it looks like
menu channel {
[[Tools]]
.Channel Tools
..flood/kick
...switch script $iif($group(#script) == on,off,on): $iif($group(#script) == on,.disable,.enable) #script
}
#protection.flood off
':script in here:
#protection.flood end
and i did that to the others but i dont get what you mean by
then use #protection.<name> and to disable/enable them all, use .[dis|en]able #protection.* can you make it a little more clear or if you want i can past the pull 3 add-ons?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
#60052 12/11/03 10:20 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
#protection.swear off
;swear protection
#protection.swear end

#protection.clone off
; clone protection
#protection.clone end

#protection.flood off
;flood protection
#protection.flood end

menu channel {
[[Tools]]
.Channel Tools
..Swear $chr(9) $iif($group(#protection.swear, On, Off): $iif($group(#protection.swear, .disable, .enable) #protection.swear
..Flood/Kick $chr(9) $iif($group(#protection.flood, On, Off): $iif($group(#protection.flood, .disable, .enable) #protection.flood
..Clone $chr(9) $iif($group(#protection.clone, On, Off): $iif($group(#protection.clone, .disable, .enable) #protection.clone
}


-KingTomato
#60053 12/11/03 10:35 PM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
ok still not working this is what I have

#protection.swear off
on *:text:*:#:{
if ($nick isop $chan) {
halt
}
else {
set %txt.1 $remove($1-,,,,,)
if ([censored] isin %txt.1) { /kick # $nick please Dont swear AGAIN }
if ([censored] isin %txt.1) { /kick # $nick That was not right }
if (bastard isin %txt.1) { /kick # $nick none of that Please }
if (cocksucker isin %txt.1) { /kick # $nick if you where a cock wouldent you liek to be sucked? }
if (cocksuka isin %txt.1) { /kick # $nick Dont Fuckin Swear in here please }
if (slut isin %txt.1) { /kick # $nick Dont Fuckin Swear in here please }
if (Dick isin %txt.1) { /kick # $nick Dont Fuckin Swear in here please }
if (man slut isin %txt.1) { /kick # $nick Dont Fuckin Swear in here please }
if (cock isin %txt.1) { /kick # $nick Dont Fuckin Swear in here please }
if ([censored] isin %txt.1) { /kick # $nick Dont Fuckin Swear in here please }
if (faggot isin %txt.1) { /kick # $nick Dont Fuckin Swear in here please }
if (peckerhead isin %txt.1) { /kick # $nick Dont Fuckin Swear in here please }
if (f|_|ck isin %txt.1) { /kick # $nick Dont Fuckin Swear in here please }
if (pussy isin %txt.1) { /kick # $nick The pussy is a very protected area on a girl please dont say it AGAIN }
if (Windows isin %txt.1) { /kick # $nick Windows sucks man dont be saying that agen its a bad word. }
if (Penis isin %txt.1) { /kick # $nick you can stfu you cock }
}
}
#protection.swear end

#protection.clone off
ON @*:JOIN:#:{
;Name: CloneKicker - Author: xourge
;Release: 17/01/03 - Version: 1.2
inc -u1 %c.ad. [ $+ [ $mask($fulladdress,2) ] $+ ] . [ $+ [ $chan ] ]
if ( %c.ad. [ $+ [ $mask($fulladdress,2) ] $+ ] . [ $+ [ $chan ] ] >= 2) {
.raw mode # dimb $mask($fulladdress,2)
.timerunban [ $+ [ $fulladdress ] ] 1 60 mode # -b $mask($fulladdress,2)
.timerunim 1 5 mode # -dim
if ( %c.kicked. [ $+ [ $nick ] ] != 1) {
.raw kick # $nick Mass Join Clones From $address($nick,2)
set -u5 %c.kicked. [ $+ [ $nick ] ] 1
}
}
}
#protection.clone end

#protection.flood off
; +--------------+
; | AFRAC v1.4 |
; +--------------+

; *** Settings start

; Basic settings

alias kick.ops return 1
alias exempt.chans return #example1 #example2
alias ban.type return 2
alias show.ban.length return 1

; Flood protection settings

alias flood.enable return 1
alias flood.lines return 4
alias flood.secs return 3
alias flood.warnings return 2
alias flood.warning.expire return 600
alias flood.ban.length return 600
alias flood.kick.reason return warning! flooding is not allowed on $chan
alias flood.ban.reason return I just told you, flooding is not allowed!

; Repeat protection settings

alias repeat.enable return 1
alias repeat.secs return 30
alias repeat.difference return 5
alias repeat.warnings return 4
alias repeat.warning.expire return 1800
alias repeat.ban.length return 300
alias repeat.kick.reason return warning! repeating is not allowed on $chan
alias repeat.ban.reason return I just told you, repeating is not allowed!

; Advertise protection settings

alias advertise.enable return 1
alias advertise.words return 2
alias advertise.chanlen return 1
alias advertise.numbers return 1
alias advertise.keywords return come to, idle, join
alias advertise.warnings return 2
alias advertise.warning.expire return 3600
alias advertise.ban.length return 3600
alias advertise.kick.reason return warning! advertising is not allowed on $chan
alias advertise.ban.reason return I just told you, advertising is not allowed!

; Capitals protection settings

alias capitals.enable return 1
alias capitals.percentage return 0.5
alias capitals.minlength return 10
alias capitals.warnings return 3
alias capitals.warning.expire return 600
alias capitals.ban.length return 900
alias capitals.kick.reason return warning! excessive use of capitals is not allowed on $chan
alias capitals.ban.reason return I just told you, excessive use of capitals is not allowed!

; *** Settings /end

; *** Script start

alias trim {
var %a $1-
while ($left(%a, 1) == $chr(32)) {
var %a $right($1-, -1)
}
while ($right(%a, 1) == $chr(32)) {
var %a $left($1-, -1)
}
return %a
}

on @*:text:*:#:{

; pre

if ($nick isop $chan) && (!$kick.ops) halt

var %a 1
while (%a <= $numtok($exempt.chans, 32)) {
if ($chan == $gettok($exempt.chans, %a, 32)) halt
inc %a
}

; flood

if ($flood.enable) {
if (!%flood.lines. [ $+ [ $nick ] ]) {
set -z %flood.secs. [ $+ [ $nick ] ] $flood.secs
}
inc -u [ $+ [ $flood.secs ] ] %flood.lines. [ $+ [ $nick ] ]
if (%flood.lines. [ $+ [ $nick ] ] >= $flood.lines) {
if (%flood.secs. [ $+ [ $nick ] ]) {
unset %flood.lines. [ $+ [ $nick ] ]
if (%flood.warnings. [ $+ [ $nick ] ] >= $flood.warnings) {
if ($nick isop $chan) mode $chan -o $nick
ban $iif($flood.ban.length, -u [ $+ [ $flood.ban.length ] ]) $chan $nick $ban.type
kick $chan $nick $flood.ban.reason $iif($show.ban.length, ( $+ $duration($flood.ban.length) ban))
unset %flood.warnings. [ $+ [ $nick ] ]
}
else {
inc $iif($flood.warning.expire, -u [ $+ [ $flood.warning.expire ] ]) %flood.warnings. [ $+ [ $nick ] ]
kick $chan $nick $flood.kick.reason
}
}
else {
set -z %flood.secs. [ $+ [ $nick ] ] $flood.secs
set -u [ $+ [ $flood.secs ] ] $calc(%flood.lines. [ $+ [ $nick ] ] - $flood.lines)
}
}
}

; repeat

if ($repeat.enable) {
if (%repeat.lastmsg. [ $+ [ $nick ] ]) {
var %sub $calc($len(%repeat.lastmsg. [ $+ [ $nick ] ]) - $len($1-))
if ((%sub < 0) && (%sub >= $calc($repeat.difference / -1)) && ($left($1-, %sub) == %repeat.lastmsg. [ $+ [ $nick ] ])) || ($1- == %repeat.lastmsg. [ $+ [ $nick ] ]) {
if (%repeat.warnings. [ $+ [ $nick ] ] >= $repeat.warnings) {
if ($nick isop $chan) mode $chan -o $nick
ban $iif($repeat.ban.length, -u [ $+ [ $repeat.ban.length ] ]) $chan $nick $ban.type
kick $chan $nick $repeat.ban.reason $iif($show.ban.length, ( $+ $duration($repeat.ban.length) ban))
unset %repeat.warnings. [ $+ [ $nick ] ]
}
else {
inc $iif($repeat.warning.expire, -u [ $+ [ $repeat.warning.expire ] ]) %repeat.warnings. [ $+ [ $nick ] ]
kick $chan $nick $repeat.kick.reason
}
}
}
set $iif($repeat.secs, -u [ $+ [ $repeat.secs ] ]) %repeat.lastmsg. [ $+ [ $nick ] ] $1-
}

; advertise

if ($advertise.enable) {
var %a 1
while (%a <= $numtok($advertise.keywords, 44)) {
if ($trim($gettok($advertise.keywords, %a, 44)) isin $1-) {
var %advertise.override $true
}
inc %a
}
if ((($numtok($1-, 32) < $advertise.words) || (!$advertise.words)) || (%advertise.override)) && (*#* iswm $1-) {
var %a 1
while (%a <= $numtok($1-, 32)) {
if (#* iswm $gettok($1-, [ %a ], 32)) && ($gettok($1-, [ %a ], 32) != $chan) && (($len($right($gettok($1-, [ %a ], 32), -1)) > $advertise.chanlen) || (!$advertise.chanlen)) {
if (!$advertise.numbers) || ($right($gettok($1-, [ %a ], 32), -1) !isnum) {
if (%advertise.warnings. [ $+ [ $nick ] ] >= $advertise.warnings) {
if ($nick isop $chan) mode $chan -o $nick
ban $iif($advertise.ban.length, -u [ $+ [ $advertise.ban.length ] ]) $chan $nick $ban.type
kick $chan $nick $advertise.ban.reason $iif($show.ban.length, ( $+ $duration($advertise.ban.length) ban))
unset %advertise.warnings. [ $+ [ $nick ] ]
}
else {
inc $iif($advertise.warning.expire, -u [ $+ [ $advertise.warning.expire ] ]) %advertise.warnings. [ $+ [ $nick ] ]
kick $chan $nick $advertise.kick.reason
}
}
}
inc %a
}
}
}

; capitals

if ($capitals.enable) {
var %a 1
var %upper 0
while (%a <= $len($1-)) {
if ($left($right($1-, $calc($len($1-) - %a)), 1) isalpha) {
if ($left($right($1-, $calc($len($1-) - %a)), 1) === $upper($left($right($1-, $calc($len($1-) - %a)), 1))) {
inc %upper
}
inc %length
}
inc %a
}
if (%length >= $capitals.minlength) {
if ($calc(%upper / %length) >= $capitals.percentage) {
if (%capitals.warnings. [ $+ [ $nick ] ] >= $capitals.warnings) {
if ($nick isop $chan) mode $chan -o $nick
ban $iif($capitals.ban.length, -u [ $+ [ $capitals.ban.length ] ]) $chan $nick $ban.type
kick $chan $nick $capitals.ban.reason $iif($show.ban.length, ( $+ $duration($capitals.ban.length) ban))
unset %capitals.warnings. [ $+ [ $nick ] ]
}
else {
inc $iif($capitals.warning.expire, -u [ $+ [ $capitals.warning.expire ] ]) %capitals.warnings. [ $+ [ $nick ] ]
kick $chan $nick $capitals.kick.reason
}
}
}
}
}

; *** Script /end
#protection.flood end

menu channel {
[[Tools]]
.channel Tools
..Swear $chr(9) $iif($group(#protection.swear, On, Off): $iif($group(#protection.swear, .disable, .enable) #protection.swear
..Flood/Kick $chr(9) $iif($group(#protection.flood, On, Off): $iif($group(#protection.flood, .disable, .enable) #protection.flood
..Clone $chr(9) $iif($group(#protection.clone, On, Off): $iif($group(#protection.clone, .disable, .enable) #protection.clone
}

is this what you mean? i tryed it and it dident work


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
#60054 12/11/03 10:37 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
menu channel {
[[Tools]]
.Channel Tools
..Swear $iif($group(#protection.swear) == on,On,Off):$iif($group(#protection.swear) == on,.disable,.enable) #protection.swear
..Flood/Kick $iif($group(#protection.flood) == on,On,Off):$iif($group(#protection.flood) == on,.disable,.enable) #protection.flood
..Clone $iif($group(#protection.clone) == on,On,Off):$iif($group(#protection.clone) == on,.disable,.enable) #protection.clone
}

#60055 12/11/03 10:39 PM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
oic, u have it in one big on text.. .in that case, encase each one in a variable condition like..

on *:TEXT:*:#: {

; pre

; flood
if (%protection.flood) {
; flood stuffs
}

; swear
if (%protection.swear) {
; swear stuffs
}

}

then use somthing like:

..Flood/Kick $chr(9) $iif(%protection.flood, On, Off): /set %protection.flood $iif(%protection.flood, 0, 1)


-KingTomato
#60056 12/11/03 11:07 PM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
Holy Sh*T thanks you guys what Iori sead worked I dident have to do the other think thank you bolth.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
#60057 12/11/03 11:12 PM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
O wait never mind the only thing working is the badword kicker can you write out what i have to do ? like write it in the script i have now and then past it if you can that would be great thanks


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
#60058 12/11/03 11:43 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You have two on *:text:*:#: events in the sam efile, either combine, and use vars like KT said, or maybe use

on @*^:text:*:#:{

for one, and

on @*:text:*:#:{

for the other

#60059 13/11/03 12:53 AM
Joined: Oct 2003
Posts: 143
D
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
mmm ya ill try that but its working now i dont know how but it is i dident add or change anything. lol but ill try what your saying later thanks.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }

Link Copied to Clipboard