Make a custom anything() function that follows the same form as every other function in supybot.questions, because apparently no one thought this was a good idea...
This commit is contained in:
@ -28,11 +28,17 @@ class SpaceSeparatedListOfTypes(registry.SpaceSeparatedListOf):
|
||||
|
||||
|
||||
def configure(advanced):
|
||||
from supybot.question import yn, something, anything, output
|
||||
from supybot.question import yn, something, output
|
||||
import sqlite
|
||||
import re
|
||||
import os
|
||||
from supybot.utils.str import format
|
||||
|
||||
def anything(prompt, default=None):
|
||||
"""Because supybot is pure fail"""
|
||||
from supybot.questions import expect
|
||||
return expect(prompt, [], default=default)
|
||||
|
||||
conf.registerPlugin('Bantracker', True)
|
||||
|
||||
def getReviewTime():
|
||||
|
@ -22,7 +22,13 @@ class Bugtrackers(registry.SpaceSeparatedListOfStrings):
|
||||
List = ircutils.IrcSet
|
||||
|
||||
def configure(advanced):
|
||||
from supybot.questions import expect, anything, something, yn
|
||||
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)
|
||||
|
||||
conf.registerPlugin('Bugtracker', True)
|
||||
|
||||
Bugtracker = conf.registerPlugin('Bugtracker')
|
||||
|
@ -18,10 +18,16 @@ import supybot.conf as conf
|
||||
import supybot.registry as registry
|
||||
|
||||
def configure(advanced):
|
||||
from supybot.questions import yn, something, anything, output
|
||||
from supybot.questions import yn, something, output
|
||||
from supybot.utils.str import format
|
||||
import sqlite
|
||||
import re
|
||||
|
||||
def anything(prompt, default=None):
|
||||
"""Because supybot is pure fail"""
|
||||
from supybot.questions import expect
|
||||
return expect(prompt, [], default=default)
|
||||
|
||||
Encyclopedia = conf.registerPlugin('Encyclopedia', True)
|
||||
|
||||
enabled = yn("Enable Encyclopedia for all channels?", default=Encyclopedia.enabled._default)
|
||||
|
@ -17,7 +17,13 @@ import supybot.conf as conf
|
||||
import supybot.registry as registry
|
||||
|
||||
def configure(advanced):
|
||||
from supybot.questions import expect, anything, something, yn
|
||||
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)
|
||||
|
||||
conf.registerPlugin('IRCLogin', True)
|
||||
|
||||
IRCLogin = conf.registerPlugin('IRCLogin')
|
||||
|
@ -37,7 +37,13 @@ def configure(advanced):
|
||||
# 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
|
||||
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)
|
||||
|
||||
conf.registerPlugin('Lart', True)
|
||||
|
||||
|
||||
|
@ -17,7 +17,13 @@ import supybot.conf as conf
|
||||
import supybot.registry as registry
|
||||
|
||||
def configure(advanced):
|
||||
from supybot.questions import expect, anything, something, yn
|
||||
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)
|
||||
|
||||
conf.registerPlugin('Mess', True)
|
||||
|
||||
Mess = conf.registerPlugin('Mess')
|
||||
|
@ -26,8 +26,14 @@ def configure(advanced):
|
||||
deb-src http://archive.ubuntu.com/ubuntu/ %s main restricted universe multiverse
|
||||
"""
|
||||
|
||||
from supybot.questions import output, expect, anything, something, yn
|
||||
from supybot.questions import output, expect, something, yn
|
||||
import os
|
||||
|
||||
def anything(prompt, default=None):
|
||||
"""Because supybot is pure fail"""
|
||||
from supybot.questions import expect
|
||||
return expect(prompt, [], default=default)
|
||||
|
||||
conf.registerPlugin('PackageInfo', True)
|
||||
|
||||
enabled = yn("Enable this plugin in all channels?", default=True)
|
||||
|
@ -17,7 +17,13 @@ import supybot.conf as conf
|
||||
import supybot.registry as registry
|
||||
|
||||
def configure(advanced):
|
||||
from supybot.questions import expect, anything, something, yn
|
||||
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)
|
||||
|
||||
conf.registerPlugin('Webcal', True)
|
||||
|
||||
Webcal = conf.registerPlugin('Webcal')
|
||||
|
Reference in New Issue
Block a user