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 callbacks
import structures 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): class AliasError(Exception):
pass pass

View File

@ -49,7 +49,7 @@ import privmsgs
import callbacks import callbacks
def configure(onStart): def configure(advanced):
# This will be called by setup.py to configure this module. onStart and # This will be called by setup.py to configure this module. onStart and
# afterConnect are both lists. Append to onStart the commands you would # afterConnect are both lists. Append to onStart the commands you would
# like to be run when the bot is started; append to afterConnect the # like to be run when the bot is started; append to afterConnect the

View File

@ -46,15 +46,6 @@ import utils
import privmsgs import privmsgs
import callbacks 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): class Babelfish(callbacks.Privmsg):
threaded = True threaded = True
_abbrevs = utils.abbrev(imap(str.lower, babelfish.available_languages)) _abbrevs = utils.abbrev(imap(str.lower, babelfish.available_languages))

View File

@ -48,7 +48,7 @@ import ircmsgs
import privmsgs import privmsgs
import callbacks import callbacks
def configure(onStart): def configure(advanced):
from questions import expect, anything, something, yn from questions import expect, anything, something, yn
conf.registerPlugin('BadWords', True) conf.registerPlugin('BadWords', True)
while yn('Would you like to add some bad words?') == 'y': while yn('Would you like to add some bad words?') == 'y':

View File

@ -90,7 +90,7 @@ class BugzillaError(Exception):
pass pass
def configure(onStart): def configure(advanced):
from questions import expect, anything, yn from questions import expect, anything, yn
conf.registerPlugin('Bugzilla', True) conf.registerPlugin('Bugzilla', True)
print 'The Bugzilla plugin has the functionality to watch for URLs' print 'The Bugzilla plugin has the functionality to watch for URLs'

View File

@ -49,15 +49,6 @@ import ircutils
import privmsgs import privmsgs
import callbacks 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): class DCC(callbacks.Privmsg):
def chat(self, irc, msg, args): def chat(self, irc, msg, args):
"""<text> """<text>

View File

@ -54,14 +54,6 @@ except ImportError:
dbfilename = os.path.join(conf.supybot.directories.data(), 'Dunno.db') 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): class Dunno(callbacks.Privmsg):
priority = 100 priority = 100
def __init__(self): def __init__(self):

View File

@ -52,7 +52,7 @@ import privmsgs
import callbacks import callbacks
def configure(onStart): def configure(advanced):
# This will be called by setup.py to configure this module. onStart and # This will be called by setup.py to configure this module. onStart and
# afterConnect are both lists. Append to onStart the commands you would # afterConnect are both lists. Append to onStart the commands you would
# like to be run when the bot is started; append to afterConnect the # like to be run when the bot is started; append to afterConnect the

View File

@ -46,7 +46,7 @@ import privmsgs
import ircutils import ircutils
import callbacks import callbacks
def configure(onStart): def configure(advanced):
from questions import expect, anything, something, yn from questions import expect, anything, something, yn
conf.registerPlugin('Enforcer', True) conf.registerPlugin('Enforcer', True)
chanserv = something('What\'s the name of ChanServ on your network?') chanserv = something('What\'s the name of ChanServ on your network?')

View File

@ -51,7 +51,7 @@ import privmsgs
import callbacks import callbacks
def configure(onStart): def configure(advanced):
# This will be called by setup.py to configure this module. onStart and # This will be called by setup.py to configure this module. onStart and
# afterConnect are both lists. Append to onStart the commands you would # afterConnect are both lists. Append to onStart the commands you would
# like to be run when the bot is started; append to afterConnect the # like to be run when the bot is started; append to afterConnect the

View File

@ -59,7 +59,7 @@ import privmsgs
import callbacks import callbacks
import structures import structures
def configure(onStart): def configure(advanced):
from questions import expect, anything, something, yn from questions import expect, anything, something, yn
print 'To use Google\'t Web Services, you must have a license key.' print 'To use Google\'t Web Services, you must have a license key.'
if yn('Do you have a license key?') == 'y': 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') 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): def makeDb(filename):
if os.path.exists(filename): if os.path.exists(filename):
return sqlite.connect(filename) return sqlite.connect(filename)

View File

@ -43,14 +43,6 @@ import ircmsgs
import callbacks 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. # For some stupid reason, this doesn't work.
## boldre = re.compile('(?:\x02([^\x02\x03\x0f]*\x03))|' ## boldre = re.compile('(?:\x02([^\x02\x03\x0f]*\x03))|'
## '(?:\x02([^\x02\x0f]*)(?:[\x02\x0f]|$))') ## '(?:\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 ' \ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
'plugin. Download it at <http://pysqlite.sf.net/>' '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 # This will be called by setup.py to configure this module. onStart and
# afterConnect are both lists. Append to onStart the commands you would # afterConnect are both lists. Append to onStart the commands you would
# like to be run when the bot is started; append to afterConnect the # 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 ' \ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
'plugin. Download it at <http://pysqlite.sf.net/>' '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): class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
threaded = True threaded = True
def __init__(self): def __init__(self):

View File

@ -51,14 +51,6 @@ import callbacks
import convertcore 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): class Math(callbacks.Privmsg):
### ###
# So this is how the 'calc' command works: # 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') 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('', '') allchars = string.maketrans('', '')
class OptionList(object): class OptionList(object):

View File

@ -49,14 +49,6 @@ import privmsgs
import callbacks 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): class Movies(callbacks.Privmsg):
threaded = True threaded = True
def _formatMovie(self, movie): def _formatMovie(self, movie):

View File

