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."""))) 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.registerPlugin('Gatekeeper', True) Gatekeeper = conf.registerPlugin('Gatekeeper') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Gatekeeper, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) conf.registerGlobalValue( Gatekeeper, 'targetChannel', registry.String("#bitcoin-otc", """Target channel for gatekeeper management""")) conf.registerGlobalValue( Gatekeeper, 'ratingThreshold', registry.NonNegativeInteger(0, """Minimum rating to be allowed in.""")) conf.registerGlobalValue( Gatekeeper, 'accountAgeThreshold', registry.PositiveInteger( 604800, """Minimum account age, in seconds, to be allowed in.""")) conf.registerGlobalValue( Gatekeeper, 'invite', registry.Boolean(False, """Should the bot invite the user to channel?""")) conf.registerGlobalValue( Gatekeeper, 'msgOnJoinVoice', registry.String( "Join #bitcoin-otc-foyer and see channel topic for instructions on getting voice on #bitcoin-otc.",
# 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('LastFM', True) LastFM = conf.registerPlugin('LastFM') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(LastFM, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) conf.registerChannelValue(LastFM, "maxResults", registry.NonNegativeInteger(5, """Limits the number of results that will be displayed in the channel.""")) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
except: # Placeholder that allows to run the plugin on a bot # without the i18n module _ = 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 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('Cobe', True) Cobe = conf.registerPlugin('Cobe') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Cobe, 'someConfigVariableName', # registry.Boolean(False, _("""Help for someConfigVariableName."""))) conf.registerGlobalValue(Cobe, 'ignoreRegex', registry.String('^[.@!$%]', _("""Regex to ignore when learning text. Perfect for ignoring commands!."""))) conf.registerGlobalValue(Cobe, 'stripUrls', registry.Boolean(True, _("""Keep the bot from learning URLs?"""))) conf.registerGlobalValue(Cobe, 'stripNicks', registry.Boolean(False, _("""Strip all nicks, including the bots, when learning? This replaces a nick with the keyword MAGIC_NICK to use for random highlighting."""))) conf.registerChannelValue(Cobe, 'probability', registry.NonNegativeInteger(0, _("""Determines the percent of messages the bot will answer."""))) conf.registerChannelValue(Cobe, 'probabilityWhenAddressed', registry.NonNegativeInteger(10000, _("""Determines the percent of messages adressed to the bot the bot will answer, to the 0.01%. The maximum is 10000/10000"""))) conf.registerChannelValue(Cobe, 'waitTimeBetweenSpeaking', registry.NonNegativeInteger(10, _("""Seconds to wait in a channel before speaking again."""))) conf.registerChannelValue(Cobe, 'ignoreWaitTimeIfAddressed', registry.Boolean(True, _("""If directly addressed, should we ignore the wait time?"""))) conf.registerChannelValue(Cobe, 'responseDelay', registry.Boolean(False, _("""Delay responding for 2 to 4 seconds in order to seem more human?"""))) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
conf.registerChannelValue( Cobe, 'ignorePattern', registry.Regexp("", _("""Mesages matching this pattern will be ignored."""))) conf.registerChannelValue( Cobe, 'stripPattern', registry.Regexp("", _("""Text matching this pattern will be stripped."""))) conf.registerChannelValue( Cobe, 'stripNicks', registry.Boolean( False, _("""Strip all nicks, including the bots, when learning? This replaces a nick with the keyword MAGIC_NICK to use for random highlighting.""" ))) conf.registerChannelValue( Cobe, 'probability', registry.NonNegativeInteger( 0, _("""Determines the percent of messages the bot will answer."""))) conf.registerChannelValue( Cobe, 'probabilityWhenAddressed', registry.NonNegativeInteger( 10000, _("""Determines the percent of messages adressed to the bot the bot will answer, to the 0.01%. The maximum is 10000/10000""" ))) conf.registerChannelValue( Cobe, 'waitTimeBetweenSpeaking', registry.NonNegativeInteger( 10, _("""Seconds to wait in a channel before speaking again."""))) conf.registerChannelValue( Cobe, 'ignoreWaitTimeIfAddressed', registry.Boolean( True, _("""If directly addressed, should we ignore the wait time?"""))) conf.registerChannelValue(
registry.String( "lb", _( """Determines what form of weight, metric or imperial, is used by the plugin. options are lb and kg.""" ), ), ) conf.registerChannelValue( HuntNFish, "enable", registry.Boolean(True, _("""Turns on and off the hunt and fish commands.""")), ) conf.registerChannelValue( HuntNFish, "successRate", registry.NonNegativeInteger(50, _("""Percent of chance of success""")), ) conf.registerChannelValue( HuntNFish, "timeout", registry.NonNegativeInteger( 300, _("""How long in seconds the pause between hunts and fishs should be.""") ), ) conf.registerChannelValue( HuntNFish, "huntTargets", registry.CommaSeparatedListOfStrings( [ "bear", "gopher",
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( Note.notify, 'autoSend', registry.NonNegativeInteger( 0, """Determines the upper limit for automatically sending messages instead of notifications. I.e., if this value is 2 and there are 2 new messages to notify a user about, instead of sending a notification message, the bot will simply send those new messages. If there are 3 new messages, however, the bot will send a notification message.""")) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
# 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.""")) conf.registerGlobalValue( Guardian.flood, 'banPeriod', registry.NonNegativeInteger( 3600, """Période de bannissement en secondes.
title of URLs that it sees in the channel. Would like you this snarfer to be enabled?""", default=False): Web.titleSnarfer.setValue(True) Web = conf.registerPlugin('Web') conf.registerChannelValue( Web, 'titleSnarfer', registry.Boolean( False, _("""Determines whether the bot will output the HTML title of URLs it sees in the channel."""))) 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.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.registerChannelValue( WunderWeather, 'metric', registry.Boolean( True, """Shows metric formatted data (Celsius, kilometres/hour) in the weather output if true. You can have both imperial and metric enabled, and the bot will show both.""")) conf.registerChannelValue( WunderWeather, 'showPressure', registry.Boolean( True, """Determines whether the bot will show pressures in its output. The type of pressure shown will depend on the metric/imperial settings.""" )) conf.registerChannelValue( WunderWeather, 'forecastDays', registry.NonNegativeInteger( 0, """Determines how many days the forecast shows, up to 7. If set to 0, show all days. See showForecast configuration variable to turn off forecast display.""")) conf.registerChannelValue( WunderWeather, 'showCurrentByDefault', registry.Boolean( True, """If True, will show the current conditions in the weather output if no ouput control switches are given.""")) conf.registerChannelValue( WunderWeather, 'showForecastByDefault', registry.Boolean( True, """If True, will show the forecast in the weather output if no ouput control switches are given.""")) conf.registerUserValue(conf.users.plugins.WunderWeather, 'lastLocation', registry.String('', ''))
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( 2, """Indique le maximum de paquets/fichiers à afficher.""")) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
Phabricator, 'storyLimit', registry.PositiveInteger( 5, _("Limit of phabricator updates to pull information about in one request." ))) conf.registerGlobalValue( Phabricator, 'historyForwards', registry.Boolean( True, _("Whether to traverse in history chronologically forwards or backwards." ))) conf.registerGlobalValue( Phabricator, 'timestampAfter', registry.NonNegativeInteger( 0, _("If given, ignore messages after this timestamp"))) conf.registerGlobalValue( Phabricator, 'timestampBefore', registry.NonNegativeInteger( 0, _("If given, ignore messages before this timestamp"))) conf.registerGlobalValue( Phabricator, 'sleepTime', registry.NonNegativeInteger( 30, _("Notify IRC users about phabricator updates of all users, excluding these (for example bots)" ))) conf.registerGlobalValue( Phabricator, 'newsPrefix',
import supybot.registry as registry from supybot.i18n import PluginInternationalization _ = PluginInternationalization('SubredditAnnouncer') def configure(advanced): conf.registerPlugin('SubredditAnnouncer') SubredditAnnouncer = conf.registerPlugin('SubredditAnnouncer') checkinterval_description = "How often, in minutes, to check reddit for new posts" conf.registerGlobalValue( SubredditAnnouncer, 'checkinterval', registry.NonNegativeInteger(5, checkinterval_description)) domain_description = "The domain to check. Probably http://www.reddit.com unless you've got a " domain_description += "different reddit install" conf.registerGlobalValue( SubredditAnnouncer, 'domain', registry.String("http://www.reddit.com", domain_description)) redditname_descripton = "The name of the reddit install. Not really a big deal. Leave blank to not " redditname_descripton += "have the [reddit] part of the announce message" conf.registerGlobalValue(SubredditAnnouncer, 'redditname', registry.String("Reddit", redditname_descripton)) shortdomain_description = "The short domain to use. Probably http://redd.it unless you've got your " shortdomain_description += " own reddit install. If you don't have a short domain just set it to "
supybot.reply, 'mores', registry.Boolean( True, """Determines whether the bot will break up long messages into chunks and allow users to use the 'more' command to get the remaining chunks.""")) registerChannelValue( supybot.reply.mores, 'maximum', registry.PositiveInteger( 50, """Determines what the maximum number of chunks (for use with the 'more' command) will be.""")) registerChannelValue( supybot.reply.mores, 'length', registry.NonNegativeInteger( 0, """Determines how long individual chunks will be. If set to 0, uses our super-tweaked, get-the-most-out-of-an-individual-message default.""")) registerChannelValue( supybot.reply.mores, 'instant', registry.PositiveInteger( 1, """Determines how many mores will be sent instantly (i.e., without the use of the more command, immediately when they are formed). Defaults to 1, which means that a more command will be required for all but the first chunk.""")) registerGlobalValue( supybot.reply, 'oneToOne', registry.Boolean( True, """Determines whether the bot will send multi-message replies in a single message or in multiple messages. For
# registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('PulpTriage', True) PulpTriage = conf.registerPlugin('PulpTriage') conf.registerGlobalValue( PulpTriage, 'proposal_timeout', registry.PositiveFloat(2.0, """Time, in seconds, to ignore proposals after a triage user makes a proposal. This prevents multiple simultaneous proposals from overlapping.""")) conf.registerGlobalValue( PulpTriage, 'quorum_count', registry.NonNegativeInteger(2, """Number of users required to reach a quorum. New issues will not be submitted for triage if the number of triaging users goes below this count.""")) conf.registerGlobalValue( PulpTriage, 'proposal_timeout', registry.NonNegativeInteger(2, """Number of seconds to wait after accepting a proposal before accepting another (prevents confusion by only accepting one proposal at a time)""")) conf.registerGlobalValue( PulpTriage, 'report_id', registry.NonNegativeInteger(134, """ID of the Redmine report containing non-triaged issues""")) conf.registerChannelValue( PulpTriage, 'announce', registry.Boolean(False, """Whether or not to announce triage in a channel when !triage announce is called"""))
import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Later') 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
_ = PluginInternationalization('HuntNFish') 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('HuntNFish', True) HuntNFish = conf.registerPlugin('HuntNFish') # This is where your configuration variables (if any) should go. For example: conf.registerChannelValue( HuntNFish, 'WeightType', registry.String( 'lb', _("""Determines what form of weight, metric or imperial, is used by the plugin. options are lb and kg.""" ))) conf.registerChannelValue( HuntNFish, 'enable', registry.Boolean(True, _("""Turns on and off the hunt and fish commands."""))) conf.registerChannelValue( HuntNFish, 'successRate', registry.NonNegativeInteger(0, _("""Percent of chance of success"""))) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
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 capability."""))) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
# 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('Irccat', True) def global_option(option): ''' Return a overall plugin option (registered at load time). ''' return conf.supybot.plugins.get('irccat').get(option) # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Irccat, 'someConfigVariableName', # registry.Boolean(False, """Help for someConfigVariableName.""")) Irccat = conf.registerPlugin('Irccat') conf.registerGlobalValue(Irccat, 'sectionspath', registry.String('sections.json', 'Section data')) conf.registerGlobalValue( Irccat, 'port', registry.NonNegativeInteger(12345, "The TCP port irccat will listen to.")) conf.registerGlobalValue( Irccat, 'privmsg', registry.Boolean(False, 'Use privmsgs instead of the default notices')) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
_("""Determines what networks this plugin will be disabled on."""))) conf.registerNetworkValue( 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.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.""")))
def configure(advanced): from supybot.questions import expect, anything, something, yn conf.registerPlugin('Pyborg', True) Hailo = conf.registerPlugin('Hailo') conf.registerChannelValue( Hailo, 'learn', registry.Boolean(True, """Learn on each message in a channel.""")) conf.registerChannelValue( Hailo, 'reply', registry.NonNegativeInteger( 0, """permille (‰ (1/1000)) of chance of auto reply.""")) conf.registerChannelValue( Hailo, 'replyOnMention', registry.Boolean( True, """Reply when the bots nick is mentioned in a sentence.""")) conf.registerChannelValue( Hailo, 'replyWhenSpokenTo', registry.Boolean( True, """Reply if the bots nick is the first in a sentence. Takes precedence over replyOnMention.""")) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
# registry as appropriate. from supybot.questions import expect, anything, something, yn conf.registerPlugin('WordGames', True) WordGames = conf.registerPlugin('WordGames') conf.registerGlobalValue(WordGames, 'wordFile', registry.String('/usr/share/dict/american-english', 'Path to the dictionary file.')) conf.registerGlobalValue(WordGames, 'wordRegexp', registry.String('^[a-z]+$', 'Regular expression defining what a valid word looks ' + 'like (i.e. ignore proper names, contractions, etc. ' + 'Modify this if you need to allow non-English chars.')) conf.registerGlobalValue(WordGames, 'boggleDelay', registry.NonNegativeInteger(15, 'Delay (in seconds) before a Boggle game ' + 'begins.')) conf.registerGlobalValue(WordGames, 'boggleDuration', registry.NonNegativeInteger(120, 'Duration (in seconds) of a Boggle game ' + '(not including the initial delay).')) conf.registerGlobalValue(WordGames, 'boggleDifficulty', registry.String('easy', 'Default difficulty for Boggle games.')) # 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 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('GPG', True) GPG = conf.registerPlugin('GPG') conf.registerGlobalValue( GPG, 'authRequestTimeout', registry.NonNegativeInteger( 300, """Time (seconds) for authentication requests to time out.""")) conf.registerGlobalValue( GPG, 'keyservers', registry.String( "subset.pool.sks-keyservers.net,pgp.mit.edu", """Default keyservers to use for key retrieval. Comma-separated list.""")) conf.registerGlobalValue( GPG, 'channels', registry.String( "#bitcoin-otc", """Channels to monitor for user parts for auth removal. Semicolon-separated list.""")) conf.registerGlobalValue( GPG, 'network', registry.String( "freenode", """Network to monitor for user parts/quits
registry.Boolean( True, _("""Determines whether the bot will always try to rejoin a channel whenever it's kicked from the channel."""))) conf.registerChannelValue( Channel, 'nicksInPrivate', registry.Boolean( True, _("""Determines whether the output of 'nicks' will be sent in private. This prevents mass-highlights of a channel's users, accidental or on purpose."""))) conf.registerChannelValue( Channel, 'rejoinDelay', registry.NonNegativeInteger( 0, _("""Determines how many seconds the bot will wait before rejoining a channel if kicked and supybot.plugins.Channel.alwaysRejoin is on."""))) conf.registerChannelValue( Channel, 'partMsg', registry.String( 'Limnoria $version', _("""Determines what part message should be used by default. If the part command is called without a part message, this will be used. If this value is empty, then no part message will be used (they are optional in the IRC protocol). The standard substitutions ($version, $nick, etc.) are all handled appropriately.""" ))) # 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('HuntNFish') 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('HuntNFish', True) HuntNFish = conf.registerPlugin('HuntNFish') # This is where your configuration variables (if any) should go. For example: conf.registerChannelValue(HuntNFish, 'WeightType', registry.String('lb', _("""Determines what form of weight, metric or imperial, is used by the plugin. Options are lb and kg."""))) conf.registerChannelValue(HuntNFish, 'enable', registry.Boolean(True, _("""Turns on and off the hunt and fish commands."""))) conf.registerChannelValue(HuntNFish, 'successRate', registry.NonNegativeInteger(0, _("""Percent of chance of success"""))) conf.registerChannelValue(HuntNFish, 'timeout', registry.NonNegativeInteger(0, _("""How long the pause between hunts and fishes should be."""))) conf.registerChannelValue(HuntNFish, 'channelTimeout', registry.NonNegativeInteger(0, _("""How long the pause between hunts and fishes should be for a channel."""))) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
Herald, 'requireCapability', registry.String( '', _("""Determines what capability (if any) is required to add/change/remove the herald of another user."""))) conf.registerChannelValue( Herald, 'throttle', registry.PositiveInteger( 600, _("""Determines the minimum number of seconds between heralds."""))) conf.registerChannelValue( Herald.throttle, 'afterPart', registry.NonNegativeInteger( 0, _("""Determines the minimum number of seconds after parting that the bot will not herald the person when he or she rejoins."""))) conf.registerChannelValue( Herald.throttle, 'afterSplit', registry.NonNegativeInteger( 60, _("""Determines the minimum number of seconds after a netsplit that the bot will not herald the users that split."""))) conf.registerChannelValue( Herald, 'default', registry.String( '', _("""Sets the default herald to use. If a user has a personal herald specified, that will be used instead. If set to the empty string, the default herald will be disabled.""")))
import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('GateStatus') 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('GateStatus', True) GateStatus = conf.registerPlugin('GateStatus') conf.registerGlobalValue(GateStatus, 'changeID', registry.String('', _("""Change ID used for reporting."""))) conf.registerGlobalValue(GateStatus, 'changeURL', registry.String('', _("""URL to check the results."""))) conf.registerGlobalValue(GateStatus, 'timeLimit', registry.NonNegativeInteger(24, _("""Maximum comment age in hours that gets parsed. Avoids reporting on old and obsolete gate jobs. Defaults to 24."""))) conf.registerGlobalValue(GateStatus, 'sshCommand', registry.String('', _("""Command prefix used to fetch data from Gerrit. The bot's user should have passwordless ssh set up. Example: ssh -p 29418 [email protected]"""))) conf.registerGlobalValue(GateStatus, 'userFilter', registry.SpaceSeparatedListOfStrings([], _("""Only try to parse comment from these users"""))) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
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:
import supybot.conf as conf import supybot.registry as registry from supybot.i18n import PluginInternationalization, internationalizeDocstring _ = PluginInternationalization('Seen') 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('Seen', True) Seen = conf.registerPlugin('Seen') # This is where your configuration variables (if any) should go. For example: # conf.registerGlobalValue(Seen, 'someConfigVariableName', # registry.Boolean(False, _("""Help for someConfigVariableName."""))) conf.registerChannelValue(Seen, 'minimumNonWildcard', registry.NonNegativeInteger(2, _("""The minimum non-wildcard characters required to perform a 'seen' request. Of course, it only applies if there is a wildcard in the request."""))) conf.registerChannelValue(Seen, 'showLastMessage', registry.Boolean(True, _("""Determines whether the last message will be displayed with @seen. Useful for keeping messages from a channel private."""))) # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: