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:
James Vega 2004-01-29 23:58:27 +00:00
parent 17174d134d
commit fac4c5624c
36 changed files with 15 additions and 176 deletions

View File

@ -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

View File

@ -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

View File

@ -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))

View File

@ -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':

View File

@ -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'

View File

@ -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>

View File

@ -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):

View File

@ -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

View File

@ -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?')

View File

@ -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

View File

@ -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':

View File

@ -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)

View File

@ -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]|$))')

View File

@ -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

View File

@ -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):

View File

@ -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:

View File

@ -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):

View File

@ -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):

View File

@ -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):

View File

@ -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)

View File

@ -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',

View File

@ -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 = ' '

View File

@ -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)

View File

@ -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;

View File

@ -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?'

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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"""

View File

@ -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

View File

@ -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')

View File

@ -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

View File

@ -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):

View File

@ -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',

View File

@ -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):