mIRC Home    About    Download    Register    News    Help

Print Thread
Scan Nicks #133862 26/10/05 07:38 AM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
I found this code in a different post
Code:
 on !@*:JOIN:#teenconnection: {  if (*bad* iswm $nick) ban -ku60 $chan $nick 5 Bad word in nickname
  elseif (*somethingelse* iswm $nick) ban -ku60 $chan $nick 5 Bad word in nickname}
 

That works for me but is there a way that you can put the words in a file and call it? Also what if they are already in the room? Can you do a scan of the nicknames and kick them if it finds one of the words from the file in their nick? Thanks

Re: Scan Nicks #133863 26/10/05 11:35 AM
Joined: Sep 2004
Posts: 200
I
IR_n00b Offline
Fjord artisan
Offline
Fjord artisan
I
Joined: Sep 2004
Posts: 200
Code:
on !@*:JOIN:#teenconnection: {
if ($read(nicks.txt,nw,$+(*,$nick,*)) ban -ku60 $chan $nick 5 Bad word in nickname
}

just do: /write nicks.txt <bad word>
for each bad word.
wink

Re: Scan Nicks #133864 26/10/05 03:36 PM
Joined: Dec 2002
Posts: 1,245
M
MikeChat Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
you might add something to scan those that are in the channel when the OP first joins
alias masscheck { who #teenconnection }

use this line to test if $6 is the nick on the network you use
raw 352:*:{ echo $active $6 }

if that is correct then replace that line with
raw 352:*:{
if ($read(nicks.txt,nw,$+(*,$6,*)) ban -ku60 $chan $nick 5 Bad word in nickname
}
note I didn't test that last bit, and if you have a big list you will want to use a hash table instead of a text file

Automatic scripts are not a good substitue for a reasonable thinking channel operator, dependance on them only weakens your abilities to manage things.
Also its easy to defeat a script like this by spelling the "bad word" phonetically or using numbers for letters.

Re: Scan Nicks #133865 26/10/05 07:21 PM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
after adding this code it gave me this error
/if: invalid format (line 2, swearnick.ini)
i changed the code to this
Code:
on !@*:JOIN:#: {
  if ($read(censor.txt,nw,$+(*,$nick,*)) ban -ku60 $chan $nick 5 Bad word in nickname
}
  

Re: Scan Nicks #133866 26/10/05 08:22 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You're missing a closing ).

Code:
on !@*:JOIN:#: {
  if ($read(censor.txt,nw,$+(*,$nick,*))[color:red])[/color] ban -ku60 $chan $nick 5 Bad word in nickname
}


Invision Support
#Invision on irc.irchighway.net
Re: Scan Nicks #133867 26/10/05 10:27 PM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
Thank you all for the help. As always it works. Thanks again

Re: Scan Nicks #133868 27/10/05 08:45 PM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
Ok i thought I could do this. Trying to setup for a nick change. I though this was correct
Code:
on *:nick: {
  if ($read(censor.txt,nw,$+(*,$newnick,*))) ban -ku60 $chan $newnick 5 Bad word in nickname
}

But as ou can tell from looking at it, that is wrong. Thanks for the help.

Re: Scan Nicks #133869 29/10/05 08:19 AM
Joined: Oct 2005
Posts: 91
T
truguce Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Oct 2005
Posts: 91
i have a little problem with this. for some reason when someone joined with "a" as nickname it banned him. Is this because he only used one letter in nick? If so can i fix that? This is what i have so far.
Code:
#swearnick off
on *:JOIN:#: {
  if ($read(censor.txt,nw,$+(*,$nick,*))) { ban -ku60 $chan $nick 5 Bad word in nickname. 60sec ban please change nick and rejoin. | .msg truguce $nick was banned for using bad language in nick. }
}

on *:nick: {
  if ($read(censor.txt,nw,$+(*,$newnick,*))) ban -ku60 $chan $newnick 5 Bad word in nickname
}
#swearnick end

Also can someone help with the On *:nick command cause that does not work. Thanks

{edited}
Just found out when someone use ** Hello ** they got warned and kicked. I am guessing it is because of the * in my code.

Last edited by truguce; 29/10/05 09:47 AM.
Re: Scan Nicks #133870 31/10/05 03:13 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Well, if you're searching for *nick* and the nick is any part of any of the "bad" words, then it will be a problem. So, any small nicks risk being banned.

If nothing else, you can throw into that IF statement...

&& $len($nick > 2)

Of course, that still risks having someone with a nick like amn being banned. But, there are probably few 3+ letter nicks that would get banned because they are part of a larger "bad" word.

==============

There is one really bad thing with how you're doing this, though. You're looking for *nick*... Let's say a "bad" word you had was "ice." Yes, it's not a bad word, but I'd rather not start writing real ones in here and it's just an example. Anyhow, if someone's nick was "mice", it would search your bad word list for *mice* and wouldn't trigger for "ice". Think of that with how people may use swear words ... dumb*** as an example. If you put that one in your list of bad words, it would be fine... but if you just put in the * part in your list, then it would fail. Considering how many ways people use words, it would be a pain to enter every single possibility.

You're better off checking every bad word against the nick instead of the nick against every bad word. That's not a good thing to do using a text file as reading it will be a pain... you may be better off using a hash table or just sticking the words directly into the script.


Invision Support
#Invision on irc.irchighway.net