mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 19:52:54 +01:00
Updated configure() to only take one argument (onStart) and switched all of
the onStart.append('load pluginName') calls to conf.registerPlugin('pluginName', True)
This commit is contained in:
parent
7bdf8210cb
commit
bc11f76166
@ -47,13 +47,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
import structures
|
import structures
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Alias')
|
conf.registerPlugin('Alias', True)
|
||||||
|
|
||||||
class AliasError(Exception):
|
class AliasError(Exception):
|
||||||
pass
|
pass
|
||||||
|
@ -49,7 +49,7 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
@ -59,7 +59,7 @@ def configure(onStart, afterConnect, advanced):
|
|||||||
if yn('Do you have a license key?') == 'y':
|
if yn('Do you have a license key?') == 'y':
|
||||||
key = anything('What is it?')
|
key = anything('What is it?')
|
||||||
|
|
||||||
onStart.append('load Amazon')
|
conf.registerPlugin('Amazon', True)
|
||||||
conf.supybot.plugins.Amazon.licenseKey.set(key)
|
conf.supybot.plugins.Amazon.licenseKey.set(key)
|
||||||
else:
|
else:
|
||||||
print 'You\'ll need to get a key before you can use this plugin.'
|
print 'You\'ll need to get a key before you can use this plugin.'
|
||||||
|
@ -47,13 +47,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Babelfish')
|
conf.registerPlugin('Babelfish', True)
|
||||||
|
|
||||||
class Babelfish(callbacks.Privmsg):
|
class Babelfish(callbacks.Privmsg):
|
||||||
threaded = True
|
threaded = True
|
||||||
|
@ -48,9 +48,9 @@ import ircmsgs
|
|||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load BadWords')
|
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':
|
||||||
words = anything('What words? (separate individual words by spaces)')
|
words = anything('What words? (separate individual words by spaces)')
|
||||||
onStart.append('badwords add %s' % words)
|
onStart.append('badwords add %s' % words)
|
||||||
|
@ -90,9 +90,9 @@ class BugzillaError(Exception):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
from questions import expect, anything, yn
|
from questions import expect, anything, yn
|
||||||
onStart.append('load Bugzilla')
|
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'
|
||||||
print 'that match a specific pattern (we call this a snarfer). When'
|
print 'that match a specific pattern (we call this a snarfer). When'
|
||||||
print 'supybot sees such a URL, he will parse the web page for'
|
print 'supybot sees such a URL, he will parse the web page for'
|
||||||
|
@ -50,13 +50,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load DCC')
|
conf.registerPlugin('DCC', True)
|
||||||
|
|
||||||
class DCC(callbacks.Privmsg):
|
class DCC(callbacks.Privmsg):
|
||||||
def chat(self, irc, msg, args):
|
def chat(self, irc, msg, args):
|
||||||
|
@ -57,13 +57,13 @@ import webutils
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Debian')
|
conf.registerPlugin('Debian', True)
|
||||||
if not utils.findBinaryInPath('zegrep'):
|
if not utils.findBinaryInPath('zegrep'):
|
||||||
if not advanced:
|
if not advanced:
|
||||||
print 'I can\'t find zegrep in your path. This is necessary '
|
print 'I can\'t find zegrep in your path. This is necessary '
|
||||||
|
@ -54,13 +54,13 @@ 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, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Dunno')
|
conf.registerPlugin('Dunno', True)
|
||||||
|
|
||||||
class Dunno(callbacks.Privmsg):
|
class Dunno(callbacks.Privmsg):
|
||||||
priority = 100
|
priority = 100
|
||||||
|
@ -52,13 +52,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Ebay')
|
conf.registerPlugin('Ebay', True)
|
||||||
print 'The Ebay plugin has the functionality to watch for URLs'
|
print 'The Ebay plugin has the functionality to watch for URLs'
|
||||||
print 'that match a specific pattern (we call this a snarfer). When'
|
print 'that match a specific pattern (we call this a snarfer). When'
|
||||||
print 'supybot sees such a URL, he will parse the web page for'
|
print 'supybot sees such a URL, he will parse the web page for'
|
||||||
|
@ -46,16 +46,16 @@ import privmsgs
|
|||||||
import ircutils
|
import ircutils
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Enforcer')
|
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?')
|
||||||
if yn('Do you want the bot to take revenge on rule breakers?') == 'y':
|
if yn('Do you want the bot to take revenge on rule breakers?') == 'y':
|
||||||
revenge = True
|
revenge = True
|
||||||
else:
|
else:
|
||||||
revenge = False
|
revenge = False
|
||||||
onStart.append('enforcer start %s' % chanserv)
|
onStart.append('enforcer start %s' % chanserv)
|
||||||
onStart.append('enforcer config revenge %s' % revenge)
|
conf.supybot.plugins.Enforcer.takeRevenge.setValue(revenge)
|
||||||
|
|
||||||
conf.registerPlugin('Enforcer')
|
conf.registerPlugin('Enforcer')
|
||||||
conf.registerChannelValue(conf.supybot.plugins.Enforcer, 'autoOp',
|
conf.registerChannelValue(conf.supybot.plugins.Enforcer, 'autoOp',
|
||||||
|
@ -51,13 +51,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Gameknot')
|
conf.registerPlugin('Gameknot', True)
|
||||||
if advanced:
|
if advanced:
|
||||||
print 'The Gameknot plugin has the functionality to watch for URLs'
|
print 'The Gameknot plugin has the functionality to watch for URLs'
|
||||||
print 'that match a specific pattern (we call this a snarfer). When'
|
print 'that match a specific pattern (we call this a snarfer). When'
|
||||||
|
@ -59,7 +59,7 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
import structures
|
import structures
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
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':
|
||||||
@ -72,7 +72,7 @@ def configure(onStart, afterConnect, advanced):
|
|||||||
key = ''
|
key = ''
|
||||||
break
|
break
|
||||||
if key:
|
if key:
|
||||||
onStart.append('load Google')
|
conf.registerPlugin('Google', True)
|
||||||
conf.supybot.plugins.Google.licenseKey.setValue(key)
|
conf.supybot.plugins.Google.licenseKey.setValue(key)
|
||||||
print 'The Google plugin has the functionality to watch for URLs'
|
print 'The Google plugin has the functionality to watch for URLs'
|
||||||
print 'that match a specific pattern (we call this a snarfer).'
|
print 'that match a specific pattern (we call this a snarfer).'
|
||||||
@ -88,10 +88,10 @@ def configure(onStart, afterConnect, advanced):
|
|||||||
if yn('Do you want the Google search snarfer enabled by default?') \
|
if yn('Do you want the Google search snarfer enabled by default?') \
|
||||||
== 'y':
|
== 'y':
|
||||||
conf.supybot.plugins.Google.searchSnarfer.setValue(True)
|
conf.supybot.plugins.Google.searchSnarfer.setValue(True)
|
||||||
if 'load Alias' not in onStart:
|
if not conf.supybot.plugins.Alias():
|
||||||
print 'Google depends on the Alias module for some extra commands.'
|
print 'Google depends on the Alias module for some extra commands.'
|
||||||
if yn('Would you like to load the Alias module now?') == 'y':
|
if yn('Would you like to load the Alias module now?') == 'y':
|
||||||
onStart.append('load Alias')
|
conf.registerPlugin('Alias', True)
|
||||||
else:
|
else:
|
||||||
print 'You can still use the Google module, but you won\'t ' \
|
print 'You can still use the Google module, but you won\'t ' \
|
||||||
'have these extra commands enabled.'
|
'have these extra commands enabled.'
|
||||||
|
@ -54,9 +54,9 @@ 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, afterConnect, advanced):
|
def configure(onStart):
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Infobot')
|
conf.registerPlugin('Infobot', True)
|
||||||
|
|
||||||
def makeDb(filename):
|
def makeDb(filename):
|
||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
|
@ -43,13 +43,13 @@ import ircmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load KillBold')
|
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))|'
|
||||||
|
@ -55,13 +55,13 @@ 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, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Lookup')
|
conf.registerPlugin('Lookup', True)
|
||||||
print 'This module allows you to define commands that do a simple key'
|
print 'This module allows you to define commands that do a simple key'
|
||||||
print 'lookup and return some simple value. It has a command "add"'
|
print 'lookup and return some simple value. It has a command "add"'
|
||||||
### TODO: fix conf.dataDir here. I'm waiting until we rewrite this with
|
### TODO: fix conf.dataDir here. I'm waiting until we rewrite this with
|
||||||
|
@ -53,13 +53,13 @@ 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, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Markov')
|
conf.registerPlugin('Markov', True)
|
||||||
|
|
||||||
class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
|
class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||||
threaded = True
|
threaded = True
|
||||||
|
@ -51,13 +51,13 @@ import callbacks
|
|||||||
import convertcore
|
import convertcore
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Math')
|
conf.registerPlugin('Math', True)
|
||||||
|
|
||||||
class Math(callbacks.Privmsg):
|
class Math(callbacks.Privmsg):
|
||||||
###
|
###
|
||||||
|
@ -67,13 +67,13 @@ except ImportError:
|
|||||||
|
|
||||||
dbfilename = os.path.join(conf.supybot.directories.data(), 'MoobotFactoids')
|
dbfilename = os.path.join(conf.supybot.directories.data(), 'MoobotFactoids')
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load MoobotFactoids')
|
conf.registerPlugin('MoobotFactoids', True)
|
||||||
|
|
||||||
|
|
||||||
allchars = string.maketrans('', '')
|
allchars = string.maketrans('', '')
|
||||||
|
@ -49,13 +49,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Movies')
|
conf.registerPlugin('Movies', True)
|
||||||
|
|
||||||
class Movies(callbacks.Privmsg):
|
class Movies(callbacks.Privmsg):
|
||||||
threaded = True
|
threaded = True
|
||||||
|
@ -47,13 +47,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Network')
|
conf.registerPlugin('Network', True)
|
||||||
|
|
||||||
class Network(callbacks.Privmsg):
|
class Network(callbacks.Privmsg):
|
||||||
threaded = True
|
threaded = True
|
||||||
|
@ -53,13 +53,13 @@ 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, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load News')
|
conf.registerPlugin('News', True)
|
||||||
|
|
||||||
class News(plugins.ChannelDBHandler, callbacks.Privmsg):
|
class News(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -45,13 +45,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load OSU')
|
conf.registerPlugin('OSU', True)
|
||||||
|
|
||||||
buildings = {
|
buildings = {
|
||||||
'AA': 'Agricultural Administration Building, ' \
|
'AA': 'Agricultural Administration Building, ' \
|
||||||
|
@ -49,9 +49,9 @@ import plugins
|
|||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
from questions import something, yn
|
from questions import something, yn
|
||||||
onStart.append('load Parter')
|
conf.registerPlugin('Parter', True)
|
||||||
s = ' '
|
s = ' '
|
||||||
while s:
|
while s:
|
||||||
if yn('Would you like to automatically part a channel?') == 'y':
|
if yn('Would you like to automatically part a channel?') == 'y':
|
||||||
|
@ -54,13 +54,13 @@ 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, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Poll')
|
conf.registerPlugin('Poll', True)
|
||||||
|
|
||||||
class Poll(callbacks.Privmsg, plugins.ChannelDBHandler):
|
class Poll(callbacks.Privmsg, plugins.ChannelDBHandler):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -51,15 +51,15 @@ import privmsgs
|
|||||||
import registry
|
import registry
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load RSS')
|
conf.registerPlugin('RSS', True)
|
||||||
prompt = 'Would you like to add an RSS feed?'
|
prompt = 'Would you like to add an RSS feed?'
|
||||||
while yn(prompt) == 'y':
|
while yn(prompt) == 'y':
|
||||||
prompt = 'Would you like to add another RSS feed?'
|
prompt = 'Would you like to add another RSS feed?'
|
||||||
name = something('What\'s the name of the website?')
|
name = something('What\'s the name of the website?')
|
||||||
url = something('What\'s the URL of the RSS feed?')
|
url = something('What\'s the URL of the RSS feed?')
|
||||||
onStart.append('rss add %s %s' % (name, url))
|
registerFeed(name, url)
|
||||||
|
|
||||||
conf.registerPlugin('RSS')
|
conf.registerPlugin('RSS')
|
||||||
conf.registerChannelValue(conf.supybot.plugins.RSS, 'bold', registry.Boolean(
|
conf.registerChannelValue(conf.supybot.plugins.RSS, 'bold', registry.Boolean(
|
||||||
|
@ -53,10 +53,10 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
import configurable
|
import configurable
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
import socket
|
import socket
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Relay')
|
conf.registerPlugin('Relay', True)
|
||||||
startNetwork = anything('What is the name of the network you\'re ' \
|
startNetwork = anything('What is the name of the network you\'re ' \
|
||||||
'connecting to first?')
|
'connecting to first?')
|
||||||
onStart.append('relay start %s' % startNetwork)
|
onStart.append('relay start %s' % startNetwork)
|
||||||
|
@ -46,13 +46,13 @@ import schedule
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Scheduler')
|
conf.registerPlugin('Scheduler', True)
|
||||||
|
|
||||||
|
|
||||||
class Scheduler(callbacks.Privmsg):
|
class Scheduler(callbacks.Privmsg):
|
||||||
|
@ -52,13 +52,13 @@ import webutils
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Sourceforge')
|
conf.registerPlugin('Sourceforge', True)
|
||||||
print 'The Sourceforge plugin has the functionality to watch for URLs'
|
print 'The Sourceforge plugin has the functionality to watch for URLs'
|
||||||
print 'that match a specific pattern (we call this a snarfer). When'
|
print 'that match a specific pattern (we call this a snarfer). When'
|
||||||
print 'supybot sees such a URL, he will parse the web page for'
|
print 'supybot sees such a URL, he will parse the web page for'
|
||||||
@ -85,10 +85,10 @@ def configure(onStart, afterConnect, advanced):
|
|||||||
print 'bug command). You may save some time by making an alias for'
|
print 'bug command). You may save some time by making an alias for'
|
||||||
print '"sourceforge". We like to make it "sf".'
|
print '"sourceforge". We like to make it "sf".'
|
||||||
if yn('Would you like to add sf as an alias for Sourceforge?') == 'y':
|
if yn('Would you like to add sf as an alias for Sourceforge?') == 'y':
|
||||||
if 'load Alias' not in onStart:
|
if not conf.supybot.plugins.Alias():
|
||||||
print 'This depends on the Alias module.'
|
print 'This depends on the Alias module.'
|
||||||
if yn('Would you like to load the Alias plugin now?') == 'y':
|
if yn('Would you like to load the Alias plugin now?') == 'y':
|
||||||
onStart.append('load Alias')
|
conf.registerPlugin('Alias', True)
|
||||||
else:
|
else:
|
||||||
print 'Then I can\'t add such an alias.'
|
print 'Then I can\'t add such an alias.'
|
||||||
return
|
return
|
||||||
|
@ -51,13 +51,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Status')
|
conf.registerPlugin('Status', True)
|
||||||
|
|
||||||
class Status(callbacks.Privmsg):
|
class Status(callbacks.Privmsg):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -56,13 +56,13 @@ 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, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Todo')
|
conf.registerPlugin('Todo', True)
|
||||||
|
|
||||||
class TodoDB(plugins.DBHandler):
|
class TodoDB(plugins.DBHandler):
|
||||||
def makeDb(self, filename):
|
def makeDb(self, filename):
|
||||||
|
@ -54,9 +54,9 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
import utils
|
import utils
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Unix')
|
conf.registerPlugin('Unix', True)
|
||||||
spellCmd = utils.findBinaryInPath('aspell')
|
spellCmd = utils.findBinaryInPath('aspell')
|
||||||
if not spellCmd:
|
if not spellCmd:
|
||||||
spellCmd = utils.findBinaryInPath('ispell')
|
spellCmd = utils.findBinaryInPath('ispell')
|
||||||
|
@ -45,9 +45,9 @@ import ircutils
|
|||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
from questions import expect, anything, yn
|
from questions import expect, anything, yn
|
||||||
onStart.append('load Utilities')
|
conf.registerPlugin('Utilities', True)
|
||||||
|
|
||||||
class Utilities(callbacks.Privmsg):
|
class Utilities(callbacks.Privmsg):
|
||||||
def ignore(self, irc, msg, args):
|
def ignore(self, irc, msg, args):
|
||||||
|
@ -44,13 +44,13 @@ import privmsgs
|
|||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Weather')
|
conf.registerPlugin('Weather', True)
|
||||||
|
|
||||||
|
|
||||||
class Weather(callbacks.Privmsg):
|
class Weather(callbacks.Privmsg):
|
||||||
|
@ -52,13 +52,13 @@ import ircutils
|
|||||||
import registry
|
import registry
|
||||||
|
|
||||||
|
|
||||||
def configure(onStart, afterConnect, advanced):
|
def configure(onStart):
|
||||||
# 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
|
||||||
# commands you would like to be run when the bot has finished connecting.
|
# commands you would like to be run when the bot has finished connecting.
|
||||||
from questions import expect, anything, something, yn
|
from questions import expect, anything, something, yn
|
||||||
onStart.append('load Words')
|
conf.registerPlugin('Words', True)
|
||||||
|
|
||||||
|
|
||||||
class WordsDB(plugins.DBHandler):
|
class WordsDB(plugins.DBHandler):
|
||||||
|
Loading…
Reference in New Issue
Block a user