Subversion Repositories Scribus

Rev

Blame | Last modification | View Log | RSS feed

###
# Copyright (c) 2006, Oleksandr Moskalenko
# All rights reserved.
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

###

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
    Mantis = conf.registerPlugin('Mantis', True)
    output('The default Mantis BTS server is bugs.scribus.net.')
    if yn('Would you like to specify a different BTS server?'):
        server = something('What server?')
        conf.supybot.plugins.Mantis.server.set(server)


Mantis = conf.registerPlugin('Mantis')

conf.registerGlobalValue(Mantis, 'server',
    registry.String('bugs.scribus.net', """Determines the hostname for the
    Mantis BTS server."""
))
conf.registerGlobalValue(Mantis, 'titleSnarfer',
    registry.Boolean(False, """Determines whether the bot will output the HTML
    title of URLs it sees in the channel."""
))


#http://bugs.scribus.net/view.php?id=3509

# This is where your configuration variables (if any) should go.  For example:
# conf.registerGlobalValue(Mantis, 'someConfigVariableName',
#     registry.Boolean(False, """Help for someConfigVariableName."""))

#conf.registerChannelValue(Mantis, 'unknown',
#    Mantis('btsurl', """Determines what URL the bot will prepend to bug numbers."""))

#conf.registerGlobalValue(Mantis, 'server',
#    registry.String('dict.org', """Determines what server the bot will
#    retrieve definitions from."""))
#conf.registerChannelValue(Dict, 'default',
#    registry.String('', """Determines the default dictionary the bot will
#    ask for definitions in.  If this value is '*' (without the quotes) the bot
#    will use all dictionaries to define words."""))

# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: