auto warning/kick/ban script
#173044
20/03/07 01:29 AM
|
Joined: Dec 2004
Posts: 33
WildCard
OP
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2004
Posts: 33 |
im not good at scripting, all i do is take what i already have to modify them for my needs, but today i need something new i dont have. so i am here to ask for your help.
i have a list of words i want to put into a document, or where ever i need this list to be.
when someone sais any of the words on this list the first few times i would like to warn them with a PM message. after that certain number of time a kick from chanserv a few number of times then after a few more times an hour ban, then day ban ext, i would like to modify levels of warnings, bans ect... i would also need a way to keep track of how many voilations someone has, and a way to reset it. thank you for your help.
|
|
|
Re: auto warning/kick/ban script
[Re: WildCard]
#173049
20/03/07 05:30 AM
|
Joined: Feb 2006
Posts: 11
Prof
Pikka bird
|
Pikka bird
Joined: Feb 2006
Posts: 11 |
u can use alias and text file to do that alias cekText {
var %aa = 1
while (%aa >= $lines(text.txt)) {
if ($read(text.txt,%aa) isin $1- return ok
inc %aa
}
return $null
} now use: on *:TEXT:*:#:if ($cekText($1-)) kick # $nick Bad Word! hope this work 
|
|
|
Re: auto warning/kick/ban script
[Re: Prof]
#173050
20/03/07 06:02 AM
|
Joined: Dec 2004
Posts: 33
WildCard
OP
Ameglian cow
|
OP
Ameglian cow
Joined: Dec 2004
Posts: 33 |
i can explain it in basic language, unfortunatly thats all i know, if i could get a skeleton of a script i can add in a few more levels of violations and actions for the violation. but how do you get a script to count the violation per user... 
Last edited by WildCard; 20/03/07 06:21 AM.
|
|
|
Re: auto warning/kick/ban script
[Re: Prof]
#173051
20/03/07 06:18 AM
|
Joined: Aug 2004
Posts: 7,252
RusselB
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
Nice try, Prof, however, your script would not work. You have the right idea, but the wrong comparison in your while statement.
|
|
|
Re: auto warning/kick/ban script
[Re: WildCard]
#173052
20/03/07 06:36 AM
|
Joined: Aug 2004
Posts: 7,252
RusselB
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
This type of thing has been done many times before. Here's the simplest form that I've seen and works on *:text:*:#:{
var %a = 1, %b = $0
while %a <= %b {
if $read(badword.txt,nts,$gettok($1-,%a,32)) {
inc $+(%,violation,.,$address)
if $($+(%,violation,.,$address),2) == 1 {
.notice $nick This is your first warning.. Do not use $gettok($1-,%a,32) in $chan
%a = %b
}
elseif $($+(%,violation,.,$address),2) == 2 {
.cs kick $chan $nick You were warned. Next time it'll be a ban
%a = %b
}
else {
cs ban $chan $nick Some people don't listen
%a = %b
unset $+(%,violation,.,$address)
}
}
inc %a
}
}
To my knowledge chanserv doesn't have an option in it's ban settings for it to remove the ban after a specified amount of time. This can be done with the regular /ban command, but that would require the client/bot that's running the code to have full ops in the channel. Additionally you stated that you wanted the kicks and bans to be performed by chanserv.
|
|
|
Re: auto warning/kick/ban script
[Re: RusselB]
#173139
21/03/07 04:57 AM
|
Joined: Mar 2007
Posts: 5
JazzySnazzySean
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Mar 2007
Posts: 5 |
To my knowledge chanserv doesn't have an option in it's ban settings for it to remove the ban after a specified amount of time. This can be done with the regular /ban command, but that would require the client/bot that's running the code to have full ops in the channel. Additionally you stated that you wanted the kicks and bans to be performed by chanserv.
There is such a command, !tb [nick] [time] i.e !tb bob 3d or !tb *!*@123.456.78.9 3d
|
|
|
Re: auto warning/kick/ban script
[Re: JazzySnazzySean]
#173141
21/03/07 05:17 AM
|
Joined: Aug 2004
Posts: 7,252
RusselB
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I checked the chanserv options on the network where I have IRCops, and there is no !tb command listed, so I wouldn't want to code something like that, as, obviously, not all chanserv's have it.
|
|
|
|
|