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:
parent
15d0b1cbda
commit
f3de8f84a6
|
@ -28,11 +28,17 @@ class SpaceSeparatedListOfTypes(registry.SpaceSeparatedListOf):
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from supybot.question import yn, something, anything, output
|
from supybot.question import yn, something, output
|
||||||
import sqlite
|
import sqlite
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
from supybot.utils.str import format
|
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)
|
conf.registerPlugin('Bantracker', True)
|
||||||
|
|
||||||
def getReviewTime():
|
def getReviewTime():
|
||||||
|
|
|
@ -22,7 +22,13 @@ class Bugtrackers(registry.SpaceSeparatedListOfStrings):
|
||||||
List = ircutils.IrcSet
|
List = ircutils.IrcSet
|
||||||
|
|
||||||
def configure(advanced):
|
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)
|
conf.registerPlugin('Bugtracker', True)
|
||||||
|
|
||||||
Bugtracker = conf.registerPlugin('Bugtracker')
|
Bugtracker = conf.registerPlugin('Bugtracker')
|
||||||
|
|
|
@ -18,10 +18,16 @@ import supybot.conf as conf
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from supybot.questions import yn, something, anything, output
|
from supybot.questions import yn, something, output
|
||||||
from supybot.utils.str import format
|
from supybot.utils.str import format
|
||||||
import sqlite
|
import sqlite
|
||||||
import re
|
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)
|
Encyclopedia = conf.registerPlugin('Encyclopedia', True)
|
||||||
|
|
||||||
enabled = yn("Enable Encyclopedia for all channels?", default=Encyclopedia.enabled._default)
|
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
|
import supybot.registry as registry
|
||||||
|
|
||||||
def configure(advanced):
|
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)
|
conf.registerPlugin('IRCLogin', True)
|
||||||
|
|
||||||
IRCLogin = conf.registerPlugin('IRCLogin')
|
IRCLogin = conf.registerPlugin('IRCLogin')
|
||||||
|
|
|
@ -37,7 +37,13 @@ def configure(advanced):
|
||||||
# a bool that specifies whether the user identified himself as an advanced
|
# a bool that specifies whether the user identified himself as an advanced
|
||||||
# user or not. You should effect your configuration by manipulating the
|
# user or not. You should effect your configuration by manipulating the
|
||||||
# registry as appropriate.
|
# 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)
|
conf.registerPlugin('Lart', True)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,13 @@ import supybot.conf as conf
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
def configure(advanced):
|
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)
|
conf.registerPlugin('Mess', True)
|
||||||
|
|
||||||
Mess = conf.registerPlugin('Mess')
|
Mess = conf.registerPlugin('Mess')
|
||||||
|
|
|
@ -26,8 +26,14 @@ def configure(advanced):
|
||||||
deb-src http://archive.ubuntu.com/ubuntu/ %s main restricted universe multiverse
|
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
|
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)
|
conf.registerPlugin('PackageInfo', True)
|
||||||
|
|
||||||
enabled = yn("Enable this plugin in all channels?", default=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
|
import supybot.registry as registry
|
||||||
|
|
||||||
def configure(advanced):
|
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)
|
conf.registerPlugin('Webcal', True)
|
||||||
|
|
||||||
Webcal = conf.registerPlugin('Webcal')
|
Webcal = conf.registerPlugin('Webcal')
|
||||||
|
|
Loading…
Reference in New Issue