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):
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.')
if yn('Do you have a license key?'):
key = anything('What is it?')

View File

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

View File

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

View File

@ -53,7 +53,7 @@ import callbacks
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.')
if yn('Would you like to specify a different dictd server?'):
server = something('What server?')

View File

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

View File

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

View File

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

View File

@ -60,7 +60,7 @@ import callbacks
import structures
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.')
if yn('Do you have a license key?'):
key = something('What is it?')

View File

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

View File

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

View File

@ -66,7 +66,7 @@ if hasattr(math, '__file__'):
pythonPath = map(os.path.dirname, L)
def configure(advanced):
from questions import expect, anything, something, yn
from questions import output, expect, anything, something, yn
conf.registerPlugin('Python', True)
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.

View File

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

View File

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

View File

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

View File

@ -54,7 +54,7 @@ import callbacks
def configure(advanced):
from questions import expect, anything, something, yn
from questions import output, expect, anything, something, yn
conf.registerPlugin('Sourceforge', True)
output("""The Sourceforge plugin has the functionality to watch for URLs
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/>'
def configure(advanced):
from questions import expect, anything, something, yn
from questions import output, expect, anything, something, yn
conf.registerPlugin('URL', True)
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.

View File

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