@ -47,14 +47,6 @@ import privmsgs
import callbacks 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): class Network(callbacks.Privmsg):
threaded = True threaded = True
def dns(self, irc, msg, args): 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 ' \ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
'plugin. Download it at <http://pysqlite.sf.net/>' '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): class News(plugins.ChannelDBHandler, callbacks.Privmsg):
def __init__(self): def __init__(self):
plugins.ChannelDBHandler.__init__(self) plugins.ChannelDBHandler.__init__(self)

View File

@ -45,14 +45,6 @@ import privmsgs
import callbacks 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 = { buildings = {
'AA': 'Agricultural Administration Building, ' \ 'AA': 'Agricultural Administration Building, ' \
'2120 Fyffe Road, Columbus, Ohio, 43210', '2120 Fyffe Road, Columbus, Ohio, 43210',

View File

@ -49,7 +49,7 @@ import plugins
import privmsgs import privmsgs
import callbacks import callbacks
def configure(onStart): def configure(advanced):
from questions import something, yn from questions import something, yn
conf.registerPlugin('Parter', True) conf.registerPlugin('Parter', True)
s = ' ' s = ' '

View File

@ -54,14 +54,6 @@ except ImportError:
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
'plugin. Download it at <http://pysqlite.sf.net/>' '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): class Poll(callbacks.Privmsg, plugins.ChannelDBHandler):
def __init__(self): def __init__(self):
callbacks.Privmsg.__init__(self) callbacks.Privmsg.__init__(self)

View File

@ -65,7 +65,7 @@ if hasattr(math, '__file__'):
L.append(math.__file__) L.append(math.__file__)
pythonPath = map(os.path.dirname, L) pythonPath = map(os.path.dirname, L)
def configure(onStart): def configure(advanced):
from questions import expect, anything, something, yn from questions import expect, anything, something, yn
conf.registerPlugin('Python', True) conf.registerPlugin('Python', True)
if yn("""This plugin provides a snarfer for ASPN Python Recipe URLs; if yn("""This plugin provides a snarfer for ASPN Python Recipe URLs;

View File

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

View File

@ -53,7 +53,7 @@ import privmsgs
import callbacks import callbacks
import configurable import configurable
def configure(onStart): def configure(advanced):
import socket import socket
from questions import expect, anything, something, yn from questions import expect, anything, something, yn
conf.registerPlugin('Relay', True) conf.registerPlugin('Relay', True)

View File

@ -46,15 +46,6 @@ import schedule
import callbacks 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): class Scheduler(callbacks.Privmsg):
def __init__(self): def __init__(self):
callbacks.Privmsg.__init__(self) callbacks.Privmsg.__init__(self)

View File

@ -52,7 +52,7 @@ import webutils
import callbacks import callbacks
def configure(onStart): def configure(advanced):
# This will be called by setup.py to configure this module. onStart and # This will be called by setup.py to configure this module. onStart and
# afterConnect are both lists. Append to onStart the commands you would # afterConnect are both lists. Append to onStart the commands you would
# like to be run when the bot is started; append to afterConnect the # like to be run when the bot is started; append to afterConnect the

View File

@ -51,14 +51,6 @@ import privmsgs
import callbacks 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): class Status(callbacks.Privmsg):
def __init__(self): def __init__(self):
callbacks.Privmsg.__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 ' \ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
'plugin. Download it at <http://pysqlite.sf.net/>' '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): class TodoDB(plugins.DBHandler):
def makeDb(self, filename): def makeDb(self, filename):
"""create Todo database and tables""" """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 ' \ raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
'plugin. Download it at <http://pysqlite.sf.net/>' 'plugin. Download it at <http://pysqlite.sf.net/>'
def configure(onStart): def configure(advanced):
from questions import expect, anything, something, yn from questions import expect, anything, something, yn
conf.registerPlugin('URL', True) conf.registerPlugin('URL', True)
if yn("""This plugin offers a snarfer that will go to tinyurl.com and get 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 callbacks
import utils import utils
def configure(onStart): def configure(advanced):
from questions import expect, anything, something, yn from questions import expect, anything, something, yn
conf.registerPlugin('Unix', True) conf.registerPlugin('Unix', True)
spellCmd = utils.findBinaryInPath('aspell') spellCmd = utils.findBinaryInPath('aspell')

View File

@ -45,10 +45,6 @@ import ircutils
import privmsgs import privmsgs
import callbacks import callbacks
def configure(onStart):
from questions import expect, anything, yn
conf.registerPlugin('Utilities', True)
class Utilities(callbacks.Privmsg): class Utilities(callbacks.Privmsg):
def ignore(self, irc, msg, args): def ignore(self, irc, msg, args):
"""takes no arguments """takes no arguments

View File

@ -44,15 +44,6 @@ import privmsgs
import callbacks 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): class Weather(callbacks.Privmsg):
threaded = True threaded = True
def callCommand(self, method, irc, msg, *L): def callCommand(self, method, irc, msg, *L):

View File

@ -42,10 +42,6 @@ import privmsgs
import callbacks import callbacks
def configure(advanced):
from questions import expect, anything, something, yn
conf.registerPlugin('WordStats', True)
conf.registerPlugin('WordStats') conf.registerPlugin('WordStats')
conf.registerChannelValue(conf.supybot.plugins.WordStats, conf.registerChannelValue(conf.supybot.plugins.WordStats,
'wordstatsRankingDisplay', 'wordstatsRankingDisplay',

View File

@ -52,15 +52,6 @@ import ircutils
import registry 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): class WordsDB(plugins.DBHandler):
def makeDb(self, filename): def makeDb(self, filename):
if os.path.exists(filename): if os.path.exists(filename):