L* R*
HOME FORUM DOWNLOADS
Content
  Links
     Browse SVN
     SVN Commit log
     Documentation (Wiki)
  Developers
     Taskmanager
User
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2008, 05:25:26 PM

Login with username, password and session length
Search



Advanced search
Support GoPHP5.org
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Module Requests > Topic: Sensor module
Pages: [1]   Go Down
« previous next »
Print
Author Topic: Sensor module  (Read 312 times)
0 Members and 1 Guest are viewing this topic.
Swiftgank
Freshman
*
Offline Offline

Posts: 8


Sensor module
« on: May 10, 2007, 05:01:12 PM »

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.
« Last Edit: May 10, 2007, 05:03:33 PM by Swiftgank » Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Sensor module
« Reply #1 on: May 10, 2007, 05:36:19 PM »

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.
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Alreadythere
BeBot Maintainer
Administrator
Grandmaster
********
Offline Offline

Posts: 1076


Re: Sensor module
« Reply #2 on: May 10, 2007, 07:22:11 PM »

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.
Logged
Blueeagle
Omnipotent
BeBot Developer
Expert
********
Offline Offline

Gender: Male
Posts: 313



Re: Sensor module
« Reply #3 on: May 11, 2007, 03:36:17 AM »

...and that's what I get for not paying attention. :p
Logged

The only problem that can't be solved by adding another wrapper is having too many wrappers.
Swiftgank
Freshman
*
Offline Offline

Posts: 8


Re: Sensor module
« Reply #4 on: May 11, 2007, 09:32:03 AM »

hehe sounds great... guess il try finding this module then..
Logged
Glarawyn
BeBot Developer
Champion
********
Offline Offline

Posts: 414



Re: Sensor module
« Reply #5 on: May 11, 2007, 05:36:59 PM »

Quote from: Blueeagle on May 10, 2007, 05:36:19 PM
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.  Tongue

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. Wink

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? Smiley
Logged
Pages: [1]   Go Up
Print
BeBot - An Anarchy Online/Age Of Conan chat automaton > Forum > Development > Module Requests > Topic: Sensor module
« previous next »
 
Jump to:  

Recent
Log playtime from buddys ...
by Temar
[Today at 10:33:57 AM]

Vote Core module and Simp...
by Temar
[November 19, 2008, 09:26:52 AM]

Restrict access for one m...
by Organizer
[November 19, 2008, 03:21:19 AM]

Custom / Revised Modules ...
by Elesar1
[November 17, 2008, 03:51:46 PM]

TWC
by Temar
[November 16, 2008, 11:39:12 AM]

Are there any FUN modules...
by Elesar1
[November 15, 2008, 07:39:15 PM]

Call to a member function...
by exxie
[November 15, 2008, 09:29:31 AM]

Ported Modules
by Alreadythere
[November 14, 2008, 06:10:07 PM]

cURL and other non-defaul...
by Temar
[November 14, 2008, 04:11:44 PM]

Delete member from Bot al...
by Alreadythere
[November 14, 2008, 12:17:54 PM]
Stats
Members
Total Members: 1235
Latest: DDDepressionnn
Stats
Total Posts: 11034
Total Topics: 1495
Online Today: 15
Online Ever: 168
(July 01, 2007, 09:30:02 PM)
Users Online
Users: 3
Guests: 19
Total: 22
gerborg
End
Elesar1

Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
TinyPortal v0.9.8 © Bloc | NewDef design by Bloc
Page created in 0.384 seconds with 28 queries. (Pretty URLs adds 0.036s, 4q)
Loading...