<s> from __future__ import division <EOL> import time <EOL> import supybot . conf as conf <EOL> import supybot . registry as registry <EOL> from supybot . i18n import PluginInternationalization , internationalizeDocstring <EOL> _ = PluginInternationalization ( '<STR_LIT>' ) <EOL> def configure ( advanced ) : <EOL> from supybot . questions import output , expect , anything , something , yn <EOL> conf . registerPlugin ( '<STR_LIT>' , True ) <EOL> if yn ( _ ( '<STR_LIT>' ) ) : <EOL> words = anything ( _ ( '<STR_LIT>' <EOL> '<STR_LIT>' ) ) <EOL> conf . supybot . plugins . BadWords . words . set ( words ) <EOL> class LastModifiedSetOfStrings ( registry . SpaceSeparatedSetOfStrings ) : <EOL> lastModified = <NUM_LIT:0> <EOL> def setValue ( self , v ) : <EOL> self . lastModified = time . time ( ) <EOL> registry . SpaceSeparatedListOfStrings . setValue ( self , v ) <EOL> BadWords = conf . registerPlugin ( '<STR_LIT>' ) <EOL> conf . registerGlobalValue ( BadWords , '<STR_LIT>' , <EOL> LastModifiedSetOfStrings ( [ ] , _ ( """<STR_LIT>""" ) ) ) <EOL> conf . registerChannelValue ( BadWords , '<STR_LIT>' , <EOL> registry . Boolean ( False , _ ( """<STR_LIT>""" ) ) ) <EOL> class String256 ( registry . String ) : <EOL> def __call__ ( self ) : <EOL> s = registry . String . __call__ ( self ) <EOL> return s * ( <NUM_LIT> // len ( s ) ) <EOL> def __str__ ( self ) : <EOL> return self . value <EOL> conf . registerGlobalValue ( BadWords , '<STR_LIT>' , <EOL> String256 ( '<STR_LIT>' , _ ( """<STR_LIT>""" ) ) ) <EOL> class ReplacementMethods ( registry . OnlySomeStrings ) : <EOL> validStrings = ( '<STR_LIT>' , '<STR_LIT>' ) <EOL> conf . registerGlobalValue ( BadWords , '<STR_LIT>' , <EOL> ReplacementMethods ( '<STR_LIT>' , _ ( """<STR_LIT>""" ) ) ) <EOL> conf . registerGlobalValue ( BadWords , '<STR_LIT>' , <EOL> registry . String ( '<STR_LIT>' , _ ( """<STR_LIT>""" ) ) ) <EOL> conf . registerGlobalValue ( BadWords , '<STR_LIT>' , <EOL> registry . Boolean ( True , _ ( """<STR_LIT>""" ) ) ) <EOL> conf . registerChannelValue ( BadWords , '<STR_LIT>' , <EOL> registry . Boolean ( False , _ ( """<STR_LIT>""" ) ) ) <EOL> conf . registerChannelValue ( BadWords . kick , '<STR_LIT:message>' , <EOL> registry . NormalizedString ( _ ( """<STR_LIT>""" ) , _ ( """<STR_LIT>""" ) ) ) </s>
