BigBrotherBot v1.9.0
System Development Information for the BigBrotherBot project.

b3::plugins::censor::CensorPlugin Class Reference

Inheritance diagram for b3::plugins::censor::CensorPlugin:
b3::plugin::Plugin b3::plugin::Plugin

List of all members.

Public Member Functions

def onStartup
def onLoadConfig
def onEvent
def penalizeClient
def penalizeClientBadname
def checkBadName
def checkBadWord
def clean
def onStartup
def onLoadConfig
def onEvent
def penalizeClient
def penalizeClientBadname
def checkBadName
def checkBadWord
def clean

Private Member Functions

def _add_bad_word
def _add_bad_name
def _getCensorData
def _add_bad_word
def _add_bad_name
def _getCensorData

Private Attributes

 _maxLevel
 _ignoreLength
 _defaultBadWordPenalty
 _defaultBadNamePenalty
 _badWords
 _badNames

Static Private Attributes

 _adminPlugin = None
tuple _reClean = re.compile(r'[^0-9a-z ]+', re.I)
tuple _defaultBadWordPenalty = PenaltyData(type="warning", keyword="cuss")
tuple _defaultBadNamePenalty = PenaltyData(type="warning", keyword="badname")
int _maxLevel = 0
int _ignoreLength = 3

Member Function Documentation

def b3::plugins::censor::CensorPlugin::_add_bad_name (   self,
  rulename,
  penalty = None,
  word = None,
  regexp = None 
) [private]
def b3::plugins::censor::CensorPlugin::_add_bad_name (   self,
  rulename,
  penalty = None,
  word = None,
  regexp = None 
) [private]
def b3::plugins::censor::CensorPlugin::_add_bad_word (   self,
  rulename,
  penalty = None,
  word = None,
  regexp = None 
) [private]
def b3::plugins::censor::CensorPlugin::_add_bad_word (   self,
  rulename,
  penalty = None,
  word = None,
  regexp = None 
) [private]
def b3::plugins::censor::CensorPlugin::_getCensorData (   self,
  name,
  regexp,
  penalty,
  defaultPenalty 
) [private]
def b3::plugins::censor::CensorPlugin::_getCensorData (   self,
  name,
  regexp,
  penalty,
  defaultPenalty 
) [private]
def b3::plugins::censor::CensorPlugin::checkBadName (   self,
  client 
)
def b3::plugins::censor::CensorPlugin::checkBadName (   self,
  client 
)
def b3::plugins::censor::CensorPlugin::checkBadWord (   self,
  text,
  client 
)
def b3::plugins::censor::CensorPlugin::checkBadWord (   self,
  text,
  client 
)
def b3::plugins::censor::CensorPlugin::clean (   self,
  data 
)
def b3::plugins::censor::CensorPlugin::clean (   self,
  data 
)
def b3::plugins::censor::CensorPlugin::onEvent (   self,
  event 
)
\
Called by B3 when a registered event is encountered. You must overwrite
this to intercept events.

Reimplemented from b3::plugin::Plugin.

def b3::plugins::censor::CensorPlugin::onEvent (   self,
  event 
)
\
Called by B3 when a registered event is encountered. You must overwrite
this to intercept events.

Reimplemented from b3::plugin::Plugin.

def b3::plugins::censor::CensorPlugin::onLoadConfig (   self)
\
This is called after loadConfig(). Any plugin private variables loaded
from the config need to be reset here.

Reimplemented from b3::plugin::Plugin.

def b3::plugins::censor::CensorPlugin::onLoadConfig (   self)
\
This is called after loadConfig(). Any plugin private variables loaded
from the config need to be reset here.

Reimplemented from b3::plugin::Plugin.

def b3::plugins::censor::CensorPlugin::onStartup (   self)
\
Called after the plugin is created before it is started. Overwrite this
for anything you need to initialize you plugin with.

Reimplemented from b3::plugin::Plugin.

def b3::plugins::censor::CensorPlugin::onStartup (   self)
\
Called after the plugin is created before it is started. Overwrite this
for anything you need to initialize you plugin with.

Reimplemented from b3::plugin::Plugin.

def b3::plugins::censor::CensorPlugin::penalizeClient (   self,
  penalty,
  client,
  data = '' 
)
\
This is the default penalisation for using bad language in say and teamsay
def b3::plugins::censor::CensorPlugin::penalizeClient (   self,
  penalty,
  client,
  data = '' 
)
\
This is the default penalisation for using bad language in say and teamsay
def b3::plugins::censor::CensorPlugin::penalizeClientBadname (   self,
  penalty,
  client,
  data = '' 
)
\
This is the penalisation for bad names
def b3::plugins::censor::CensorPlugin::penalizeClientBadname (   self,
  penalty,
  client,
  data = '' 
)
\
This is the penalisation for bad names

Member Data Documentation

tuple b3::plugins::censor::CensorPlugin::_defaultBadNamePenalty = PenaltyData(type="warning", keyword="badname") [static, private]
tuple b3::plugins::censor::CensorPlugin::_defaultBadWordPenalty = PenaltyData(type="warning", keyword="cuss") [static, private]
tuple b3::plugins::censor::CensorPlugin::_reClean = re.compile(r'[^0-9a-z ]+', re.I) [static, private]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Properties