mIRC Home    About    Download    Register    News    Help

Print Thread
#84640 30/05/04 08:21 PM
Joined: Jun 2003
Posts: 19
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Jun 2003
Posts: 19
Hi Gurus

I am new to mIRC scripting and have no idea how to accomplish this. I know its doable and simple. I am moderating a community public channel and I wish to accomplish this.

Whenever anyone in the main channel uses abusive word (The abusive word's list will be stored in a text file in mIRC dir.), I like to replace that abusive word with spaces or dashes before it appers in the main channel and then send that word or whatever user typed to the main channel. So the profanity is never seen by other guests in the main channel.

If replacing Profanity before it appers in the main channel is not possible, then, right after the profanity is displayed in the main channel, I like to send few lines of spaces/words so the profanity scrolls up before anyone reads it and then I like to kick and ban the abuser automatically.

I am sure this is simple for you gurus to accomplish. I am not asking for complete script, but if you can just show me the right path, I will really be thankful. I don't want to use scripts from internet because I think they are not safe (mostly have backdoors) plus 90% of the functionality is not needed for my purposes. PLEASE HELP

Thanks in advance

sahmed02@hotmail.com

#84641 30/05/04 08:34 PM
Joined: Dec 2002
Posts: 397
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
what you want too accomplish could be very bad for you (the part of scrolling the text up quickly can flood u out easily) but kicking a user for saying an unwanted word is very simple :]

Code:
on *:text:*:#: {
  ;;check too see if they said badword
  if ($1- isin %badwords) {

    ;;if this is their first time saying a badword then they are added too the "list"
    if (%badword. $+ [ $+ $nick $+ ] >= 1) { set %badword. $+ [ $+ $nick $+ ] 1 }

    ;; if they have said the word 3 or more times they get banned and it unsets their variable
    if (%badword. $+ [ $+ $nick $+ ] <= 3) { mode # +b $inck | unset %badword. $+ [ $+ $nick $+ ] }

    ;;increase their kick ammount
    inc %badword. $+ [ $+ $nick $+ ] 1

    ;; kick the user if they have said a bad word 3 or more times it throws in "3 strikers and your out out :P"
    kick # $kick used abuse word. $iif(%badword. $+ [ $+ $nick $+ ] <= 3, 3 strikes and your out :P)
  }
}

;; command so you can add more bad words ;p
alias addbadword { set %badwords %badwords $1- }


well thats my 2 cents hope it works its untested if it doesnt im sure some one will point out my flaws but its a good script it bans the user after they have said the word more then 3 times too protect the others

type
/addbadword <new or new bad words seperated by a space>

so like
/addbadword [censored]
or
/addbadword [censored] bitch

and that will add both words too the list at once that will help adding mass words simpler ;/

Last edited by ATMA; 30/05/04 08:36 PM.

Need amazing web design for low price: http://www.matrixn3t.net
#84642 30/05/04 09:08 PM
Joined: Jun 2003
Posts: 19
S
Pikka bird
OP Offline
Pikka bird
S
Joined: Jun 2003
Posts: 19
Hi

Thank you so much for responding so quick. I think I will settle for what you have recommended. I would really appreciate if you can explain your code in litle bit more detail how each line works. plus I don't wanna give them 3 chances, I just want them out as soon as they abuse.

what is $1? what is %badwords?

I really appreciate your response.

Thanks
PS: How can I test more then one words in ON TEXT event?
on *:text:(How can it be more words?):#:

#84643 30/05/04 10:31 PM
Joined: Dec 2002
Posts: 397
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
$1- is the line that was said in the channel

but.... it has a - at the ned of $1
if it was just: $1 then it would return the first word said

if u did $2 it would return the 2nd word and then so on $1- simply just grabs the whole line ;p and then %badwords is where all of your bad words have been stored at


Need amazing web design for low price: http://www.matrixn3t.net
#84644 31/05/04 10:14 AM
Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
The IRC protocol does not allow anyone to change messages someone else sent to a channel. The only thing you can do with channel messages you receive, is change them before displaying them on your screen, or reacting to it by sending another message or command (kick/ban for example)

If you really want no bad words in your channel, you'll have to
a) let no one send anything to the channel (make it moderated with only you an op, no voices and don't swear yourself)
b) let all users private message you(r voiced or opped bot)
c) check those messages for bad words and adapt them
d) and finally send them to the channel yourself, prefixed with the nick of the original sender.

Needless to say, it's a hassle for the users of your channel because they have to do strange stuff for saying anything, all messages look like they're coming from you and if there's some active conversation between more than 3 people, tou'll be flooded off the server, disabling ALL communications on your channel...

So my advice is: put "no bad words" in your topic and kickban people who say it anyways, but others in your channel will see what they said. Don't go flooding to have the bad words scroll off the screen, that would take about 28 full lines of text on my screen, (and I have a lower resolution than normally atm). 28 lines will get you flooded off the server, and people will be really annoyed and scroll back to see what was said before, because they want to follow the conversation...

#84645 31/05/04 10:56 AM
Joined: Dec 2002
Posts: 94
K
Babel fish
Offline
Babel fish
K
Joined: Dec 2002
Posts: 94
id use
[code]
on *:text:*:*:{
%x = 1
while (%x <= $lines(abuse.txt)) {
if ($read(abuse.txt,%x) isin $1-) { .kick $nick # Abuse is not needed | break }
inc %x
}
}
[code]

this might lag up mIRC depending on ur system, as it checks every word againce it


btw its not tested


Lets get dirty
#84646 31/05/04 08:53 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
Hi,

I'd really NOT use that, since you are letting mIRC loop through that file every time anything is said anywhere.

Instead I'd type /help hash tables

Greets


Gone.

Link Copied to Clipboard