mIRC Home    About    Download    Register    News    Help

Page 1 of 2 1 2 >
Topic Options
#167767 - 30/12/06 04:54 AM help please
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
(on join only)
Anyone know how to make a anti bad nick/ident kicker


if I have bad.txt that contains bad words stuff....

thanks
_________________________
learn learn learn

Top
#167770 - 30/12/06 07:27 AM Re: help please [Re: learn3r]
SICORPS Offline
Nutrimatic drinks dispenser

Registered: 30/12/06
Posts: 9
here's what iam using on undernet network because there is a lots of spam bot out there so i made this litle script on join.

Code:

on @*:JOIN:#: {
  if ($nick == $me) { halt }
  if ($right($nick,2) isnum 10-46) && ($ulist($address($nick,2)).info == $null) { if (*.users.undernet.org !iswm $address($nick,2)) && ($right($nick,3) !isnum 47-99999) { inc -u20 %x | inc %kc | var %k = $nick | timer.kick.spam.bot. $+ $nick 1 %x kick $chan %k $zx anti-spam kick num:[12 $+ %kc $+ ] | halt } }
}



u could always ur spam.txt nick list like this :

Code:

on @*:JOIN:#:{ inc -u20 %x | inc %kc | if $nick isin $read(bad.txt, s, $nick) timer.spam. $+ $nick 1 %x kick $chan $nick spam-kick no: $+ %kc | halt }



Edited by SICORPS (30/12/06 07:28 AM)
_________________________
/ mIRC, PHP, Linux help and tutorial forum: www.SICORPS.org /

Top
#167780 - 30/12/06 10:37 AM Re: help please [Re: SICORPS]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
on @*:JOIN:#:{ inc -u20 %x | inc %kc | if $nick isin $read(bad.txt, s, $nick) timer.spam. $+ $nick 1 %x kick $chan $nick spam-kick no: $+ %kc | halt }

-------
aint working....

and the bad.txt contains
sample :
gay
fuck
-------

same goes to the ident...
_________________________
learn learn learn

Top
#167898 - 01/01/07 09:26 AM Re: help please [Re: learn3r]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
Isn't there anyone who knows this.. pls help...

Thank You & happy new year to all
_________________________
learn learn learn

Top
#167909 - 01/01/07 05:34 PM Re: help please [Re: learn3r]
Scripto Offline
Babel fish

Registered: 31/12/06
Posts: 80
Loc: Michigan, Usa
This is 1 possibility to try:

Ive always found it difficult to use .txt files to evaluate a "bad" nickname on Join because you have to pinpoint the "bad" token in the $nick (ex: gay_101, No1_gay, 1_gay_1 etc.) in order for the $read identifier to evaluate a match in the textfiles' list of words.

mIRC must evaluate an exact match between the "bad" token and the .txt file word, or your kicker wont trigger.

Including the realname in this kicker adds another token search to conduct, making this type of kicker a bit messy to code cleanly.

So to avoid lengthy code heres what I would try:
Code:
 on *:JOIN:#: {
   if ($nick == $me) halt
   if ((gay isin $nick) || (gay isin $gettok($address,1,64))) { /kickbad $chan }
   if ((sex isin $nick) || (sex isin $gettok($address,1,64))) { /kickbad $chan }
}
alias -l kickbad {
  /ban $1 $address($nick,2)
  /kick $1 $nick Unacceptable Word In Nick/Ident.
}

This will kick any nickname or realname with the words gay or sex in them.

Try creating one script that has all the words you dont want in it, if you find a new word that youre not comforable with, just write a new line in the Join trigger for that token like gay or sex is above. Every line will resort to the single alias at the bottom if it evaluates to kick.

This script can be a mile long, with any words you can think of and still give you the instant trigger result youre looking for (vs. searching a .txt file., in which I have seen cases of over 15 thousand lines, and still have instant responses with my pc)

Good luck grin


Edited by Scripto (01/01/07 05:46 PM)
_________________________
Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)

Top
#167911 - 01/01/07 05:42 PM Re: help please [Re: learn3r]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
This is something i write a while ago, maybe it's something for you, add the "bad words" in a txt file named badwords.txt, then type: /set %word.kick on .. and ur ready to go, disable the kick is done by: /set %word.kick off .. If you want to kick oped and voiced users too, remove the lines:

if ( $nick isop $chan ) { halt }
if ($nick isvo $chan) { halt }

You can add as many words you like in the txt file, and can be changed to kick nick using the badword too. and not with so much work, good luck. smile

Code goes in your remote.. ALT + R in your mirc.
Code:
on @*:text:*:#:{
  if ( $nick isop $chan ) { halt }
  if ($nick isvo $chan) { halt }
  if (%word.kick == On) {
    set %badword.line 1
    :badword
    if ( $read -l $+ %badword.line " $+ $mircdir\badwords.txt $+ " == $null ) { halt }
    elseif ( $read -l $+ %badword.line $mircdir $+ \badwords.txt isin $1- ) { goto badwordkick }
    else { inc %badword.line | goto badword }
    :badwordkick
    kick # $nick Do not use that language here!
    else { halt }
    :end
  }
}
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#167971 - 02/01/07 08:43 AM Re: help please [Re: Scripto]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
Thanks Scripto

I have that kind of code
i just want something new and will only read the .txt for the bad nick/ident

how about var %badndent = pussy,dick,gay
?
_________________________
learn learn learn

Top
#167972 - 02/01/07 08:45 AM Re: help please [Re: sparta]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
Thanks sparta
I'll try this code to my bad nick / Ident
if it'll work hehehe
_________________________
learn learn learn

Top
#167977 - 02/01/07 12:12 PM Re: help please [Re: learn3r]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
Code:
on *:JOIN:#: {
  set %badword.line 1
  :badword
  if ( $read -l $+ %badword.line " $+ $mircdir\badwords.txt $+ " == $null ) { halt }
  elseif ( $read -l $+ %badword.line $mircdir $+ \badwords.txt isin $gettok($address($nick,15),1,64)) ) { goto badwordkick }
  else { inc %badword.line | goto badword }
  :badwordkick
  kick # $nick Do not use that language here!
  else { halt }
  :end
}


I tried that but it kicks all who joins my chan frown
_________________________
learn learn learn

Top
#167994 - 02/01/07 03:08 PM Re: help please [Re: learn3r]
Sais Offline
Fjord artisan

Registered: 07/10/03
Posts: 313
Loc: UK
Quote:
I tried that but it kicks all who joins my chan

That would be because it executes the kick each time the on join is executed unless it gets halted by the $read being $null.

Sparta: Please, please, read up on 1) /help $read and 2) /help /while :]

Code:
var %badword = $read(badwords.txt,nt,%badword.line)
;; Doing it for nick and user parts of the address separately:
if (%badword isin $nick || %badword isin $ial($nick).user) { ... }
;; Doing it for nick and user parts of the address in one:
if (%badword isin $gettok($fulladdress,1,64)) { ... }


I would either do the kick in the while loop, or set a flag:

Code:
var %n = $lines(badwords.txt)
;; option 1
while (%n) {
  if ($read(...)) { kick ... }
  dec %n
}

;; option 2
var %flag = $false
;; the && !%flag here is optional - if it's not present, it will always run through the entire file, which may be useful for some applications
while (%n && !%flag) {
  if ($read(...)) { %flag = $true }
  dec %n
}
if (%flag) { kick .... }


These are obviously just templates, I leave it up to you, dear reader, to implement them as you see fit!
_________________________
Sais

Top
#168008 - 02/01/07 05:39 PM Re: help please [Re: Sais]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
Code:
on *:JOIN:#: {
  if ($me isop #) {
    set %badword.line 1
    :badword
    var %badword = $read(badwords.txt,nt,%badword.line)
    if (%badword isin $gettok($fulladdress,1,64)) { goto badkick }
    else { inc %badword.line | goto end }
    :badkick |  kick # $nick Bad nick/ident
    :end | halt
  }
}


I did that but still doesn't work...
What do i have to do w/ this?


And how about this?
Code:
on @*:join:#: {
  var %flag = $false
  while (%n && !%flag) {
    if ($read(badwords.txt) isin $gettok($fulladdress,1,64))  { %flag = $true }
    dec %n
  }
  if (%flag) { kick .... }
}

on @*:join:#: {
  var %n = $lines(badwords.txt)
  while (%n) {
    if ($read(badwords.txt) isin $gettok($fulladdress,1,64)) { kick ... }
    dec %n
  }
}


Edited by learn3r (02/01/07 06:13 PM)
_________________________
learn learn learn

Top
#168036 - 03/01/07 02:00 AM Re: help please [Re: learn3r]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342

HEEEEEEEEEEEEELLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLP
_________________________
learn learn learn

Top
#168044 - 03/01/07 04:52 AM Re: help please [Re: learn3r]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
Try this
Code:
on *:join:#:{
  .enable #bad_ident_nick_scan
  .who $nick
}
#bad_ident_nick_scan off
raw 315:*:{
  .disable #bad_ident_nick_scan
  haltdef
}
raw 352:*:{
  if $read(bad.txt,s,$3) || $read(bad.txt,s,$6) {
    if $me isop $2 {
      .ban -k $2 $6 Banned due to bad nick or ident
    }
    else {
      set %bad $addtok(%bad,$6,32)
    }
  }
}
#bad_ident_nick_scan end
on *:op:#:{
  if $opnick == $me && %bad {
    var %a = 1, %b = $numtok(%bad,32)
    while %a <= %b {
      if $gettok(%bad,%a,32) ison $chan {
        ban -k $chan $gettok(%bad,%a,32) Banned due to bad nick or ident
      }
      inc %a
    }
    unset %bad
  }
}

Top
#168047 - 03/01/07 06:56 AM Re: help please [Re: RusselB]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
that doesnt seem to work either russelB


I thought this should work but still doesnt frown
Code:
alias badtxt return $+(",$scriptdirbadword.txt")
alias badchan { if ($1 isin $bad($2).type) || (!$bad($2).type) { return $true } }
alias bad {
  if ($1) {
    if ($prop == type) {
      %s = 1
      while (%s <= $lines($badtxt)) {
        if ($gettok($read $+(-l,%s) $badtxt,1,44) iswm $1) { return $gettok($read $+(-l,%s) $badtxt,2-,44) | halt }
        inc %s
      }
      unset %s
    }
    else {
      %s = 1
      while (%s <= $lines($badtxt)) {
        if ($gettok($read $+(-l,%s) $badtxt,1,44) iswm $1) { return $gettok($read $+(-l,%s) $badtxt,1,44) | halt }
        inc %s
      }
      unset %s
    }
  }
}
on *:join:#:{
  if ($bad($fulladdress)) && ($badchan(#,$fulladdress)) {
    if ($me isop $chan) {
      kick # $nick Bad Nick/Ident
    }
    else ($me !isop $chan) { return }
  }
}
_________________________
learn learn learn

Top
#168049 - 03/01/07 08:11 AM Re: help please [Re: learn3r]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
I apologize that mine doesn't work, I (obviously) thought it would, as it uses the nick and ident information returned by the /who command.

In regards to the code you posted, there are some coding errors.
Here's a re-write of your code, with detected coding errors corrected, and condensed.
Code:
alias badtxt return $+(",$scriptdirbadword.txt,")
alias badchan { if ($1 isin $bad($2).type) || (!$bad($2).type) { return $true } }
alias bad {
  if ($1) {
    var %s = 1, %lines = $lines($badtxt)
    while (%s <= %lines) {
      var %line = $read($badtxt,%s)
      if ($gettok(%line,1,44) iswm $1) {
        return $iif($prop == type,$gettok(%line,2-,44),$v1)
        inc %s   
      }
    }
  }
}
on @*:join:#:{
  if ($bad($fulladdress)) && ($badchan(#,$fulladdress)) {
    kick # $nick Bad Nick/Ident
  }
}


Top
#168051 - 03/01/07 09:04 AM Re: help please [Re: RusselB]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
frown still ain't working...

Can someone do this even if not using a .txt

instead is

var %bad = fuck,gay,bitch,cock


Thank You guys for helping
_________________________
learn learn learn

Top
#168054 - 03/01/07 09:47 AM Re: help please [Re: learn3r]
RusselB Offline
Planetary brain

Registered: 03/08/04
Posts: 7252
Loc: Ontario, Canada
I'm going to hope that this is a question I didn't need to ask, but in the text file, do you have the items one per line, or do you have them all on one line, and separated by commas (like you show for the variable)?

I tested my script, using a text file with one item per line, and it worked exactly as expected.

Top
#168057 - 03/01/07 10:30 AM Re: help please [Re: RusselB]
learn3r Offline
Fjord artisan

Registered: 04/10/06
Posts: 342
text file is like this

fuck
dick
gay


(and i hope it'll kick like nick : gay_01 or ident: 01gay)

and I tried it just now and it crashes my mIRC ...


Edited by learn3r (03/01/07 10:39 AM)
_________________________
learn learn learn

Top
#168059 - 03/01/07 12:09 PM Re: help please [Re: learn3r]
Bundy Offline
Babel fish

Registered: 17/12/05
Posts: 54
Loc: Johannesburg, South Africa
I think it should look like this then:

*one*
*two*
*three*

Please correct me if I'm wrong!

Regards,

b

ps: thats not a script for a sex channel, now is it?! grin

Top
#168063 - 03/01/07 01:16 PM Re: help please [Re: learn3r]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
Code:
on @*:JOIN:#: {
  if (%badnick == on) {
    if ($nick == $me) { halt }
    :loop1
    inc %crap.nick 1
    var %nick.crap $read -l $+ %crap.nick $mircdir\badnicks.txt
    if (%nick.crap == $null) { goto loop2 }
    if (%nick.crap isin $nick) {
      if (%badnick.ban == on) ban -u [ $+ [ %badnick.time ] ] # $nick 3
      kick $chan $nick That was a bad nick.
      goto loop2
    }  
    goto loop1
    :loop2
    unset %crap.nick
  }
}

set %badnick on <- to enable this.
set %badnick.ban on <- if you also want to ban the user.
set %badnick.time 60 <- the ban will last for 1 minute.
all nick's u want to kick on should be stored in the file 'badnicks.txt'

I think this will work, untested tho...
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
Page 1 of 2 1 2 >