egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Warn/kick/ban Script!!
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
i.m.offline
Halfop


Joined: 02 Mar 2006
Posts: 74

PostPosted: Sun Sep 02, 2007 9:20 am    Post subject: Warn/kick/ban Script!! Reply with quote

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.
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sun Sep 02, 2007 9:37 am    Post subject: Reply with quote

AllProtection can do that.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
i.m.offline
Halfop


Joined: 02 Mar 2006
Posts: 74

PostPosted: Sun Sep 02, 2007 9:40 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Sun Sep 02, 2007 7:43 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
i.m.offline
Halfop


Joined: 02 Mar 2006
Posts: 74

PostPosted: Tue Sep 04, 2007 1:20 am    Post subject: Thanks Reply with quote

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
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Tue Sep 04, 2007 8:59 am    Post subject: Reply with quote

There were similar requests before in this forum. Try to search for warn/kick examples.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
i.m.offline
Halfop


Joined: 02 Mar 2006
Posts: 74

PostPosted: Tue Sep 04, 2007 9:14 am    Post subject: Reply with quote

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?t=12595&highlight=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 Neutral
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Tue Sep 04, 2007 11:20 am    Post subject: Re: Warn/kick/ban Script!! Reply with quote

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
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
i.m.offline
Halfop


Joined: 02 Mar 2006
Posts: 74

PostPosted: Wed Sep 05, 2007 1:45 am    Post subject: Re: Warn/kick/ban Script!! Reply with quote

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 Smile


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.
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Sep 05, 2007 4:47 am    Post subject: Reply with quote

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.
_________________
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================


Last edited by awyeah on Wed Sep 05, 2007 4:56 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
i.m.offline
Halfop


Joined: 02 Mar 2006
Posts: 74

PostPosted: Wed Sep 05, 2007 4:51 am    Post subject: Reply with quote

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 Neutral
Back to top
View user's profile Send private message
awyeah
Revered One


Joined: 26 Apr 2004
Posts: 1580
Location: Switzerland

PostPosted: Wed Sep 05, 2007 4:55 am    Post subject: Reply with quote

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 Neutral


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.
==================================
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
i.m.offline
Halfop


Joined: 02 Mar 2006
Posts: 74

PostPosted: Wed Sep 05, 2007 5:10 am    Post subject: Reply with quote

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 Neutral


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 Smile really appreciated.

Ya it is already in script request section, seeking help :s wish me luck Wink haha
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Wed Sep 05, 2007 11:51 am    Post subject: Reply with quote

This should do it:
Code:
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 Laughing
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
i.m.offline
Halfop


Joined: 02 Mar 2006
Posts: 74

PostPosted: Thu Sep 06, 2007 1:15 am    Post subject: Reply with quote

Sir_Fz wrote:
This should do it:
Code:
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 Laughing


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 Smile thanks once again.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber