2010-05-24 13:38:06 +00:00
|
|
|
# -*- Encoding: utf-8 -*-
|
2007-09-17 19:39:44 +00:00
|
|
|
###
|
2010-05-24 13:38:06 +00:00
|
|
|
# Copyright (c) 2008-2010 Terence Simpson
|
2007-09-17 19:39:44 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of version 2 of the GNU General Public License as
|
|
|
|
# published by the Free Software Foundation.
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
###
|
|
|
|
|
|
|
|
import supybot.conf as conf
|
|
|
|
import supybot.registry as registry
|
|
|
|
|
|
|
|
def configure(advanced):
|
2010-05-28 22:51:28 +00:00
|
|
|
from supybot.questions import expect, something, yn
|
|
|
|
|
|
|
|
def anything(prompt, default=None):
|
|
|
|
"""Because supybot is pure fail"""
|
|
|
|
from supybot.questions import expect
|
|
|
|
return expect(prompt, [], default=default)
|
|
|
|
|
2010-05-29 13:36:43 +00:00
|
|
|
IRCLogin = conf.registerPlugin('IRCLogin', True)
|
|
|
|
|
|
|
|
if advanced:
|
|
|
|
## NOTE: This is currently disabled until rewritten to use launchpadlib
|
|
|
|
#UserList = anything("What file should be used to contains the list of users?", default=conf.supybot.directories.data.dirize("users.db"))
|
|
|
|
#teamname = something("What is the Launchpad team name to get the list of users from?", default=IRCLogin.teamname._default)
|
|
|
|
UserList = IRCLogin.UserList._default
|
|
|
|
teamname = IRCLogin.teamname._default
|
|
|
|
else:
|
|
|
|
UserList = IRCLogin.UserList._default
|
|
|
|
teamname = IRCLogin.teamname._default
|
|
|
|
|
|
|
|
IRCLogin.UserList.setValue(UserList)
|
|
|
|
IRCLogin.teamname.setValue(teamname)
|
2007-09-17 19:39:44 +00:00
|
|
|
|
2008-07-20 15:59:27 +00:00
|
|
|
IRCLogin = conf.registerPlugin('IRCLogin')
|
|
|
|
conf.registerGlobalValue(IRCLogin, 'UserList',
|
2007-09-17 19:39:44 +00:00
|
|
|
registry.String('', """Filename of file with list of users""",private=True))
|
2009-11-09 21:06:58 +00:00
|
|
|
conf.registerGlobalValue(IRCLogin, "teamname",
|
2009-11-04 03:50:49 +00:00
|
|
|
registry.String('ubuntu-irc', "Name of the Launchpad team to get users from", private=True))
|