This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Warn/kick/ban Script!!

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Warn/kick/ban Script!!

Post by i.m.offline »

Hello Friends,

can some1 suggest me any script which warns/kicks/bans on specified words. Tried searching around but couldn't find any.

Thanks in advance.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

AllProtection can do that.
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

Sir_Fz wrote:AllProtection can do that.
Thanks bro, one of the gr8 written script of yours, which I am already using for protection.

apart from it, as our channel is English / Arabic only. I wanted an separate code for w/k/b on specific other language common words to kick/ban with different kick msg & warning so I requested for a separate code.

Thanks for your response. Thanks
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Simply translate and edit the text output yourself; it's quite simple and needs to be done carefully.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Thanks

Post by i.m.offline »

Thanks for the response mate, I was unable to find the clue how to even start over and ain't so good at it so requested for it :s
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

There were similar requests before in this forum. Try to search for warn/kick examples.
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

Thanks again for taking your precious time to reply
I couldn't find any similar post than myself posted earlier here ---> http://forum.egghelp.org/viewtopic.php? ... =warn+kick

I followed the suggestion of mavericku
but now I found out there is some error like, when I add word lets say "Kya"
so it triggers even on LuckyAngel, I tried to change string to "* kya *" but then it trigger on that.

Not sure how to get it work right or if there is something I am messing up with :|
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Re: Warn/kick/ban Script!!

Post by TCL_no_TK »

Check out MC_8's badword script, it has exempt words and alot other features. This is probably in the TCL Archive, but heres a direct link to the scripts page on his MC_8's website http://mc.purehype.net/index.tcl?info=Bad+Words. Hope it helps
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Re: Warn/kick/ban Script!!

Post by i.m.offline »

TCL_no_TK wrote:Check out MC_8's badword script, it has exempt words and alot other features. This is probably in the TCL Archive, but heres a direct link to the scripts page on his MC_8's website http://mc.purehype.net/index.tcl?info=Bad+Words. Hope it helps
Thanks for the reply mate, I will try that. Thanks again :)


Edited:

I tried working with it but dont find any option to make it work like warn/kick/ban. Somehow it seems so huge code for swear! maybe I m wrong.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Its easy enough:

Once a swear word is detected from a user, add that nick into an array and say set a value of 1 and warn that user. If that user says another swear word, check the array for that user, if found you check the value of the array, if say 1, means you warned him already, so increment the value to 2 and kick him. If he says another swear word, check the array again for the nick if found, check the value again, if it is 2, then you kick and ban that user. After that remove that nick from the array.
Last edited by awyeah on Wed Sep 05, 2007 4:56 am, edited 1 time in total.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

awyeah wrote:Its easy enough:

Once a swear word is detected from a user, add that nick into an array and say set a value of 1 and warn that user. If that user says another swear word, check the array for that user, if found you check the value of the array, if say 1, means you warned him already, so increment the value to 2 and kick him. If he says another swear word, check the array again for the nick if found, check the value again, if it is 2, then you kick and ban that user.
Thanks for the advice and guideline Awyeah. M complete noob on tcl so I requested if any1 came across such code :|
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

i.m.offline wrote:
awyeah wrote:Its easy enough:

Once a swear word is detected from a user, add that nick into an array and say set a value of 1 and warn that user. If that user says another swear word, check the array for that user, if found you check the value of the array, if say 1, means you warned him already, so increment the value to 2 and kick him. If he says another swear word, check the array again for the nick if found, check the value again, if it is 2, then you kick and ban that user.
Thanks for the advice and guideline Awyeah. M complete noob on tcl so I requested if any1 came across such code :|
Sorry, I wouldn't have any time to code something like this for you, since I am quite busy with alot of work currently. You can however, request it in the scripts request section and hope someone helps you with it.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

awyeah wrote:
i.m.offline wrote:
awyeah wrote:Its easy enough:

Once a swear word is detected from a user, add that nick into an array and say set a value of 1 and warn that user. If that user says another swear word, check the array for that user, if found you check the value of the array, if say 1, means you warned him already, so increment the value to 2 and kick him. If he says another swear word, check the array again for the nick if found, check the value again, if it is 2, then you kick and ban that user.
Thanks for the advice and guideline Awyeah. M complete noob on tcl so I requested if any1 came across such code :|
Sorry, I wouldn't have any time to code something like this for you, since I am quite busy with alot of work currently. You can however, request it in the scripts request section and hope someone helps you with it.
Thanks a lot for sparing sometime and giving good guideline for that :) really appreciated.

Ya it is already in script request section, seeking help :s wish me luck ;) haha
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

This should do it:

Code: Select all

set wkb(words) {
 *word1*
 "word2 *"
 "* words"
}

set wkb(time) 60 ; # time in seconds

set wkb(warn) "you've said a bad word...etc"

set wkb(kick) "you've said a bad word...etc"

bind pubm - * warnkickban

proc warnkickban {nick uhost hand chan arg} {
 global wkb
 set match 0
 foreach word $wkb(words) {
  if {[string match -nocase $word $arg]} {
   set match 1
   break
  }
 }
 if {$match} {
  set o [throttled $nick:$uhost $wkb(time)]
  if {$o == 1} {
   puthelp "notice $nick :$wkb(warn)"
  } {
   putserv "kick $chan $nick :$wkb(kick)"
   if {$o > 2} {
    putserv "mode $chan +b *!*@[lindex [split $uhost @] 1]"
   }
  }
 }
}

# user's throttled procedure with slight modification
proc throttled {id time} {
 global throttled
 if {[info exists throttled($id)]} {
  incr throttled($id)
 } {
  set throttled($id) 1
  utimer $time [list unset throttled($id)]
 }
 return $throttled($id)
}
It feels like it's been years since I last wrote something in Tcl :lol:
i
i.m.offline
Halfop
Posts: 74
Joined: Thu Mar 02, 2006 11:47 am

Post by i.m.offline »

Sir_Fz wrote:This should do it:

Code: Select all

set wkb(words) {
 *word1*
 "word2 *"
 "* words"
}

set wkb(time) 60 ; # time in seconds

set wkb(warn) "you've said a bad word...etc"

set wkb(kick) "you've said a bad word...etc"

bind pubm - * warnkickban

proc warnkickban {nick uhost hand chan arg} {
 global wkb
 set match 0
 foreach word $wkb(words) {
  if {[string match -nocase $word $arg]} {
   set match 1
   break
  }
 }
 if {$match} {
  set o [throttled $nick:$uhost $wkb(time)]
  if {$o == 1} {
   puthelp "notice $nick :$wkb(warn)"
  } {
   putserv "kick $chan $nick :$wkb(kick)"
   if {$o > 2} {
    putserv "mode $chan +b *!*@[lindex [split $uhost @] 1]"
   }
  }
 }
}

# user's throttled procedure with slight modification
proc throttled {id time} {
 global throttled
 if {[info exists throttled($id)]} {
  incr throttled($id)
 } {
  set throttled($id) 1
  utimer $time [list unset throttled($id)]
 }
 return $throttled($id)
}
It feels like it's been years since I last wrote something in Tcl :lol:
Thanks a lot bro for the help. I will give it a try.
Just one confusion - it will reset the offence in 60 sec? which means if the user says the bad word after 60 sec, it will again start from 1st level?
Please correct me if am wrong.

And if I understand it right then I will increase the time :) thanks once again.
Post Reply