mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Removed any unnecessary configure methods (ones that only called
conf.registerPlugin) and changed all other configure methods to accept the advanced argument instead of onStart.
This commit is contained in:
parent
17174d134d
commit
fac4c5624c
@ -47,14 +47,6 @@ import privmsgs
|
||||
import callbacks
|
||||
import structures
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Alias', True)
|
||||
|
||||
class AliasError(Exception):
|
||||
pass
|
||||
|
||||
|
@ -49,7 +49,7 @@ import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
|
@ -46,15 +46,6 @@ import utils
|
||||
import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Babelfish', True)
|
||||
|
||||
class Babelfish(callbacks.Privmsg):
|
||||
threaded = True
|
||||
_abbrevs = utils.abbrev(imap(str.lower, babelfish.available_languages))
|
||||
|
@ -48,7 +48,7 @@ import ircmsgs
|
||||
import privmsgs
|
||||
import callbacks
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('BadWords', True)
|
||||
while yn('Would you like to add some bad words?') == 'y':
|
||||
|
@ -90,7 +90,7 @@ class BugzillaError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
from questions import expect, anything, yn
|
||||
conf.registerPlugin('Bugzilla', True)
|
||||
print 'The Bugzilla plugin has the functionality to watch for URLs'
|
||||
|
@ -49,15 +49,6 @@ import ircutils
|
||||
import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('DCC', True)
|
||||
|
||||
class DCC(callbacks.Privmsg):
|
||||
def chat(self, irc, msg, args):
|
||||
"""<text>
|
||||
|
@ -54,14 +54,6 @@ except ImportError:
|
||||
|
||||
dbfilename = os.path.join(conf.supybot.directories.data(), 'Dunno.db')
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Dunno', True)
|
||||
|
||||
class Dunno(callbacks.Privmsg):
|
||||
priority = 100
|
||||
def __init__(self):
|
||||
|
@ -52,7 +52,7 @@ import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
|
@ -46,7 +46,7 @@ import privmsgs
|
||||
import ircutils
|
||||
import callbacks
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Enforcer', True)
|
||||
chanserv = something('What\'s the name of ChanServ on your network?')
|
||||
|
@ -51,7 +51,7 @@ import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
|
@ -59,7 +59,7 @@ import privmsgs
|
||||
import callbacks
|
||||
import structures
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
from questions import expect, anything, something, yn
|
||||
print 'To use Google\'t Web Services, you must have a license key.'
|
||||
if yn('Do you have a license key?') == 'y':
|
||||
|
@ -54,10 +54,6 @@ except ImportError:
|
||||
|
||||
dbfilename = os.path.join(conf.supybot.directories.data(), 'Infobot.db')
|
||||
|
||||
def configure(onStart):
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Infobot', True)
|
||||
|
||||
def makeDb(filename):
|
||||
if os.path.exists(filename):
|
||||
return sqlite.connect(filename)
|
||||
|
@ -43,14 +43,6 @@ import ircmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('KillBold', True)
|
||||
|
||||
# For some stupid reason, this doesn't work.
|
||||
## boldre = re.compile('(?:\x02([^\x02\x03\x0f]*\x03))|'
|
||||
## '(?:\x02([^\x02\x0f]*)(?:[\x02\x0f]|$))')
|
||||
|
@ -55,7 +55,7 @@ except ImportError:
|
||||
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
|
@ -53,14 +53,6 @@ except ImportError:
|
||||
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Markov', True)
|
||||
|
||||
class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||
threaded = True
|
||||
def __init__(self):
|
||||
|
@ -51,14 +51,6 @@ import callbacks
|
||||
import convertcore
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Math', True)
|
||||
|
||||
class Math(callbacks.Privmsg):
|
||||
###
|
||||
# So this is how the 'calc' command works:
|
||||
|
@ -67,14 +67,6 @@ except ImportError:
|
||||
|
||||
dbfilename = os.path.join(conf.supybot.directories.data(), 'MoobotFactoids')
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('MoobotFactoids', True)
|
||||
|
||||
|
||||
allchars = string.maketrans('', '')
|
||||
class OptionList(object):
|
||||
|
@ -49,14 +49,6 @@ import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Movies', True)
|
||||
|
||||
class Movies(callbacks.Privmsg):
|
||||
threaded = True
|
||||
def _formatMovie(self, movie):
|
||||
|
@ -47,14 +47,6 @@ import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Network', True)
|
||||
|
||||
class Network(callbacks.Privmsg):
|
||||
threaded = True
|
||||
def dns(self, irc, msg, args):
|
||||
|
@ -53,14 +53,6 @@ except ImportError:
|
||||
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('News', True)
|
||||
|
||||
class News(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||
def __init__(self):
|
||||
plugins.ChannelDBHandler.__init__(self)
|
||||
|
@ -45,14 +45,6 @@ import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('OSU', True)
|
||||
|
||||
buildings = {
|
||||
'AA': 'Agricultural Administration Building, ' \
|
||||
'2120 Fyffe Road, Columbus, Ohio, 43210',
|
||||
|
@ -49,7 +49,7 @@ import plugins
|
||||
import privmsgs
|
||||
import callbacks
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
from questions import something, yn
|
||||
conf.registerPlugin('Parter', True)
|
||||
s = ' '
|
||||
|
@ -54,14 +54,6 @@ except ImportError:
|
||||
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Poll', True)
|
||||
|
||||
class Poll(callbacks.Privmsg, plugins.ChannelDBHandler):
|
||||
def __init__(self):
|
||||
callbacks.Privmsg.__init__(self)
|
||||
|
@ -65,7 +65,7 @@ if hasattr(math, '__file__'):
|
||||
L.append(math.__file__)
|
||||
pythonPath = map(os.path.dirname, L)
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Python', True)
|
||||
if yn("""This plugin provides a snarfer for ASPN Python Recipe URLs;
|
||||
|
@ -51,7 +51,7 @@ import privmsgs
|
||||
import registry
|
||||
import callbacks
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('RSS', True)
|
||||
prompt = 'Would you like to add an RSS feed?'
|
||||
|
@ -53,7 +53,7 @@ import privmsgs
|
||||
import callbacks
|
||||
import configurable
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
import socket
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Relay', True)
|
||||
|
@ -46,15 +46,6 @@ import schedule
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Scheduler', True)
|
||||
|
||||
|
||||
class Scheduler(callbacks.Privmsg):
|
||||
def __init__(self):
|
||||
callbacks.Privmsg.__init__(self)
|
||||
|
@ -52,7 +52,7 @@ import webutils
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
|
@ -51,14 +51,6 @@ import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Status', True)
|
||||
|
||||
class Status(callbacks.Privmsg):
|
||||
def __init__(self):
|
||||
callbacks.Privmsg.__init__(self)
|
||||
|
@ -56,14 +56,6 @@ except ImportError:
|
||||
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Todo', True)
|
||||
|
||||
class TodoDB(plugins.DBHandler):
|
||||
def makeDb(self, filename):
|
||||
"""create Todo database and tables"""
|
||||
|
@ -61,7 +61,7 @@ except ImportError:
|
||||
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('URL', True)
|
||||
if yn("""This plugin offers a snarfer that will go to tinyurl.com and get
|
||||
|
@ -54,7 +54,7 @@ import privmsgs
|
||||
import callbacks
|
||||
import utils
|
||||
|
||||
def configure(onStart):
|
||||
def configure(advanced):
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Unix', True)
|
||||
spellCmd = utils.findBinaryInPath('aspell')
|
||||
|
@ -45,10 +45,6 @@ import ircutils
|
||||
import privmsgs
|
||||
import callbacks
|
||||
|
||||
def configure(onStart):
|
||||
from questions import expect, anything, yn
|
||||
conf.registerPlugin('Utilities', True)
|
||||
|
||||
class Utilities(callbacks.Privmsg):
|
||||
def ignore(self, irc, msg, args):
|
||||
"""takes no arguments
|
||||
|
@ -44,15 +44,6 @@ import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Weather', True)
|
||||
|
||||
|
||||
class Weather(callbacks.Privmsg):
|
||||
threaded = True
|
||||
def callCommand(self, method, irc, msg, *L):
|
||||
|
@ -42,10 +42,6 @@ import privmsgs
|
||||
import callbacks
|
||||
|
||||
|
||||
def configure(advanced):
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('WordStats', True)
|
||||
|
||||
conf.registerPlugin('WordStats')
|
||||
conf.registerChannelValue(conf.supybot.plugins.WordStats,
|
||||
'wordstatsRankingDisplay',
|
||||
|
@ -52,15 +52,6 @@ import ircutils
|
||||
import registry
|
||||
|
||||
|
||||
def configure(onStart):
|
||||
# This will be called by setup.py to configure this module. onStart and
|
||||
# afterConnect are both lists. Append to onStart the commands you would
|
||||
# like to be run when the bot is started; append to afterConnect the
|
||||
# commands you would like to be run when the bot has finished connecting.
|
||||
from questions import expect, anything, something, yn
|
||||
conf.registerPlugin('Words', True)
|
||||
|
||||
|
||||
class WordsDB(plugins.DBHandler):
|
||||
def makeDb(self, filename):
|
||||
if os.path.exists(filename):
|
||||
|
Loading…
Reference in New Issue
Block a user