BeBot - An Anarchy Online and Age Of Conan chat automaton

Development => Module Requests => Topic started by: Swiftgank on May 11, 2007, 12:01:12 am

Title: Sensor module
Post by: Swiftgank on May 11, 2007, 12:01:12 am
Im having some problems with my bot, and i was wondering if its possible to make it sensor some words.. I want to make sure bot dont relay some words into the orgchat. Is anyone able to write a module that replaces a word with another?

Like if a person writes the F-word (forum replaces it with F*** so cant write it haha) then its replaced by ****?

the bot is in relay with another org and its kinda a problem with the other org swearing alot. but cant close the relay as we need it.
Title: Re: Sensor module
Post by: Blueeagle on May 11, 2007, 12:36:19 am
It is possible _BUT_ it will slow the bot down comparing every word of every sentence to a list even as short as ten words long.

Also, in my opinion, it would be more appropriate to manually enforce language use with bans and so on.

If I remember this when I get some spare time I can knock something together I think.
Title: Re: Sensor module
Post by: Alreadythere on May 11, 2007, 02:22:11 am
SVN version got a string filter written by Glara. You prolly can use it in 0.2 with slight modifications to the table calls and just plug it into the relay there.
Title: Re: Sensor module
Post by: Blueeagle on May 11, 2007, 10:36:17 am
...and that's what I get for not paying attention. :p
Title: Re: Sensor module
Post by: Swiftgank on May 11, 2007, 04:32:03 pm
hehe sounds great... guess il try finding this module then..
Title: Re: Sensor module
Post by: Glarawyn on May 12, 2007, 12:36:59 am
It is possible _BUT_ it will slow the bot down comparing every word of every sentence to a list even as short as ten words long.

I've been futzing with it (see SVN BeBot). As long as your filter list isn't huge performance isn't bad. The pirate and Swedish Chef translates are a bigger performance hit.  :P

As for censoring, you can do it two ways. The intended way is to build your own string list. The other way is using the censor output filter (via funfilters.) Censor has it's own word list that has been encoded with rot13 (cause swearing in code isn't cool.) The censor funfilter is a port of a perl filter.

I'll think I will remove the censor filter however. It's not "fun," and I don't want to dictate what should and should not be censored. I put it in there as it was just an easy perl to php example. ;)

As for the request of the original poster, the answer is maybe. The bot is only able to censor what the bot is outputing. It can't censor what others are saying via private group, tell, guild chat. If the issue is people are swearing like a sailor in the private group chat and the bot is relaying it to guild chat, then yes the output to guild chat could be run through the filter system.

Currently, most modules don't support the filter module. Only modules using BeBot's send_output function work. This is by design as there are plenty of situations where you want to do send_tell, send_pgmsg, or send_gc without any additional filtering.

The reccomendation to module coders will be if the bot is outputing data contributed by users (Logon messages, quotes, etc.) output should go through send_output. If you are sending text windows, menus, etc. you should use the send_tell, send_pgmsg, send_gc functions...

Clear as mud? :)
Title: Re: Sensor module
Post by: Karsta on March 04, 2010, 02:01:25 pm
Pirate was fun and chef is more fun
But chef mode is borking windows and colors etc so it spams too much
Chef mode :[Northern Star] Kbot: Toocmeta ettecked Escunseeuneen Eegeun (x9)!
Bork Bork Bork! <a hreff="text://Eegeun (914x583)
LCA: x9 - By zee Reefer (L 35 - 50)
Ettecker: Toocmeta (60 Meta-Physeeceest)
Deffundeeng Gooeeld: Escunseeun">Mure-a

Fudd : [Northern Star] Kbot: <font cowow=#DEDE42>[SadoWand] <font cowow=#FF63FF>Kawstas:<font cowow=#DEDE42> hmmm
when posting hmmm from irc
SimplePortal 2.3.7 © 2008-2024, SimplePortal