|
confuzzed
|
confuzzed
|
Hi im in desperate need of help im looking to make a swear word ban system for irc what i would like it to do is warn the user twice and then ban them for 24 hours i just need someone to point me in the right direction thanks
|
|
|
|
Joined: Jun 2003
Posts: 4,670
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 4,670 |
You can see a simple swear word kicker here. You can then incorporate the Reaction Levels tutorial from the same page. You may also wish to see /help on text and /help if then else. Regards,
|
|
|
|
confuzzed
|
confuzzed
|
very neat but how do i make it a program and run it in irc and what type of program do i make it?
|
|
|
|
Joined: Jun 2003
Posts: 4,670
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 4,670 |
That is mIRC script. It's a language unique to mIRC (For now anyway *cough*). I'm assuming you're using mIRC. You can use mIRC's Script Editor to paste code. Press ALT+R to access it. You could also search some of these mIRC-script-related sites to find ready-made addons if you prefer: www.mirc.netwww.mircscripts.comwww.hawkee.comwww.mircscripts.orgRegards,
|
|
|
|
Joined: Jun 2003
Posts: 4,670
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 4,670 |
You would paste that in the ALT+R editor as I said above.
However, it apparently needs some other addon/script to work, so you'll have to use that. If you stuck to the websites I advised you to search on, it is unlikely you'd have to go through such hassle.
Regards,
|
|
|
|
confuzzed
|
confuzzed
|
ya i know but a guy i know is the maker of this file and it does exactly what i want with the warnings and then 24 hour ban i already have the file loaded but i need to know how to add words and make adjustments like add words and set priority ect. ect.
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
From what I can make out of that script you can't add them unless using hadd -m swear.words <swear word>.
I don't think you know what that does, basically that creates a hash table (database) if you like to store your data. The hash table swear.words is the table name. <swear word> would obviously be the item.
Alternatively, if you are on the channel #supermods-op and the value for $swear.add is "1", then you may add them. But it'd have to be a bot or something as there's no other command you can actually type to add words, it'd be someone else typing it. You say you know the author, so get him to write an On Input section of that code.
Hope this helps.
|
|
|
|
Joined: Jun 2003
Posts: 4,670
Hoopy frood
|
Hoopy frood
Joined: Jun 2003
Posts: 4,670 |
If you know the author, you should ask *them* for help with *their* script.
Regards,
|
|
|
|
confuzzed
|
confuzzed
|
ight well the author dont understand why it wont work on my channel so i tried typing one up from that link you provided earlyer wanted to know if this will work all help is apreciated
on @*:TEXT:*:#:{ if ($nick !isop #) { if ([censored] isin $1-) || (dick isin $1-) || ([censored] isin $1-) { ;The above if statement is what actually checks for the swear words set -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1) ;the -u3600 makes the variable unset after 1hr without being used if (%rl. [ $+ [ $address($nick,2) ] ] == 1) .notice $nick Please don't! - this is your first warning! if (%rl. [ $+ [ $address($nick,2) ] ] == 2) .notice $nick Please don't! - this is your second warning next time you will be banned! if (%rl. [ $+ [ $address($nick,2) ] ] >= 3) ban -u60 # $nick 11 { kick # $nick You were warned. You are not allowed to swear in this irc channel! } } }
Last edited by confuzzed; 12/01/05 07:32 AM.
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
Are you sure you wrote that?
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
Well I prefer the $numtok one...
on @*:TEXT:*:#:{
if ($nick !isop #) {
if ([censored] isin $1-) || (dick isin $1-) || ([censored] isin $1-) {
;The above if statement is what actually checks for the swear words
ban -u60 # $nick 11
kick # $nick Do not swear!
}
}
}
This one would be a poor example because you are going to have one long line of profanity when you can just store them in a variable, or hash table.
|
|
|
|
confuzzed
|
confuzzed
|
so this is what it should be and will it wok to warn and then ban? on @*:TEXT:*:#: {
if ($nick !isop #) {
var %i = 0
while (%i < $numtok(%swear.words,32)) {
; this while loops keeps going until its checked every word in %swear.words
inc %i
var %current.word = $gettok(%swear.words,%i,32)
if ($istok($strip($1-),%current.word,32) == $true) {
;$istok returns $true if %current.word is in the text
set -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1)
;the -u3600 makes the variable unset after 1hr without being used
if (%rl. [ $+ [ $address($nick,2) ] ] == 1) .notice $nick Please don't! - this is your first warning!
if (%rl. [ $+ [ $address($nick,2) ] ] == 2) .notice $nick Please don't! - this is your second warning next time you will be banned!
if (%rl. [ $+ [ $address($nick,2) ] ] >= 3) ban -u60 # $nick 11 {
kick # $nick You were warned. You are not allowed to swear in this irc channel!
}
}
}
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
That script basically warns the user twice then on the third time it will kickban the user. It seems fine, I'm not one for loading others scripts so you will have to test it.
Add the swear words by: /set %swear.words word1 word2 word3 word4 word5 etc.
|
|
|
|
confuzzed
|
confuzzed
|
ok tested but it kicked me other thin warn me what have i done wrong?
|
|
|
|
confuzzed
|
confuzzed
|
also what does this mean and how do i do this i think this might be what is causing it to maess up? You would also need to clear your %rl.* variable list every time you connect to a server or start up mIRC:
on *:START: unset %rl.* on *:CONNECT: unset %rl.*
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
That simply unsets all users who have been warned. When mIRC starts and connects.
|
|
|
|
confuzzed
|
confuzzed
|
can you tell me what is wrong with the code and why it wont warn an then ban? on @*:TEXT:*:#: {
if ($nick !isop #) {
var %i = 0
while (%i < $numtok(%swear.words,32)) {
; this while loops keeps going until its checked every word in %swear.words
inc %i
var %current.word = $gettok(%swear.words,%i,32){
if ($istok($strip($1-),%current.word,32) == $true) {
;$istok returns $true if %current.word is in the text
set -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1)
;the -u3600 makes the variable unset after 1hr without being used
if (%rl. [ $+ [ $address($nick,2) ] ] == 1) .notice $nick Please don't! - this is your first warning!
if (%rl. [ $+ [ $address($nick,2) ] ] == 2) .notice $nick Please don't! - this is your second warning next time you will be banned!
if (%rl. [ $+ [ $address($nick,2) ] ] >= 3) ban -u60 # $nick 11 {
kick # $nick You were warned. You are not allowed to swear in this irc channel!
}
}
}
|
|
|
|
Joined: Dec 2002
Posts: 3,534
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,534 |
var %current.word = $gettok(%swear.words,%i,32){
needs to be..
var %current.word = $gettok(%swear.words,%i,32) {
Edit:
In the code you sent us you're also missing 3 } braces...
[code] on @*:TEXT:*:#: { if ($nick !isop #) { var %i = 0 while (%i < $numtok(%swear.words,32)) { ; this while loops keeps going until its checked every word in %swear.words inc %i var %current.word = $gettok(%swear.words,%i,32) { if ($istok($strip($1-),%current.word,32) == $true) { ;$istok returns $true if %current.word is in the text set -u3600 %rl. [ $+ [ $address($nick,2) ] ] $calc( %rl. [ $+ [ $address($nick,2) ] ] + 1) ;the -u3600 makes the variable unset after 1hr without being used if (%rl. [ $+ [ $address($nick,2) ] ] == 1) .notice $nick Please don't! - this is your first warning! if (%rl. [ $+ [ $address($nick,2) ] ] == 2) .notice $nick Please don't! - this is your second warning next time you will be banned! if (%rl. [ $+ [ $address($nick,2) ] ] >= 3) ban -u60 # $nick 11 { kick # $nick You were warned. You are not allowed to swear in this irc channel! } } } } } }
|
|
|
|
|