collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18366
  • stats Total Topics: 2501
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Sensor module  (Read 12180 times)

0 Members and 2 Guests are viewing this topic.

Offline Swiftgank

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Sensor module
« 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.
« Last Edit: May 11, 2007, 12:03:33 am by Swiftgank »

Offline Blueeagle

  • Omnipotent
  • BeBot Hero
  • ******
  • Posts: 323
  • Karma: +0/-0
Re: Sensor module
« Reply #1 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.
The only problem that can't be solved by adding another wrapper is having too many wrappers.

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: Sensor module
« Reply #2 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.

Offline Blueeagle

  • Omnipotent
  • BeBot Hero
  • ******
  • Posts: 323
  • Karma: +0/-0
Re: Sensor module
« Reply #3 on: May 11, 2007, 10:36:17 am »
...and that's what I get for not paying attention. :p
The only problem that can't be solved by adding another wrapper is having too many wrappers.

Offline Swiftgank

  • BeBot Rookie
  • *
  • Posts: 8
  • Karma: +0/-0
Re: Sensor module
« Reply #4 on: May 11, 2007, 04:32:03 pm »
hehe sounds great... guess il try finding this module then..

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Sensor module
« Reply #5 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? :)

Offline Karsta

  • BeBot User
  • **
  • Posts: 28
  • Karma: +0/-0
Re: Sensor module
« Reply #6 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
« Last Edit: March 04, 2010, 02:07:51 pm by Karsta »

 

* Recent Posts
Com bot module by bitnykk
[November 25, 2024, 05:36:11 pm ]


0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]

* Who's Online
  • Dot Guests: 333
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal