Added output to the list of functions imported from questions.

This commit is contained in:
Jeremy Fincher 2004-02-06 04:36:21 +00:00
parent 3af53ac0b3
commit 6e062306f2
17 changed files with 23 additions and 17 deletions

View File

@ -50,7 +50,7 @@ import callbacks
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
output('To use Amazon\'s Web Services, you must have a license key.') output('To use Amazon\'s Web Services, you must have a license key.')
if yn('Do you have a license key?'): if yn('Do you have a license key?'):
key = anything('What is it?') key = anything('What is it?')

View File

@ -51,7 +51,7 @@ import registry
import callbacks import callbacks
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('BadWords', True) conf.registerPlugin('BadWords', True)
if yn('Would you like to add some bad words?'): if yn('Would you like to add some bad words?'):
words = anything('What words? (separate individual words by spaces)') words = anything('What words? (separate individual words by spaces)')

View File

@ -91,7 +91,7 @@ class BugzillaError(Exception):
def configure(advanced): def configure(advanced):
from questions import expect, anything, yn from questions import output, expect, anything, yn
conf.registerPlugin('Bugzilla', True) conf.registerPlugin('Bugzilla', True)
output("""The Bugzilla plugin has the functionality to watch for URLs output("""The Bugzilla plugin has the functionality to watch for URLs
that match a specific pattern (we call this a snarfer). When that match a specific pattern (we call this a snarfer). When

View File

@ -53,7 +53,7 @@ import callbacks
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
output('The default dictd server is dict.org.') output('The default dictd server is dict.org.')
if yn('Would you like to specify a different dictd server?'): if yn('Would you like to specify a different dictd server?'):
server = something('What server?') server = something('What server?')

View File

@ -53,7 +53,7 @@ import callbacks
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('Ebay', True) conf.registerPlugin('Ebay', True)
output("""The Ebay plugin has the functionality to watch for URLs output("""The Ebay plugin has the functionality to watch for URLs
that match a specific pattern (we call this a snarfer). When that match a specific pattern (we call this a snarfer). When

View File

@ -50,7 +50,7 @@ import registry
import callbacks import callbacks
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('Enforcer', True) conf.registerPlugin('Enforcer', True)
chanserv = anything("""What\'s the name of ChanServ on your network? If chanserv = anything("""What\'s the name of ChanServ on your network? If
there is no ChanServ on your network, just press there is no ChanServ on your network, just press

View File

@ -52,7 +52,7 @@ import callbacks
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('Gameknot', True) conf.registerPlugin('Gameknot', True)
if advanced: if advanced:
output("""The Gameknot plugin has the functionality to watch for URLs output("""The Gameknot plugin has the functionality to watch for URLs

View File

@ -60,7 +60,7 @@ import callbacks
import structures import structures
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
output('To use Google\'t Web Services, you must have a license key.') output('To use Google\'t Web Services, you must have a license key.')
if yn('Do you have a license key?'): if yn('Do you have a license key?'):
key = something('What is it?') key = something('What is it?')

View File

@ -57,7 +57,7 @@ except ImportError:
'plugin. Download it at <http://pysqlite.sf.net/>' 'plugin. Download it at <http://pysqlite.sf.net/>'
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('Lookup', True) conf.registerPlugin('Lookup', True)
lookups = conf.supybot.plugins.Lookup.lookups lookups = conf.supybot.plugins.Lookup.lookups
output("""This module allows you to define commands that do a simple key output("""This module allows you to define commands that do a simple key

View File

@ -50,7 +50,7 @@ import privmsgs
import callbacks import callbacks
def configure(advanced): def configure(advanced):
from questions import something, yn from questions import output, something, yn
conf.registerPlugin('Parter', True) conf.registerPlugin('Parter', True)
channel = ' ' channel = ' '
while channel: while channel:

View File

@ -66,7 +66,7 @@ if hasattr(math, '__file__'):
pythonPath = map(os.path.dirname, L) pythonPath = map(os.path.dirname, L)
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('Python', True) conf.registerPlugin('Python', True)
if yn("""This plugin provides a snarfer for ASPN Python Recipe URLs; if yn("""This plugin provides a snarfer for ASPN Python Recipe URLs;
it will output the name of the Recipe when it sees such a URL. it will output the name of the Recipe when it sees such a URL.

View File

@ -52,7 +52,7 @@ import registry
import callbacks import callbacks
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('RSS', True) conf.registerPlugin('RSS', True)
prompt = 'Would you like to add an RSS feed?' prompt = 'Would you like to add an RSS feed?'
while yn(prompt): while yn(prompt):

View File

@ -56,7 +56,7 @@ import callbacks
def configure(advanced): def configure(advanced):
import socket import socket
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('Relay', True) conf.registerPlugin('Relay', True)
startNetwork = anything('What is the name of the network you\'re ' startNetwork = anything('What is the name of the network you\'re '
'connecting to first?') 'connecting to first?')
@ -116,6 +116,9 @@ conf.registerChannelValue(conf.supybot.plugins.Relay, 'color',
conf.registerChannelValue(conf.supybot.plugins.Relay, 'topicSync', conf.registerChannelValue(conf.supybot.plugins.Relay, 'topicSync',
registry.Boolean(True, """Determines whether the bot will synchronize registry.Boolean(True, """Determines whether the bot will synchronize
topics between networks in the channels it relays.""")) topics between networks in the channels it relays."""))
conf.registerGroup(conf.supybot.plugins.Relay, 'networks')
class Relay(callbacks.Privmsg): class Relay(callbacks.Privmsg):
noIgnore = True noIgnore = True
priority = sys.maxint priority = sys.maxint
@ -139,6 +142,9 @@ class Relay(callbacks.Privmsg):
callbacks.Privmsg.__call__(self, irc, msg) callbacks.Privmsg.__call__(self, irc, msg)
def do376(self, irc, msg): def do376(self, irc, msg):
# channels = []
# networks = conf.supybot.plugins.Relay.networks
# networked = [irc.network for irc in world.ircs]
if self.channels: if self.channels:
irc.queueMsg(ircmsgs.joins(self.channels)) irc.queueMsg(ircmsgs.joins(self.channels))
do377 = do422 = do376 do377 = do422 = do376

View File

@ -49,7 +49,7 @@ import schedule
import callbacks import callbacks
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('Services', True) conf.registerPlugin('Services', True)
nick = something('What is your registered nick?') nick = something('What is your registered nick?')
password = something('What is your password for that nick?') password = something('What is your password for that nick?')

View File

@ -54,7 +54,7 @@ import callbacks
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('Sourceforge', True) conf.registerPlugin('Sourceforge', True)
output("""The Sourceforge plugin has the functionality to watch for URLs output("""The Sourceforge plugin has the functionality to watch for URLs
that match a specific pattern (we call this a snarfer). When that match a specific pattern (we call this a snarfer). When

View File

@ -62,7 +62,7 @@ except ImportError:
'plugin. Download it at <http://pysqlite.sf.net/>' 'plugin. Download it at <http://pysqlite.sf.net/>'
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('URL', True) conf.registerPlugin('URL', True)
if yn("""This plugin offers a snarfer that will go to tinyurl.com and get if yn("""This plugin offers a snarfer that will go to tinyurl.com and get
a shorter version of long URLs that are sent to the channel. a shorter version of long URLs that are sent to the channel.

View File

@ -55,7 +55,7 @@ import callbacks
import utils import utils
def configure(advanced): def configure(advanced):
from questions import expect, anything, something, yn from questions import output, expect, anything, something, yn
conf.registerPlugin('Unix', True) conf.registerPlugin('Unix', True)
spellCmd = utils.findBinaryInPath('aspell') spellCmd = utils.findBinaryInPath('aspell')
if not spellCmd: if not spellCmd: