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.

Bad word script doesn't ban if bad word is told in action

Old posts that have not been replied to for several years.
Locked
N
Nucleus
Voice
Posts: 34
Joined: Fri Jul 09, 2004 3:35 am

Bad word script doesn't ban if bad word is told in action

Post by Nucleus »

Code: Select all

bind pubm - "*badword*" swproc
 

set swdura 600
set swkick "Swearing"

######## CODE - DO NOT TOUCH ########


proc swproc {nick uhost hand chan rest} {
	if {[isop $nick $chan] == "0"} {
		global swmask swkick swdura
		set swmask *!*@[lindex [split [getchanhost $nick $chan] "@"] 1]
		putquick "MODE $chan +b $swmask" -next
		putquick "KICK $chan $nick :$swkick" -next
		utimer $swdura "putserv {MODE $chan -b $swmask}"
		return 1
	}
}

putlog "=====>> Swearing"
[20:33:00] * nickname1 throws nickname2 on board a ship with russian sailors, and watches him get badword by them all !!!

It only bans people if they say a bad word. It wont ban them if the bad word is an action.
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Code: Select all

bind ctcp - ACTION ctcp:badword

proc ctcp:badword {nick uhost hand chan keyword text} {
 if [string match -noc *badword* $text] {
  swproc $nick $uhost $hand $chan $text
 }
}
N
Nucleus
Voice
Posts: 34
Joined: Fri Jul 09, 2004 3:35 am

Post by Nucleus »

Where do i paste your code?

The script goes like this:

Code: Select all

bind pubm - "*badword1*" swproc
bind pubm - "*badword2*" swproc
bind pubm - "*badword3*" swproc
bind pubm - "*badword4*" swproc
bind pubm - "*badword5*" swproc 
  

set swdura 600 
set swkick "Swearing" 

######## CODE - DO NOT TOUCH ######## 


proc swproc {nick uhost hand chan rest} { 
   if {[isop $nick $chan] == "0"} { 
      global swmask swkick swdura 
      set swmask *!*@[lindex [split [getchanhost $nick $chan] "@"] 1] 
      putquick "MODE $chan +b $swmask" -next 
      putquick "KICK $chan $nick :$swkick" -next 
      utimer $swdura "putserv {MODE $chan -b $swmask}" 
      return 1 
   } 
} 

putlog "=====>> Swearing"
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Like this:

Code: Select all

bind ctcp - ACTION ctcp:badword

proc ctcp:badword {nick uhost hand chan keyword text} {
 if {[string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text] || [string match -nocase *badword* $text]} {
  swproc $nick $uhost $hand $chan $text
 }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
N
Nucleus
Voice
Posts: 34
Joined: Fri Jul 09, 2004 3:35 am

Post by Nucleus »

Still not working.

[08:52:12] <Nucleus> test [censored]
[08:52:20] * eggdrop1 sets mode: +b *!*@nucleus.users.undernet.org
[08:52:20] * You were kicked by eggdrop1 (Swearing)
[08:52:20] * Attempting to rejoin channel #test1
[08:52:22] * Rejoined channel #test1
[08:52:33] * Nucleus test [censored]
[08:52:34] <user1> hi aristos:)
[08:52:39] <Nucleus> user1, hi
[08:52:44] <user1> :)
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

It might be easier to get hold a script that is already written and already proven to work well. Might I suggest Bad Words v5.1.12 by MC_8. This script reacts on actions etc.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
N
Nucleus
Voice
Posts: 34
Joined: Fri Jul 09, 2004 3:35 am

Post by Nucleus »

Yes but that script puts the ban in the bots internal banlist. Not a channel ban. so we have to start tweaking that script now. This script is working fine, and very fast. It's just this /me problem :?
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Code: Select all

# This is the ban time (in MIN.s)
#  set this to 0 to not add a ban in bot's banlist, just put a ban on the server (|hellman|)
#  set to anything greater than 0 for actuall bot's ban time.
#  set to -1 to turn off banning (MC_8)
set mc_time 120
:P
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Presumption is the mother of all f$&*ups :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
N
Nucleus
Voice
Posts: 34
Joined: Fri Jul 09, 2004 3:35 am

Post by Nucleus »

You're right, i was wrong. But i dont want to use a 3582 lines script. I like my little 62 lines script. Can it be fixed to ban bad words in actions?
D
Dizzle
Op
Posts: 109
Joined: Thu Apr 28, 2005 11:21 am
Contact:

Post by Dizzle »

there are dozens of badword scripts, study them and make one yourself :)
N
Nucleus
Voice
Posts: 34
Joined: Fri Jul 09, 2004 3:35 am

Post by Nucleus »

damn, why didn't i think of that! Thanks :lol:
Locked