def registerBugzilla(name, url=''): if (not re.match('\w+$', name)): s = utils.str.normalizeWhitespace(BugzillaName.__doc__) raise registry.InvalidRegistryValue("%s (%s)" % (s, name)) install = conf.registerGroup(conf.supybot.plugins.Bugzilla.bugzillas, name.lower()) conf.registerGlobalValue(install, 'url', registry.String(url, """Determines the URL to this Bugzilla installation. This must be identical to the urlbase (or sslbase) parameter used by the installation. (The url that shows up in emails.) It must end with a forward slash.""")) conf.registerChannelValue(install, 'queryTerms', registry.String('', """Additional search terms in QuickSearch format, that will be added to every search done with "query" against this installation.""")) # conf.registerGlobalValue(install, 'aliases', # BugzillaNames([], """Alternate names for this Bugzilla # installation. These must be globally unique.""")) conf.registerGroup(install, 'watchedItems', orderAlphabetically=True) conf.registerChannelValue(install.watchedItems, 'product', registry.CommaSeparatedListOfStrings([], """What products should be reported to this channel?""")) conf.registerChannelValue(install.watchedItems, 'component', registry.CommaSeparatedListOfStrings([], """What components should be reported to this channel?""")) conf.registerChannelValue(install.watchedItems, 'changer', registry.SpaceSeparatedListOfStrings([], """Whose changes should be reported to this channel?""")) conf.registerChannelValue(install.watchedItems, 'all', registry.Boolean(False, """Should *all* changes be reported to this channel?""")) conf.registerChannelValue(install, 'reportedChanges', registry.CommaSeparatedListOfStrings(['newBug', 'newAttach', 'Flags', 'Attachment Flags', 'Resolution', 'Product', 'Component'], """The names of fields, as they appear in bugmail, that should be reported to this channel.""")) conf.registerGroup(install, 'traces') conf.registerChannelValue(install.traces, 'report', registry.Boolean(False, """Some Bugzilla installations have gdb stack traces in comments. If you turn this on, the bot will report some basic details of any trace that shows up in the comments of a new bug.""")) conf.registerChannelValue(install.traces, 'ignoreFunctions', registry.SpaceSeparatedListOfStrings(['__kernel_vsyscall', 'raise', 'abort', '??'], """Some functions are useless to report, from a stack trace. This contains a list of function names to skip over when reporting traces to the channel.""")) #conf.registerChannelValue(install.traces, 'crashStarts', # registry.CommaSeparatedListOfStrings([], # """These are function names that indicate where a crash starts # in a stack trace.""")) conf.registerChannelValue(install.traces, 'frameLimit', registry.PositiveInteger(5, """How many stack frames should be reported from the crash?"""))
def clear_repos(self): "Remove all defined repositories." plugin_group = conf.supybot.plugins.get('Git') try: plugin_group.unregister('repos') except registry.NonExistentRegistryEntry: pass conf.registerGroup(plugin_group, 'repos') conf.supybot.plugins.Git.repolist.setValue('') self.assertNotError('reload Git') expected = ['The operation succeeded.', 'Git reinitialized with 0 repositories.', 'The operation succeeded.' ] self.assertResponses('reload Git', expected)
def register_feed_config(self, name, url=''): self.registryValue('feeds').add(name) group = self.registryValue('feeds', value=False) conf.registerGlobalValue( group, name, registry.String( url, """The URL for the feed %s. Note that because announced lines are cached, you may need to reload this plugin after changing this option.""" % name)) feed_group = conf.registerGroup(group, name) conf.registerChannelValue( feed_group, 'format', registry.String( '', _("""Feed-specific format. Defaults to supybot.plugins.RSS.format if empty."""))) conf.registerChannelValue( feed_group, 'announceFormat', registry.String( '', _("""Feed-specific announce format. Defaults to supybot.plugins.RSS.announceFormat if empty."""))) conf.registerGlobalValue( feed_group, 'waitPeriod', registry.NonNegativeInteger( 0, _("""If set to a non-zero value, overrides supybot.plugins.RSS.waitPeriod for this particular feed.""")))
def register_feed_config(self, name, url=''): self.registryValue('feeds').add(name) group = self.registryValue('feeds', value=False) conf.registerGlobalValue(group, name, registry.String(url, '')) feed_group = conf.registerGroup(group, name) conf.registerChannelValue(feed_group, 'format', registry.String('', _("""Feed-specific format. Defaults to supybot.plugins.RSS.format if empty."""))) conf.registerChannelValue(feed_group, 'announceFormat', registry.String('', _("""Feed-specific announce format. Defaults to supybot.plugins.RSS.announceFormat if empty.""")))
def register_jira_install(self, handle): group = conf.registerGroup(conf.supybot.plugins.JIRA.installs, handle) conf.registerGlobalValue(group, "url", registry.String("", "URL of the JIRA install, e.g. " \ "http://issues.foresightlinux.org/jira")) conf.registerGlobalValue(group, "username", registry.String("", "Username to login the JIRA install", private=True)) conf.registerGlobalValue(group, "password", registry.String("", "Password to login the JIRA install", private=True))
def repo_option(reponame, option): ''' Return a repo-specific option, registering on the fly. ''' repos = global_option('repos') try: repo = repos.get(reponame) except registry.NonExistentRegistryEntry: repo = conf.registerGroup(repos, reponame) try: return repo.get(option) except registry.NonExistentRegistryEntry: conf.registerGlobalValue(repo, option, _REPO_OPTIONS[option]()) return repo.get(option)
def watch_option(watchname, option): ''' Return a watch-specific option, registering on the fly. ''' watches = global_option('watches') try: watch = watches.get(watchname) except registry.NonExistentRegistryEntry: watch = conf.registerGroup(watches, watchname) try: return watch.get(option) except registry.NonExistentRegistryEntry: conf.registerGlobalValue(watch, option, _WATCH_OPTIONS[option]()) return watch.get(option)
def register_feed_config(self, name, url=''): self.registryValue('feeds').add(name) group = self.registryValue('feeds', value=False) conf.registerGlobalValue(group, name, registry.String(url, '')) feed_group = conf.registerGroup(group, name) conf.registerChannelValue(feed_group, 'format', registry.String('', _("""Feed-specific format. Defaults to supybot.plugins.RSS.format if empty."""))) conf.registerChannelValue(feed_group, 'announceFormat', registry.String('', _("""Feed-specific announce format. Defaults to supybot.plugins.RSS.announceFormat if empty."""))) conf.registerGlobalValue(feed_group, 'waitPeriod', registry.NonNegativeInteger(0, _("""If set to a non-zero value, overrides supybot.plugins.RSS.waitPeriod for this particular feed.""")))
def registerBugtracker(name, url='', description='', trackertype=''): conf.supybot.plugins.Bugtracker.bugtrackers().add(name) group = conf.registerGroup(conf.supybot.plugins.Bugtracker.bugtrackers, name) URL = conf.registerGlobalValue(group, 'url', registry.String(url, '')) DESC = conf.registerGlobalValue(group, 'description', registry.String(description, '')) TRACKERTYPE = conf.registerGlobalValue(group, 'trackertype', registry.String(trackertype, '')) if url: URL.setValue(url) if description: DESC.setValue(description) if trackertype: if defined_bugtrackers.has_key(trackertype.lower()): TRACKERTYPE.setValue(trackertype.lower()) else: raise BugtrackerError("Unknown trackertype: %s" % trackertype)
def register_feed_config(self, name, url=''): self.registryValue('feeds').add(name) group = self.registryValue('feeds', value=False) conf.registerGlobalValue(group, name, registry.String(url, '')) feed_group = conf.registerGroup(group, name) conf.registerChannelValue( feed_group, 'format', registry.String( '', _("""Feed-specific format. Defaults to supybot.plugins.RSS.format if empty."""))) conf.registerChannelValue( feed_group, 'announceFormat', registry.String( '', _("""Feed-specific announce format. Defaults to supybot.plugins.RSS.announceFormat if empty.""")))
def register_feed_config(self, name, url=''): self.registryValue('feeds').add(name) group = self.registryValue('feeds', value=False) conf.registerGlobalValue(group, name, registry.String(url, """The URL for the feed %s. Note that because announced lines are cached, you may need to reload this plugin after changing this option.""" % name)) feed_group = conf.registerGroup(group, name) conf.registerChannelValue(feed_group, 'format', registry.String('', _("""Feed-specific format. Defaults to supybot.plugins.RSS.format if empty."""))) conf.registerChannelValue(feed_group, 'announceFormat', registry.String('', _("""Feed-specific announce format. Defaults to supybot.plugins.RSS.announceFormat if empty."""))) conf.registerGlobalValue(feed_group, 'waitPeriod', registry.NonNegativeInteger(0, _("""If set to a non-zero value, overrides supybot.plugins.RSS.waitPeriod for this particular feed.""")))
conf.registerChannelValue(Rweb, 'nonSnarfingRegexp', registry.Regexp(None, _("""Determines what URLs matching the given regexp will not be snarfed. Give the empty string if you have no URLs that you'd like to exclude from being snarfed."""))) conf.registerChannelValue(Rweb, 'checkIgnored', registry.Boolean(True, _("""Determines whether the title snarfer checks if the author of a message is ignored."""))) conf.registerGlobalValue(Rweb, 'urlWhitelist', registry.SpaceSeparatedListOfStrings([], """If set, bot will only fetch data from urls in the whitelist, i.e. starting with http://domain/optionalpath/. This will apply to all commands that retrieve data from user-supplied URLs, including fetch, headers, title, doctype.""")) conf.registerGlobalValue(Rweb, 'timeout', registry.NonNegativeInteger(5, """Determines the maximum number of seconds the bot will wait for the site to respond, when using a command in this plugin other than 'fetch'. If 0, will use socket.defaulttimeout""")) conf.registerGroup(Rweb, 'fetch') conf.registerGlobalValue(Rweb.fetch, 'maximum', registry.NonNegativeInteger(0, _("""Determines the maximum number of bytes the bot will download via the 'fetch' command in this plugin."""))) conf.registerGlobalValue(Rweb.fetch, 'timeout', registry.NonNegativeInteger(5, """Determines the maximum number of seconds the bot will wait for the site to respond, when using the 'fetch' command in this plugin. If 0, will use socket.defaulttimeout""")) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
# user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import output, expect, anything, something, yn conf.registerPlugin('Unix', True) output( _("""The "progstats" command can reveal potentially sensitive information about your machine. Here's an example of its output: %s\n""") % progstats()) if yn(_('Would you like to disable this command for non-owner users?'), default=True): conf.supybot.commands.disabled().add('Unix.progstats') Unix = conf.registerPlugin('Unix') conf.registerGroup(Unix, 'fortune') conf.registerGlobalValue( Unix.fortune, 'command', registry.String( utils.findBinaryInPath('fortune') or '', _("""Determines what command will be called for the fortune command."""))) conf.registerChannelValue( Unix.fortune, 'short', registry.Boolean( True, _("""Determines whether only short fortunes will be used if possible. This sends the -s option to the fortune program."""))) conf.registerGlobalValue( Unix.fortune, 'equal', registry.Boolean(
# without the i18n module _ = lambda x: x from .local import accountsdb def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified themself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('NuWeather', True) NuWeather = conf.registerPlugin('NuWeather') conf.registerGroup(NuWeather, 'apikeys') conf.registerGroup(NuWeather, 'units') conf.registerGlobalValue(NuWeather, accountsdb.CONFIG_OPTION_NAME, accountsdb.CONFIG_OPTION) class NuWeatherTemperatureDisplayMode(registry.OnlySomeStrings): validStrings = ('F/C', 'C/F', 'F', 'C') conf.registerChannelValue(NuWeather.units, 'temperature', NuWeatherTemperatureDisplayMode('F/C', _("""Determines how temperatures will be displayed. F/C means show "50F/10C", C means display only Celsius, and so on."""))) BACKENDS = ('darksky', 'apixu') GEOCODE_BACKENDS = ('nominatim', 'googlemaps', 'opencage') class NuWeatherBackend(registry.OnlySomeStrings): validStrings = BACKENDS class NuWeatherGeocode(registry.OnlySomeStrings):
return level class LogLevel(ValidLogLevel): """Invalid log level. Value must be either DEBUG, INFO, WARNING, ERROR, or CRITICAL.""" handler = _handler class StdoutLogLevel(ValidLogLevel): """Invalid log level. Value must be either DEBUG, INFO, WARNING, ERROR, or CRITICAL.""" handler = _stdoutHandler conf.registerGroup(conf.supybot, 'log') conf.registerGlobalValue( conf.supybot.log, 'format', registry.String( '%(levelname)s %(asctime)s %(name)s %(message)s', """Determines what the bot's logging format will be. The relevant documentation on the available formattings is Python's documentation on its logging module.""")) conf.registerGlobalValue( conf.supybot.log, 'level', LogLevel( logging.INFO, """Determines what the minimum priority level logged to file will be. Do note that this value does not affect the level logged to stdout; for that, you should set the value of supybot.log.stdout.level. Valid values are DEBUG, INFO, WARNING, ERROR, and CRITICAL, in order of increasing priority."""))
### import supybot.conf as conf import supybot.registry as registry def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('String', True) String = conf.registerPlugin('String') conf.registerGroup(String, 'levenshtein') conf.registerGlobalValue(String.levenshtein, 'max', registry.PositiveInteger(256, """Determines the maximum size of a string given to the levenshtein command. The levenshtein command uses an O(m*n) algorithm, which means that with strings of length 256, it can take 1.5 seconds to finish; with strings of length 384, though, it can take 4 seconds to finish, and with strings of much larger lengths, it takes more and more time. Using nested commands, strings can get quite large, hence this variable, to limit the size of arguments passed to the levenshtein command.""")) conf.registerGroup(String, 're') conf.registerGlobalValue(String.re, 'timeout', registry.PositiveFloat(0.1, """Determines the maximum time, in seconds, that a regular expression is given to execute before being terminated. Since there is a possibility that user input for the re command can cause it to eat up large amounts of ram or cpu time, it's a good idea to keep this
registry.Boolean( False, """Determines whether messages addressed to the bot are ignored.""")) conf.registerChannelValue( ArtificialIntelligence, 'minChainLength', registry.PositiveInteger( 1, """Determines the length of the smallest chain which the markov command will generate.""")) conf.registerChannelValue( ArtificialIntelligence, 'maxAttempts', registry.PositiveInteger( 1, """Determines the maximum number of times the bot will attempt to generate a chain that meets or exceeds the size set in minChainLength.""")) conf.registerGroup(ArtificialIntelligence, 'randomSpeaking') conf.registerChannelValue( ArtificialIntelligence.randomSpeaking, 'probability', registry.Probability( 0, """Determines the probability that will be checked against to determine whether the bot should randomly say something. If 0, the bot will never say anything on it's own. If 1, the bot will speak every time we make a check.""")) conf.registerChannelValue( ArtificialIntelligence.randomSpeaking, 'maxDelay', registry.PositiveInteger( 10, """Determines the upper bound for how long the bot will wait before randomly speaking. The delay is a randomly generated number of seconds below the value of this config variable.""")) conf.registerChannelValue(
you have a vhost that isn't set until you're identified, or if you're joining +r channels that won't allow you to join unless you identify."""))) conf.registerNetworkValue( Services, 'ghostDelay', registry.NonNegativeInteger( 60, _("""Determines how many seconds the bot will wait between successive GHOST attempts. Set this to 0 to disable GHOST.""") )) conf.registerNetworkValue( Services, 'NickServ', ValidNickOrEmptyString( 'NickServ', _("""Determines what nick the 'NickServ' service has."""))) conf.registerGroup(Services.NickServ, 'password') conf.registerNetworkValue( Services, 'ChanServ', ValidNickOrEmptyString( 'ChanServ', _("""Determines what nick the 'ChanServ' service has."""))) conf.registerChannelValue( Services.ChanServ, 'password', registry.String('', _("""Determines what password the bot will use with ChanServ."""), private=True)) conf.registerChannelValue( Services.ChanServ, 'op', registry.Boolean(
import supybot.conf as conf import supybot.registry as registry def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('TriviaTime', True) TriviaTime = conf.registerPlugin('TriviaTime') # Config groups conf.registerGroup(TriviaTime, 'kaos') conf.registerGroup(TriviaTime, 'admin') conf.registerGroup(TriviaTime, 'questions') conf.registerGroup(TriviaTime, 'general') conf.registerGroup(TriviaTime, 'commands') conf.registerGroup(TriviaTime, 'voice') conf.registerGroup(TriviaTime, 'skip') conf.registerGroup(TriviaTime, 'hints') # CONFIGURATION # file locations for database and question conf.registerChannelValue(TriviaTime.admin, 'sqlitedb', registry.NormalizedString("""plugins/TriviaTime/storage/db/trivia.db""", """Location of sqlite database file""") )
def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Guardian', True) Guardian = conf.registerPlugin('Guardian') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Guardian, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) conf.registerGroup(Guardian, 'flood', private=True) conf.registerGlobalValue( Guardian.flood, 'interval', registry.NonNegativeInteger( 7, """Indique l'interval de temps de contrôle du flood (en sec).""")) conf.registerGlobalValue( Guardian.flood, 'max', registry.NonNegativeInteger( 5, """Indique le nombre de message maximum. """)) conf.registerGlobalValue( Guardian.flood, 'maxKick', registry.NonNegativeInteger( 5, """Indique le nombre de kick minimum avant un bannissement."""))
about network exceptions like hostnotfound, timeout ...."""))) conf.registerChannelValue(Web, 'snarferShowTargetDomain', registry.Boolean(False, _("""Determines whether the domain name displayed by the snarfer will be the original one (posted on IRC) or the target one (got after following redirects, if any)."""))) conf.registerChannelValue(Web, 'nonSnarfingRegexp', registry.Regexp(None, _("""Determines what URLs matching the given regexp will not be snarfed. Give the empty string if you have no URLs that you'd like to exclude from being snarfed."""))) conf.registerChannelValue(Web, 'checkIgnored', registry.Boolean(True, _("""Determines whether the title snarfer checks if the author of a message is ignored."""))) conf.registerGlobalValue(Web, 'urlWhitelist', registry.SpaceSeparatedListOfStrings([], """If set, bot will only fetch data from urls in the whitelist, i.e. starting with http://domain/optionalpath/. This will apply to all commands that retrieve data from user-supplied URLs, including fetch, headers, title, doctype.""")) conf.registerGroup(Web, 'fetch') conf.registerGlobalValue(Web.fetch, 'maximum', registry.NonNegativeInteger(0, _("""Determines the maximum number of bytes the bot will download via the 'fetch' command in this plugin."""))) conf.registerGlobalValue(Web.fetch, 'timeout', registry.NonNegativeInteger(5, """Determines the maximum number of seconds the bot will wait for the site to respond, when using the 'fetch' command in this plugin. If 0, will use socket.defaulttimeout""")) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
from supybot.questions import expect, anything, something, yn conf.registerPlugin('Owner', True) Owner = conf.registerPlugin('Owner', True) conf.registerGlobalValue( Owner, 'public', registry.Boolean( True, """Determines whether this plugin is publicly visible.""")) conf.registerGlobalValue( Owner, 'announceFormat', registry.String( 'Announcement from my owner ($owner): $text', """Determines the format of messages sent by the 'announce' command. $owner may be used for the username of the owner calling this command, and $text for the announcement being made.""")) conf.registerGlobalValue( Owner, 'quitMsg', registry.String( 'Limnoria $version', """Determines what quit message will be used by default. If the quit command is called without a quit message, this will be used. If this value is empty, the nick of the person giving the quit command will be used. The standard substitutions ($version, $nick, etc.) are all handled appropriately.""")) conf.registerGroup(conf.supybot.commands, 'renames', orderAlphabetically=True) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. ### import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Alias') def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Alias', True) Alias = conf.registerPlugin('Alias') conf.registerGroup(Alias, 'aliases') # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
_ = lambda x:x internationalizeDocstring = lambda x:x def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Trigger', True) Trigger = conf.registerPlugin('Trigger') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Trigger, 'someConfigVariableName', # registry.Boolean(False, _("""Help for someConfigVariableName."""))) conf.registerGroup(Trigger, 'triggers') for trigger in 'join part privmsg notice highlight nick quit kick'.split(' '): conf.registerChannelValue(Trigger.triggers, trigger, registry.String('', _("""Command triggered by %ss""" % trigger), private=True)) conf.registerGlobalValue(Trigger.triggers, 'connect', registry.String('', _("""Command triggered on connect. This shouldn't be a Supybot command, but an IRC command (as given to ircquote)."""), private=True)) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
TOPICLEN value sent to it by the server and thus refuse to send TOPICs longer than the TOPICLEN. These topics are likely to be truncated by the server anyway, so this defaults to True."""))) conf.registerChannelValue( Topic, 'default', registry.String( '', _("""Determines what the default topic for the channel is. This is used by the default command to set this topic."""))) conf.registerChannelValue( Topic, 'alwaysSetOnJoin', registry.Boolean( False, _("""Determines whether the bot will set the topic every time it joins, or only if the topic is empty."""))) conf.registerGroup(Topic, 'undo') conf.registerChannelValue( Topic.undo, 'max', registry.NonNegativeInteger( 10, _("""Determines the number of previous topics to keep around in case the undo command is called."""))) conf.registerChannelValue( Topic, 'requireManageCapability', registry.String( 'channel,op; channel,halfop', _("""Determines the capabilities required (if any) to make any topic changes, (everything except for read-only operations). Use 'channel,capab' for channel-level capabilities. Note that absence of an explicit anticapability means user has
def configure(advanced): # This will be called by setup.py to configure this module. Advanced is # a bool that specifies whether the user identified themself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Later', True) Later = conf.registerPlugin('Later') conf.registerGlobalValue(Later, 'maximum', registry.NonNegativeInteger(0, _("""Determines the maximum number of messages to be queued for a user. If this value is 0, there is no maximum. """))) conf.registerGlobalValue(Later, 'private', registry.Boolean(False, _("""Determines whether users will be notified in the first place in which they're seen, or in private."""))) conf.registerGlobalValue(Later, 'tellOnJoin', registry.Boolean(False, _("""Determines whether users will be notified upon joining any channel the bot is in, or only upon sending a message."""))) conf.registerGlobalValue(Later, 'messageExpiry', registry.NonNegativeInteger(30, _("""Determines the maximum number of days that a message will remain queued for a user. After this time elapses, the message will be deleted. If this value is 0, there is no maximum."""))) conf.registerGroup(Later, 'format') conf.registerGlobalValue(Later.format, 'senderHostname', registry.Boolean(False, _("""Determines whether senders' hostname will be shown in messages (instead of just the nick)."""))) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
conf.registerChannelValue(RelayNext, 'color', registry.Boolean(True, _("""Determines whether the bot will color relayed PRIVMSGs so as to make the messages easier to read."""))) conf.registerChannelValue(RelayNext, 'hostmasks', registry.Boolean(True, _("""Determines whether the bot will relay the hostmask of the person joining or parting the channel when he or she joins or parts."""))) conf.registerChannelValue(RelayNext, 'noHighlight', registry.Boolean(False, _("""Determines whether the bot should prefix nicks with a hyphen (-) to prevent excess highlights (in PRIVMSGs and actions)."""))) conf.registerChannelValue(RelayNext, 'showPrefixes', registry.Boolean(False, _("""Determines whether the bot should status prefixes (@, %, +) when relaying."""))) conf.registerGroup(RelayNext, 'antiflood') conf.registerChannelValue(RelayNext.antiflood, 'enable', registry.Boolean(False, _("""Determines whether flood prevention should be enabled for the given channel."""))) conf.registerChannelValue(RelayNext.antiflood, 'seconds', registry.PositiveInteger(20, _("""Determines how many seconds messages should be queued for flood protection."""))) conf.registerChannelValue(RelayNext.antiflood, 'maximum', registry.PositiveInteger(15, _("""Determines the maximum amount of incoming messages the bot will allow from a relay channel before flood protection is triggered."""))) conf.registerChannelValue(RelayNext.antiflood.maximum, 'nonPrivmsgs', registry.PositiveInteger(10, _("""Determines the maximum amount of incoming non-PRIVMSG events the bot will allow from a relay channel before flood protection is triggered."""))) conf.registerChannelValue(RelayNext.antiflood, 'timeout', registry.PositiveInteger(60, _("""Determines the amount of time in seconds the bot should block messages if flood protection is triggered.""")))
import supybot.conf as conf import supybot.registry as registry def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('TriviaTime', True) TriviaTime = conf.registerPlugin('TriviaTime') conf.registerGroup(TriviaTime, 'kaos') conf.registerGroup(TriviaTime, 'admin') conf.registerGroup(TriviaTime, 'questions') conf.registerGroup(TriviaTime, 'general') conf.registerGroup(TriviaTime, 'commands') conf.registerGroup(TriviaTime, 'voice') conf.registerGroup(TriviaTime, 'skip') # CONFIGURATION # file locations for database and question conf.registerChannelValue( TriviaTime.admin, 'sqlitedb', registry.NormalizedString("""plugins/TriviaTime/storage/db/trivia.db""", """Location of sqlite database file""")) conf.registerChannelValue( TriviaTime.admin, 'quizfile',
registry.Regexp( None, """Determines what URLs are to be snarfed and stored in the database in the channel; URLs matching the regexp given will not be snarfed. Give the empty string if you have no URLs that you'd like to exclude from being snarfed.""", ), ) conf.registerChannelValue( Web, "ignoreNicks", registry.String( " ", """Determines the nicks who shall be ignored (because they are bots or other URL Snarfing bots.""", ), ) conf.registerGroup(Web, "fetch") conf.registerGlobalValue( Web.fetch, "maximum", registry.NonNegativeInteger( 0, """Determines the maximum number of bytes the bot will download via the 'fetch' command in this plugin.""", ), ) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
conf.registerGlobalValue(Services, 'disabledNetworks', Networks(_('QuakeNet').split(), _("""Determines what networks this plugin will be disabled on."""))) conf.registerGlobalValue(Services, 'noJoinsUntilIdentified', registry.Boolean(False, _("""Determines whether the bot will not join any channels until it is identified. This may be useful, for instances, if you have a vhost that isn't set until you're identified, or if you're joining +r channels that won't allow you to join unless you identify."""))) conf.registerGlobalValue(Services, 'ghostDelay', registry.PositiveInteger(60, _("""Determines how many seconds the bot will wait between successive GHOST attempts."""))) conf.registerGlobalValue(Services, 'NickServ', ValidNickOrEmptyString('', _("""Determines what nick the 'NickServ' service has."""))) conf.registerGroup(Services.NickServ, 'password') conf.registerGlobalValue(Services, 'ChanServ', ValidNickOrEmptyString('', _("""Determines what nick the 'ChanServ' service has."""))) conf.registerChannelValue(Services.ChanServ, 'password', registry.String('', _("""Determines what password the bot will use with ChanServ."""), private=True)) conf.registerChannelValue(Services.ChanServ, 'op', registry.Boolean(False, _("""Determines whether the bot will request to get opped by the ChanServ when it joins the channel."""))) conf.registerChannelValue(Services.ChanServ, 'halfop', registry.Boolean(False, _("""Determines whether the bot will request to get half-opped by the ChanServ when it joins the channel."""))) conf.registerChannelValue(Services.ChanServ, 'voice', registry.Boolean(False, _("""Determines whether the bot will request to get voiced by the ChanServ when it joins the channel.""")))
# This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified themself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Factoids', True) class FactoidFormat(registry.TemplatedString): """Value must include $value, otherwise the factoid's value would be left out.""" requiredTemplates = ['value'] Factoids = conf.registerPlugin('Factoids') conf.registerGroup(Factoids, 'web') conf.registerGlobalValue( Factoids.web, 'enable', registry.Boolean( False, _("""Determines whether the Factoids plugins will be browsable on the HTTP server."""))) conf.registerChannelValue( Factoids.web, 'channel', registry.Boolean( False, _("""Determines whether factoids can be displayed via the web server."""))) conf.registerChannelValue( Factoids, 'requireVoice',
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. ### import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Filter') Filter = conf.registerPlugin('Filter') conf.registerGroup(Filter, 'spellit') conf.registerGlobalValue( Filter.spellit, 'replaceLetters', registry.Boolean( True, _("""Determines whether or not to replace letters in the output of spellit."""))) conf.registerGlobalValue( Filter.spellit, 'replacePunctuation', registry.Boolean( True, _("""Determines whether or not to replace punctuation in the output of spellit."""))) conf.registerGlobalValue( Filter.spellit, 'replaceNumbers', registry.Boolean(
# This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified themself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Gogs', True) Gogs = conf.registerPlugin('Gogs') # Settings conf.registerChannelValue(Gogs, 'projects', registry.Json({}, _("""List of projects"""))) # Format conf.registerGroup(Gogs, 'format') conf.registerChannelValue(Gogs, 'use-notices', registry.Boolean(False, _("""Determines whether the bot should announce using NOTICE instead of PRIVMSG."""))) conf.registerChannelValue(Gogs.format, 'push', registry.String(_("""\x02[{repository[name]}]\x02 {pusher[username]} pushed \x02{total_commits_count} commit(s)\x02 to \x02{repository[name]} {ref}\x02:"""), _("""Format for push events."""))) conf.registerChannelValue(Gogs.format, 'commit', registry.String(_("""\x02[{repository[name]}]\x02 {short_id} \x02{short_message}\x02 by {author[name]}"""), _("""Format for commits."""))) conf.registerChannelValue(Gogs.format, 'create', registry.String(_("""\x02[{repository[name]}]\x02 {sender[username]} created a new {ref_type} : {ref}"""), _("""Format for tag push events."""))) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
Misc, 'listUnloadedPlugins', registry.Boolean( False, _("""Determines whether the bot will list unloaded plugins with the list command if given the --unloaded switch. If this is disabled, non-owner users should be unable to see what unloaded plugins are available."""))) conf.registerGlobalValue( Misc, 'timestampFormat', registry.String( '[%H:%M:%S]', _("""Determines the format string for timestamps in the Misc.last command. Refer to the Python documentation for the time module to see what formats are accepted. If you set this variable to the empty string, the timestamp will not be shown."""))) conf.registerGroup(Misc, 'last') conf.registerGroup(Misc.last, 'nested') conf.registerChannelValue( Misc.last.nested, 'includeTimestamp', registry.Boolean( False, _("""Determines whether or not the timestamp will be included in the output of last when it is part of a nested command"""))) conf.registerChannelValue( Misc.last.nested, 'includeNick', registry.Boolean( False, _("""Determines whether or not the nick will be included in the output of last when it is part of a nested command""")))
# This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified themself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Gitlab', True) Gitlab = conf.registerPlugin('Gitlab') # Settings conf.registerChannelValue(Gitlab, 'projects', registry.Json({}, _("""List of projects"""))) # Format conf.registerGroup(Gitlab, 'format') conf.registerChannelValue(Gitlab, 'use-notices', registry.Boolean(False, _("""Determines whether the bot should announce using NOTICE instead of PRIVMSG."""))) conf.registerChannelValue(Gitlab.format, 'push', registry.String(_("""\x02[{project[name]}]\x02 {user_name} pushed \x02{total_commits_count} commit(s)\x02 to \x02{ref}\x02:"""), _("""Format for push events."""))) conf.registerChannelValue(Gitlab.format, 'commit', registry.String(_("""\x02[{project[name]}]\x02 {short_id} \x02{short_message}\x02 by {author[name]}"""), _("""Format for commits."""))) conf.registerChannelValue(Gitlab.format, 'tag', registry.String(_("""\x02[{project[name]}]\x02 {user_name} created a new tag {ref}"""), _("""Format for tag push events."""))) conf.registerChannelValue(Gitlab.format, 'issue-open',
def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin("Pacman", True) Pacman = conf.registerPlugin("Pacman") # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Pacman, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) conf.registerGroup(Pacman, "pkg") conf.registerGlobalValue( Pacman.pkg, "max", registry.NonNegativeInteger( 2, """Indique le maximum de paquets à afficher (commande 'pkg' et 'aur').""", ), ) conf.registerGroup(Pacman, "pkgfile") conf.registerGlobalValue( Pacman.pkgfile, "max", registry.NonNegativeInteger(
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. ### import supybot.conf as conf import supybot.registry as registry def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Alias', True) Alias = conf.registerPlugin('Alias') conf.registerGroup(Alias, 'aliases') # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
### import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Owner') def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Owner', True) Owner = conf.registerPlugin('Owner', True) conf.registerGlobalValue(Owner, 'public', registry.Boolean(True, """Determines whether this plugin is publicly visible.""")) conf.registerGlobalValue(Owner, 'quitMsg', registry.String('', """Determines what quit message will be used by default. If the quit command is called without a quit message, this will be used. If this value is empty, the nick of the person giving the quit command will be used.""")) conf.registerGroup(conf.supybot.commands, 'renames', orderAlphabetically=True) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('MegaHAL', True) MegaHAL = conf.registerPlugin('MegaHAL') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(MegaHAL, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) conf.registerGroup(MegaHAL, 'learn') conf.registerGlobalValue( MegaHAL.learn, 'commands', registry.Boolean( False, _("""Determines whether the bot answers to messages beginning by a non-alphanumeric char."""))) conf.registerGroup(MegaHAL, 'answer') conf.registerChannelValue( MegaHAL.answer, 'commands', registry.Boolean( False, _("""Determines whether messages beginning by a non-alphanumeric char are learned."""))) conf.registerChannelValue( MegaHAL.answer, 'probability',
_("""Indicates how many headlines an rss feed will output when it is first added to announce for a channel."""))) conf.registerChannelValue( RSS, 'keywordWhitelist', registry.SpaceSeparatedSetOfStrings([], _("""Space separated list of strings, lets you filter headlines to those containing one or more items in this whitelist."""))) conf.registerChannelValue( RSS, 'keywordBlacklist', registry.SpaceSeparatedSetOfStrings([], _("""Space separated list of strings, lets you filter headlines to those not containing any items in this blacklist."""))) conf.registerGroup(RSS, 'announce') conf.registerChannelValue( RSS.announce, 'showLinks', registry.Boolean( True, _("""Determines whether the bot will list the link along with the title of the feed when a feed is automatically announced."""))) conf.registerChannelValue( RSS.announce, 'showPubDate', registry.Boolean( False, """Determines whether the bot will list the publication datetime stamp along with the title of the feed when a feed is automatically announced.""")) conf.registerGlobalValue(
from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Note') def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified themself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Note', True) Note = conf.registerPlugin('Note') conf.registerGroup(Note, 'notify') conf.registerGlobalValue( Note.notify, 'onJoin', registry.Boolean( False, """Determines whether the bot will notify people of their new messages when they join the channel. Normally it will notify them when they send a message to the channel, since oftentimes joins are the result of netsplits and not the actual presence of the user.""")) conf.registerGlobalValue( Note.notify.onJoin, 'repeatedly', registry.Boolean( False, """Determines whether the bot will repeatedly notify people of their new messages when they join the channel. That means when they join the channel, the bot will tell them they have unread messages, even if it's told them before.""")) conf.registerGlobalValue(
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. ### import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Filter') Filter = conf.registerPlugin('Filter') conf.registerGroup(Filter, 'spellit') conf.registerGlobalValue(Filter.spellit, 'replaceLetters', registry.Boolean(True, _("""Determines whether or not to replace letters in the output of spellit."""))) conf.registerGlobalValue(Filter.spellit, 'replacePunctuation', registry.Boolean(True, _("""Determines whether or not to replace punctuation in the output of spellit."""))) conf.registerGlobalValue(Filter.spellit, 'replaceNumbers', registry.Boolean(True, _("""Determines whether or not to replace numbers in the output of spellit."""))) conf.registerGroup(Filter, 'shrink') conf.registerChannelValue(Filter.shrink, 'minimum', registry.PositiveInteger(4, _("""Determines the minimum number of a letters in a word before it will be shrunken by the shrink command/filter."""))) def configure(advanced):
except EnvironmentError, e: output('I couldn\'t open that file: %s' % e) continue counter = 1 try: try: for line in fd: line = line.rstrip('\r\n') if not line or line.startswith('#'): continue (key, value) = line.split(':', 1) counter += 1 except ValueError: output('That\'s not a valid file; ' 'line #%s is malformed.' % counter) continue finally: fd.close() command = something('What would you like the command to be?') conf.registerGlobalValue(lookups,command, registry.String(filename,'')) nokeyVal = yn('Would you like the key to be shown for random ' 'responses?') conf.registerGlobalValue(lookups.get(command), 'nokey', registry.Boolean(nokeyVal, '')) Lookup = conf.registerPlugin('Lookup') conf.registerGroup(Lookup, 'lookups') # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
# conf.registerGlobalValue(MCStatus, 'someConfigVariableName', # registry.Boolean(False, _("""Help for someConfigVariableName."""))) conf.registerGlobalValue(MCStatus, 'statusURL', registry.String('http://status.mojang.com/check', _("""This is the URL that is queried for JSON data. You shouldn't change this unless you know what you are doing."""))) conf.registerChannelValue(MCStatus, 'prefix', registry.String('', _("""This text is prepended to the mcstatus command's output."""))) conf.registerChannelValue(MCStatus, 'suffix', registry.String('', _("""This text is appended to the mcstatus command's output."""))) conf.registerChannelValue(MCStatus, 'separator', registry.StringSurroundedBySpaces('|', _("""This text is inserted between service-status pairs."""))) conf.registerGroup(MCStatus, 'service') conf.registerChannelValue(MCStatus.service, 'prefix', registry.String('', _("""This text is prepended to each service's name."""))) conf.registerChannelValue(MCStatus.service, 'suffix', registry.StringWithSpaceOnRight(':', _("""This text is appended to each service's name."""))) conf.registerGroup(MCStatus, 'status') conf.registerChannelValue(MCStatus.status, 'online', registry.NormalizedString('\x0309ONLINE\x03', _("""This text is displayed when a service is online (green)."""))) conf.registerChannelValue(MCStatus.status, 'offline', registry.NormalizedString('\x0304OFFLINE\x03', _("""This text is displayed when a service is offline (red)."""))) # vim: set shiftwidth=4 tabstop=4 expandtab textwidth=79:
registry.Boolean( True, _("""Ignores URLs that appear in an action such as /me"""))) conf.registerChannelValue( SpiffyTitles, 'requireCapability', registry.String( "", _("""If defined, SpiffyTitles will only acknowledge links from users with this capability. Useful for hostile environments.""" ))) conf.registerChannelValue( SpiffyTitles, 'ignoredTitlePattern', registry.Regexp("", _("""Titles matching this pattern will be ignored."""))) conf.registerGroup(SpiffyTitles, 'wikipedia') conf.registerChannelValue( SpiffyTitles.wikipedia, 'enabled', registry.Boolean( True, _("""Whether to fetch extracts for Wikipedia articles."""))) conf.registerChannelValue( SpiffyTitles.wikipedia, 'apiParams', registry.SpaceSeparatedListOfStrings( [], _("""Add or override API query parameters with a space-separated list of key=value pairs.""" ))) conf.registerChannelValue( SpiffyTitles.wikipedia, 'titleParam',
### # Copyright (c) 2013, Nils Brinkmann # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Subversion', True) Subversion = conf.registerPlugin('Subversion') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Subversion, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) conf.registerGroup(Subversion, 'notifiers') # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('User') def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified themself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('User', True) User = conf.registerPlugin('User') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(User, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) conf.registerGroup(User, 'gpg') conf.registerGlobalValue(User.gpg, 'enable', registry.Boolean(True, """Determines whether or not users are allowed to use GPG for authentication.""")) conf.registerGlobalValue(User.gpg, 'TokenTimeout', registry.PositiveInteger(60*10, """Determines the lifetime of a GPG authentication token (in seconds).""")) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
### import supybot.conf as conf import supybot.registry as registry def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Ottdcoop', True) Ottdcoop = conf.registerPlugin('Ottdcoop') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Ottdcoop, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) conf.registerChannelValue(Ottdcoop, 'PlayerWarner', registry.Boolean(False, """Determines whether the bot will auto warn clients joining as 'Player'""")) conf.registerChannelValue(Ottdcoop, 'PlayerReply', registry.String('Player, please change your in game nick', """What the bot will say if it sees '*** Player joined the game'""")) conf.registerChannelValue(Ottdcoop, 'MultiWarner', registry.Boolean(False, """Determines whether the bot will auto warn clients multiple joining as 'nick #number'""")) conf.registerChannelValue(Ottdcoop, 'MultiReply', registry.String('$name, it appears that you have joined twice, please ask someone to join you, rather than double joining. If this is due to a time-out, you may disregard this.', """What the bot will say if it sees '*** nick #number joined the game'""")) conf.registerGroup(Ottdcoop, 'abbr') # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified themself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('Tea', True) Tea = conf.registerPlugin('Tea') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Tea, 'someConfigVariableName', # registry.Boolean(False, _("""Help for someConfigVariableName."""))) conf.registerGroup(Tea, 'mariagefreres') conf.registerGlobalValue(Tea.mariagefreres, 'homepage', registry.String( 'http://www.mariagefreres.com/FR/accueil.html', _("""The home page of the Mariage Frères website.""") )) conf.registerGlobalValue(Tea.mariagefreres, 'no_results_url', registry.String( 'http://www.mariagefreres.com/FR/plus_de_thes.html', _("""The URL Mariage Frères redirects to if a search leads to no results. We have to store that because the HTTP status code is always 200.""") )) conf.registerGlobalValue(Tea.mariagefreres, 'result_urls',
def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified themself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('GPG', True) GPG = conf.registerPlugin('GPG') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(GPG, 'someConfigVariableName', # registry.Boolean(False, _("""Help for someConfigVariableName."""))) conf.registerGroup(GPG, 'auth') conf.registerGroup(GPG.auth, 'sign') conf.registerGlobalValue( GPG.auth.sign, 'enable', registry.Boolean( True, """Determines whether or not users are allowed to use GPG signing for authentication.""")) conf.registerGlobalValue( GPG.auth.sign, 'TokenTimeout', registry.PositiveInteger( 60 * 10, """Determines the lifetime of a GPG signature authentication token (in seconds).""")) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
class ValidNonPrivmsgsHandling(registry.OnlySomeStrings): validStrings = ('privmsg', 'notice', 'nothing') conf.registerChannelValue(LinkRelay, 'nonPrivmsgs', ValidNonPrivmsgsHandling('privmsg', _("""Determines whether the bot will use PRIVMSGs (privmsg), NOTICEs (notice), for non-PRIVMSG Relay messages (i.e., joins, parts, nicks, quits, modes, etc.), or whether it won't relay such messages (nothing)"""))) conf.registerGlobalValue(LinkRelay, 'relays', registry.String('', _("""You shouldn't edit this configuration variable yourself unless you know what you do. Use @LinkRelay {add|remove} instead."""))) conf.registerGlobalValue(LinkRelay, 'substitutes', registry.String('', _("""You shouldn't edit this configuration variable yourself unless you know what you do. Use @LinkRelay (no)substitute instead."""))) conf.registerGroup(LinkRelay, 'colors') for name, color in {'info': '02', 'truncated': '14', 'mode': '14', 'join': '14', 'part': '14', 'kick': '14', 'nick': '14', 'quit': '14'}.items(): conf.registerChannelValue(LinkRelay.colors, name, ColorNumber(color, _("""Color used for relaying %s.""") % color)) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('IMDb', True) IMDb = conf.registerPlugin('IMDb') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(IMDb, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) conf.registerGroup(IMDb, 'formats') conf.registerChannelValue(IMDb, 'outputorder', registry.String('url;title;description;creator,director,stars;genres,plot_keys;runtime,language', 'Order that parts will be output. ; is line separator and , is field separator')) conf.registerChannelValue(IMDb.formats, 'url', registry.String('\x02\x031,8IMDb\x03 %(url)s', 'Format for the output of imdb command')) conf.registerChannelValue(IMDb.formats, 'title', registry.String('\x02\x0304\x1F%(name)s\x1F\x0311\x02 (%(year)s) %(rating)s/10', 'Format for the output of imdb command')) conf.registerChannelValue(IMDb.formats, 'description', registry.String('\x0305Description\03 /\x0311 %(description)s', 'Format for the output of imdb command')) conf.registerChannelValue(IMDb.formats, 'creator',
or parts."""))) conf.registerChannelValue( RelayNext, 'noHighlight', registry.Boolean( False, _("""Determines whether the bot should prefix nicks with a hyphen (-) to prevent excess highlights (in PRIVMSGs and actions).""" ))) conf.registerChannelValue( RelayNext, 'showPrefixes', registry.Boolean( False, _("""Determines whether the bot should status prefixes (@, %, +) when relaying."""))) conf.registerGroup(RelayNext, 'antiflood') conf.registerChannelValue( RelayNext.antiflood, 'enable', registry.Boolean( False, _("""Determines whether flood prevention should be enabled for the given channel."""))) conf.registerChannelValue( RelayNext.antiflood, 'seconds', registry.PositiveInteger( 20, _("""Determines how many seconds messages should be queued for flood protection."""))) conf.registerChannelValue( RelayNext.antiflood, 'maximum', registry.PositiveInteger(
_ = PluginInternationalization('UndernetX') def configure(advanced): # This will be called by supybot to configure this module. advanced is # a bool that specifies whether the user identified himself as an advanced # user or not. You should effect your configuration by manipulating the # registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('UndernetX', True) UndernetX = conf.registerPlugin('UndernetX') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(UndernetX, 'someConfigVariableName', # registry.Boolean(False, _("""Help for someConfigVariableName."""))) conf.registerGlobalValue(UndernetX, 'modeXonID', registry.Boolean(True, _("""Whether or not to mode +x on ID"""))) conf.registerGroup(UndernetX, 'auth') # /msg [email protected] login username password conf.registerGlobalValue(UndernetX.auth, 'username', registry.String("", _("""Username for X"""))) conf.registerGlobalValue(UndernetX.auth, 'password', registry.String("", _("""Password for X"""))) conf.registerGlobalValue(UndernetX.auth, 'xservice', registry.String("*****@*****.**", _("""XService hostmask"""))) conf.registerGlobalValue(UndernetX.auth, 'noJoinsUntilAuthed', registry.Boolean(True, _("""Don't join until we're authed."""))) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
import supybot.conf as conf import supybot.registry as registry def configure(advanced): from supybot.questions import expect, anything, something, yn WhatCD = conf.registerPlugin('WhatCD', True) if yn("""This plugin also offers a snarfer that will try to fetch the title of URLs that it sees in the channel. Would like you this snarfer to be enabled?""", default=False): WhatCD.titleSnarfer.setValue(True) WhatCD = conf.registerPlugin('WhatCD') conf.registerGlobalValue(WhatCD, 'username', registry.String('', '''the what.cd username to use''')) conf.registerGlobalValue(WhatCD, 'password', registry.String('', '''the what.cd password to use''')) conf.registerGlobalValue(WhatCD, 'max_results', registry.String('3', '''the number of results to display from what.cd torrent searches''')) conf.registerGroup(WhatCD, 'fetch') # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: