| View previous topic :: View next topic |
| Author |
Message |
samkan Voice
Joined: 19 Feb 2016 Posts: 2
|
Posted: Fri Feb 19, 2016 10:57 am Post subject: Badword script is kicking owner |
|
|
Hallo together. I have a problem and I dont know how to fix it.
I get a tcl script for badwords from my friend on irc a lot of years ago. I am using the script for 5 years, but the bot is kicking me. I setup +protectfriends in egg.conf, but the bot still ban+kick me. Is the problem maybe in the badwords.tcl? Can you help me to add a line to say the bot he have to check first if the user has +fo flag?
Here is the tcl script:
| Code: | set badwords {
.
.
.
.
.
.
.
.
.
}
bind pubm - "*" pubm:badword
proc pubm:badword {nick uhost hand chan text} {
global badwords
if {[botisop $chan] && ![isbotnick $nick]} {
foreach badword $badwords {
if {[string match -nocase $badword $text]} {
putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
putquick "KICK $chan $nick :swearing!"
timer 20 [list putquick "MODE $chan -b *!*@[lindex [split $uhost @] 1]"]
}
}
}
}
putlog "Badword loaded" |
I hope you can help me. Thank you very much. |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Feb 19, 2016 1:08 pm Post subject: |
|
|
Test this.... | Code: |
set badwords {
.
.
.
.
.
.
.
.
.
}
bind pubm - "*" pubm:badword
proc pubm:badword {nick uhost hand chan text} {
global badwords
if {[matchattr $hand "fo"]} { return 0 }
if {[botisop $chan] && ![isbotnick $nick]} {
foreach badword $badwords {
if {[string match -nocase $badword $text]} {
putquick "MODE $chan +b *!*@[lindex [split $uhost @] 1]"
putquick "KICK $chan $nick :swearing!"
timer 20 [list putquick "MODE $chan -b *!*@[lindex [split $uhost @] 1]"]
break
}
}
}
return 0
}
putlog "Badword loaded"
|
_________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
samkan Voice
Joined: 19 Feb 2016 Posts: 2
|
Posted: Fri Feb 19, 2016 4:18 pm Post subject: |
|
|
| Yes, it works. But now the bot is only banning users, without kicking them :S |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Feb 19, 2016 6:52 pm Post subject: |
|
|
Sorry, nothing has been changed in that part of the code. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
|