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 

Badword script is kicking owner

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
samkan
Voice


Joined: 19 Feb 2016
Posts: 2

PostPosted: Fri Feb 19, 2016 10:57 am    Post subject: Badword script is kicking owner Reply with quote

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
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Fri Feb 19, 2016 1:08 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
samkan
Voice


Joined: 19 Feb 2016
Posts: 2

PostPosted: Fri Feb 19, 2016 4:18 pm    Post subject: Reply with quote

Yes, it works. But now the bot is only banning users, without kicking them :S
Back to top
View user's profile Send private message
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Fri Feb 19, 2016 6:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
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