Update copyrights, versions, etc.

This commit is contained in:
oddluck 2020-02-24 18:52:56 +00:00
parent ea9a7de035
commit ee0cce95ef
165 changed files with 4782 additions and 3459 deletions

View File

@ -1,5 +1,5 @@
### ###
# Copyright (c) 2020, oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,11 +25,10 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
Access Azure APIs Azure: Access Microsoft Azure APIs
""" """
import supybot import supybot
@ -38,7 +37,7 @@ import imp
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('oddluck', 'oddluck', 'oddluck@riseup.net') __author__ = supybot.Author('oddluck', 'oddluck', 'oddluck@riseup.net')

View File

@ -1,6 +1,30 @@
### ###
# Copyright (c) 2020, oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,5 +1,5 @@
### ###
# Copyright (c) 2020, oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2005, Jeremiah Fincher # Copyright (c) 2005, Jeremiah Fincher
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,8 +29,8 @@
### ###
""" """
Filters bad words on outgoing messages from the bot, so the bot can't be made BadWords: filters bad words on outgoing/incoming messages so the bot can't be
to say bad words. made to say bad words.
""" """
import supybot import supybot
@ -37,7 +38,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.authors.jemfinch __author__ = supybot.authors.jemfinch

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2005, Jeremiah Fincher # Copyright (c) 2005, Jeremiah Fincher
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,7 @@
### ###
# Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2004, Jeremiah Fincher
# Copyright (c) 2009, James McCoy # Copyright (c) 2009, James McCoy
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2002-2004, Jeremiah Fincher # Copyright (c) 2004, Jeremiah Fincher
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,67 +1,65 @@
### ###
# Copyright (c) 2019, oddluck <oddluck@riseup.net> # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice, # * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer. # this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, # * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the # this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of # * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products # contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent. # derived from this software without specific prior written consent.
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
###
###
"""
""" BotLibre: Enables the bot to respond via the BotLibre API.
Enables the bot to respond to humans via the """
BotLibre API.
""" import supybot
import supybot.world as world
import supybot
import supybot.world as world # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system.
# Use this for the version of this plugin. You may wish to put a CVS keyword __version__ = "2020.02.24+git"
# in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('oddluck', 'oddluck',
# XXX Replace this with an appropriate author or supybot.Author instance. 'oddluck@riseup.net')
__author__ = supybot.Author('oddluck', 'oddluck',
'oddluck@riseup.net') # This is a dictionary mapping supybot.Author instances to lists of
# contributions.
# This is a dictionary mapping supybot.Author instances to lists of __contributors__ = {}
# contributions.
__contributors__ = {} # This is a url where the most recent plugin package can be downloaded.
__url__ = 'https://github.com/oddluck/limnoria-plugins/'
# This is a url where the most recent plugin package can be downloaded.
__url__ = 'https://github.com/oddluck/limnoria-plugins/' from . import config
from . import plugin
from . import config from imp import reload
from . import plugin
from imp import reload reload(config)
reload(plugin)
reload(config)
reload(plugin) if world.testing:
from . import test
if world.testing:
from . import test Class = plugin.Class
configure = config.configure
Class = plugin.Class
configure = config.configure # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,56 +1,55 @@
### ###
# Copyright (c) 2015, Michael Daniel Telatynski <postmaster@webdevguru.co.uk> # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice, # * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer. # this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, # * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the # this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of # * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products # contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent. # derived from this software without specific prior written consent.
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
###
###
import supybot.conf as conf
import supybot.conf as conf import supybot.registry as registry
import supybot.registry as registry try:
try: from supybot.i18n import PluginInternationalization
from supybot.i18n import PluginInternationalization _ = PluginInternationalization('BotLibre')
_ = PluginInternationalization('BotLibre') except:
except: _ = lambda x: x
_ = lambda x: x
def configure(advanced):
def configure(advanced): from supybot.questions import expect, anything, something, yn
from supybot.questions import expect, anything, something, yn conf.registerPlugin('BotLibre', True)
conf.registerPlugin('BotLibre', True) if advanced:
if advanced: output('The BotLibre Plugin allows you to interact with Bot Libre')
output('The BotLibre Plugin allows you to interact with Bot Libre')
BotLibre = conf.registerPlugin('BotLibre')
BotLibre = conf.registerPlugin('BotLibre')
conf.registerChannelValue(BotLibre, 'invalidCommand',
conf.registerChannelValue(BotLibre, 'invalidCommand', registry.Boolean(False, _("""Should I be invoked on Invalid Commands?""")))
registry.Boolean(False, _("""Should I be invoked on Invalid Commands?"""))) conf.registerGlobalValue(BotLibre, 'application',
conf.registerGlobalValue(BotLibre, 'application', registry.String('', _("""The BotLibre API Application String
registry.String('', _("""The BotLibre API Application String (required)"""), private=True))
(required)"""), private=True)) conf.registerGlobalValue(BotLibre, 'instance',
conf.registerGlobalValue(BotLibre, 'instance', registry.String('', _("""The BotLibre API Instance String
registry.String('', _("""The BotLibre API Instance String (required)"""), private=True))
(required)"""), private=True))
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,103 +1,102 @@
### ###
# Copyright (c) 2019, oddluck <oddluck@riseup.net> # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice, # * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer. # this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice, # * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the # this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution. # documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of # * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products # contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent. # derived from this software without specific prior written consent.
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
###
###
from supybot.commands import *
from supybot.commands import * import supybot.conf as conf
import supybot.conf as conf import supybot.utils as utils
import supybot.utils as utils import supybot.plugins as plugins
import supybot.plugins as plugins import supybot.callbacks as callbacks
import supybot.callbacks as callbacks import re
import re
import requests
import requests
try:
try: from supybot.i18n import PluginInternationalization
from supybot.i18n import PluginInternationalization _ = PluginInternationalization('BotLibre')
_ = PluginInternationalization('BotLibre') except ImportError:
except ImportError: _ = lambda x: x
_ = lambda x: x
class BotLibre(callbacks.Plugin):
class BotLibre(callbacks.Plugin): """BotLibre API Interface"""
"""BotLibre API Interface""" threaded = True
threaded = True public = True
public = True botNick = False
botNick = False
def __init__(self, irc):
def __init__(self, irc): self.__parent = super(BotLibre, self)
self.__parent = super(BotLibre, self) self.__parent.__init__(irc)
self.__parent.__init__(irc) self.url = 'https://www.botlibre.com/rest/json/chat'
self.url = 'https://www.botlibre.com/rest/json/chat' self.conversation = {}
self.conversation = {}
def _queryBot(self, irc, channel, text):
def _queryBot(self, irc, channel, text): text = re.sub('fuck', 'screw', text, flags=re.IGNORECASE)
text = re.sub('fuck', 'screw', text, flags=re.IGNORECASE) text = re.sub('cunt', 'pussy', text, flags=re.IGNORECASE)
text = re.sub('cunt', 'pussy', text, flags=re.IGNORECASE) text = re.sub('bitch', '', text, flags=re.IGNORECASE)
text = re.sub('bitch', '', text, flags=re.IGNORECASE) text = re.sub('whore', 'slut', text, flags=re.IGNORECASE)
text = re.sub('whore', 'slut', text, flags=re.IGNORECASE) self.conversation.setdefault(channel, None)
self.conversation.setdefault(channel, None) if self.conversation[channel]:
if self.conversation[channel]: payload = {
payload = { 'application': self.registryValue('application'),
'application': self.registryValue('application'), 'instance': self.registryValue('instance'),
'instance': self.registryValue('instance'), 'message': text,
'message': text, 'conversation': self.conversation[channel]
'conversation': self.conversation[channel] }
} else:
else: payload = {
payload = { 'application': self.registryValue('application'),
'application': self.registryValue('application'), 'instance': self.registryValue('instance'),
'instance': self.registryValue('instance'), 'message': text
'message': text }
} try:
try: r = requests.post(self.url, json=payload)
r = requests.post(self.url, json=payload) j = r.json()
j = r.json() response = j['message']
response = j['message'] self.conversation[channel] = j['conversation']
self.conversation[channel] = j['conversation'] if response:
if response: irc.reply(re.sub('<[^<]+?>', '', j['message']))
irc.reply(re.sub('<[^<]+?>', '', j['message'])) except:
except: return
return
def botlibre(self, irc, msg, args, text):
def botlibre(self, irc, msg, args, text): """Manual Call to the BotLibre API"""
"""Manual Call to the BotLibre API""" channel = msg.args[0]
channel = msg.args[0] if not irc.isChannel(channel):
if not irc.isChannel(channel): channel = msg.nick
channel = msg.nick self._queryBot(irc, channel, text)
self._queryBot(irc, channel, text) botlibre = wrap(botlibre, ['text'])
botlibre = wrap(botlibre, ['text'])
def invalidCommand(self, irc, msg, tokens):
def invalidCommand(self, irc, msg, tokens): chan = msg.args[0]
chan = msg.args[0] if irc.isChannel(chan) and self.registryValue('invalidCommand', chan):
if irc.isChannel(chan) and self.registryValue('invalidCommand', chan): self._queryBot(irc, chan, msg.args[1][1:].strip())
self._queryBot(irc, chan, msg.args[1][1:].strip())
Class = BotLibre
Class = BotLibre
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:

View File

@ -1,36 +0,0 @@
###
# Copyright (c) 2015, Michael Daniel Telatynski <postmaster@webdevguru.co.uk>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
from supybot.test import *
class ReplacerTestCase(PluginTestCase):
plugins = ('BotLibre',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2012, James Scott # Copyright (c) 2012, James Scott
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -16,7 +39,7 @@ import importlib
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('James Scott', 'jazzahn', '') __author__ = supybot.Author('James Scott', 'jazzahn', '')

View File

@ -1,3 +1,33 @@
###
# Copyright (c) 2012, James Scott
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
from random import choice from random import choice
import os import os
import json import json

View File

@ -1,7 +1,8 @@
### ###
# Copyright (c) 2012, James Scott # Copyright (c) 2012, James Scott
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,7 +1,8 @@
### ###
# Copyright (c) 2012, James Scott # Copyright (c) 2012, James Scott
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met: # modification, are permitted provided that the following conditions are met:
# #
@ -25,8 +26,8 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.utils as utils import supybot.utils as utils
from supybot.commands import * from supybot.commands import *
import supybot.plugins as plugins import supybot.plugins as plugins

View File

@ -1,93 +1,123 @@
__author__ = 'Bear' ###
# Copyright (c) 2012, James Scott
from .cah import * # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
def test_cards_will_be_unique(deck=None, player_list = None): #
""" # Redistribution and use in source and binary forms, with or without
Ensure that when a hand is created the proper cards are removed from the deck. # modification, are permitted provided that the following conditions are met:
""" #
if deck is None: # * Redistributions of source code must retain the above copyright notice,
deck=Deck() # this list of conditions, and the following disclaimer.
if player_list is None: # * Redistributions in binary form must reproduce the above copyright notice,
player_list = {'one': PlayerHand(deck),'two': PlayerHand(deck) } # this list of conditions, and the following disclaimer in the
for value in list(player_list.values()): # documentation and/or other materials provided with the distribution.
for card in value.card_list: # * Neither the name of the author of this software nor the name of
assert card.text not in deck.answerDb # contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
def test_card_parsing(deck=None): #
""" # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
This test checks that the cards in a deck are correctly built Card objects # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
""" # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
if deck is None: # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
deck = Deck() # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
for deck_type in [deck.answerDb, deck.questionDb]: # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
for card in deck_type: # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
test_card(card) # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
def test_game(): # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
game = Game(['Bear','Swim', 'Jazz']) # POSSIBILITY OF SUCH DAMAGE.
test_cards_will_be_unique(deck=game.deck, player_list= game.players) ###
for player in list(game.players.keys()):
hand = game.players[player] __author__ = 'Bear'
test_player_hand(hand)
test_round_advancement(game) from .cah import *
def test_cards_will_be_unique(deck=None, player_list = None):
"""
def test_round_advancement(game=None): Ensure that when a hand is created the proper cards are removed from the deck.
if game is None: """
game = Game(['Bear','Swim', 'Jazz']) if deck is None:
assert game.round is None deck=Deck()
assert game.question is None if player_list is None:
while round < game.round_limit: player_list = {'one': PlayerHand(deck),'two': PlayerHand(deck) }
bot_gets = game.next_round() for value in list(player_list.values()):
assert isinstance(bot_gets, dict) for card in value.card_list:
assert 'question' in bot_gets assert card.text not in deck.answerDb
assert 'question' in game
assert 'hands' in bot_gets def test_card_parsing(deck=None):
test_end_round(game) """
This test checks that the cards in a deck are correctly built Card objects
def build_end_round_data(game): """
winner = choice(list(game.players.keys())) if deck is None:
cards_played = {} deck = Deck()
#Get random cards from player's hand to satisfy the question card for deck_type in [deck.answerDb, deck.questionDb]:
for player in list(game.players.keys()): for card in deck_type:
player_cards = game.players[player].card_list[:game.question.answers] test_card(card)
cards_played[player] = player_cards #player_cards is a deque object -> tuple(list,maxlen)
return {'winner': winner, 'cards_played': cards_played} def test_game():
game = Game(['Bear','Swim', 'Jazz'])
def test_end_round(game=None): test_cards_will_be_unique(deck=game.deck, player_list= game.players)
if game is None: for player in list(game.players.keys()):
game = Game(['Bear','Swim', 'Jazz']) hand = game.players[player]
game.next_round() test_player_hand(hand)
game.question.answers = 2 test_round_advancement(game)
fake_end_round = build_end_round_data(game)
game.end_round(fake_end_round['winner'],fake_end_round['cards_played'])
for player in list(game.players.keys()):
assert len(game.players[player].card_list) == 5 def test_round_advancement(game=None):
if isinstance(fake_end_round['cards_played'][player], Card): if game is None:
fake_end_round['cards_played'][player] = list(fake_end_round['cards_played'][player]) game = Game(['Bear','Swim', 'Jazz'])
for card in fake_end_round['cards_played'][player]: assert game.round is None
assert card not in game.players[player].card_list assert game.question is None
assert fake_end_round['winner'] in game.score while round < game.round_limit:
bot_gets = game.next_round()
assert isinstance(bot_gets, dict)
def test_player_hand(hand=None): assert 'question' in bot_gets
if hand is None: assert 'question' in game
hand = PlayerHand(Deck()) assert 'hands' in bot_gets
assert type(hand) is PlayerHand test_end_round(game)
for count, card in enumerate(hand.card_list):
assert count < 5 def build_end_round_data(game):
assert type(card) is Card winner = choice(list(game.players.keys()))
cards_played = {}
def test_card(card=None): #Get random cards from player's hand to satisfy the question card
if card is None: for player in list(game.players.keys()):
card = Deck().drawCard('question') player_cards = game.players[player].card_list[:game.question.answers]
assert type(card) is Card cards_played[player] = player_cards #player_cards is a deque object -> tuple(list,maxlen)
assert type(card.id) is int return {'winner': winner, 'cards_played': cards_played}
assert type(card.type) is str
assert card.type in ['answer', 'question'] def test_end_round(game=None):
assert type(card.text) is str if game is None:
assert card.text.find('\n') is -1 game = Game(['Bear','Swim', 'Jazz'])
if card.type is 'question': game.next_round()
assert type(card.answers) is int game.question.answers = 2
fake_end_round = build_end_round_data(game)
game.end_round(fake_end_round['winner'],fake_end_round['cards_played'])
for player in list(game.players.keys()):
assert len(game.players[player].card_list) == 5
if isinstance(fake_end_round['cards_played'][player], Card):
fake_end_round['cards_played'][player] = list(fake_end_round['cards_played'][player])
for card in fake_end_round['cards_played'][player]:
assert card not in game.players[player].card_list
assert fake_end_round['winner'] in game.score
def test_player_hand(hand=None):
if hand is None:
hand = PlayerHand(Deck())
assert type(hand) is PlayerHand
for count, card in enumerate(hand.card_list):
assert count < 5
assert type(card) is Card
def test_card(card=None):
if card is None:
card = Deck().drawCard('question')
assert type(card) is Card
assert type(card.id) is int
assert type(card.type) is str
assert card.type in ['answer', 'question']
assert type(card.text) is str
assert card.text.find('\n') is -1
if card.type is 'question':
assert type(card.answers) is int

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -15,7 +38,7 @@ from supybot import world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('cottongin', 'cottongin', __author__ = supybot.Author('cottongin', 'cottongin',

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
from supybot import conf, registry from supybot import conf, registry

View File

@ -1,9 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# SEE LICENSE.txt # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import pendulum import pendulum

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -15,7 +38,7 @@ from supybot import world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('cottongin', 'cottongin', __author__ = supybot.Author('cottongin', 'cottongin',

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
from supybot import conf, registry from supybot import conf, registry

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import requests import requests

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2015, butterscotchstallion # Copyright (c) 2015, butterscotchstallion
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -14,7 +37,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('butterscotchstallion', 'butterscotchstallion', __author__ = supybot.Author('butterscotchstallion', 'butterscotchstallion',

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2015, butterscotchstallion # Copyright (c) 2015, butterscotchstallion
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,10 +1,33 @@
# -*- coding: utf-8 -*- ###
""" # Copyright (c) 2015, butterscotchstallion
Cayenne - Displays cat facts or cat gifs based on probability # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
Copyright (c) 2015, butterscotchstallion
All rights reserved.
"""
import supybot.utils as utils import supybot.utils as utils
from supybot.commands import * from supybot.commands import *
import supybot.ircmsgs as ircmsgs import supybot.ircmsgs as ircmsgs

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2015, waratte # Copyright (c) 2015, waratte
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,8 +29,7 @@
### ###
""" """
Add a description of the plugin (to be presented to the user inside the wizard) Cobe: Uses the Cobe library for Markov generation of chat replies
here. This should describe *what* the plugin does.
""" """
import supybot import supybot
@ -37,7 +37,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('waratte', 'waratte', '') __author__ = supybot.Author('waratte', 'waratte', '')

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2015, waratte # Copyright (c) 2015, waratte
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2015, waratte # Copyright (c) 2015, waratte
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,36 +0,0 @@
###
# Copyright (c) 2015, waratte
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
from supybot.test import *
class CobeTestCase(PluginTestCase):
plugins = ('Cobe',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2007-2010, Andrey Rahmatullin # Copyright (c) 2010, Andrey Rahmatullin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -28,7 +29,7 @@
### ###
""" """
Dice Dice: commands for dice rolling.
""" """
import supybot import supybot
@ -36,7 +37,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
__author__ = supybot.Author('Andrey Rahmatullin', 'wRAR', 'wrar@wrar.name') __author__ = supybot.Author('Andrey Rahmatullin', 'wRAR', 'wrar@wrar.name')
__maintainer__ = getattr(supybot.authors, 'oddluck', __maintainer__ = getattr(supybot.authors, 'oddluck',

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2007-2008, Andrey Rahmatullin # Copyright (c) 2008, Andrey Rahmatullin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,7 @@
### ###
# Copyright (c) 2008, Anatoly Popov # Copyright (c) 2008, Anatoly Popov
# Copyright (c) 2008, Andrey Rahmatullin # Copyright (c) 2008, Andrey Rahmatullin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2007-2010, Andrey Rahmatullin # Copyright (c) 2008, Andrey Rahmatullin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,7 @@
### ###
# Copyright (c) 2018, Anatoly Popov # Copyright (c) 2018, Anatoly Popov
# Copyright (c) 2018, Andrey Rahmatullin # Copyright (c) 2018, Andrey Rahmatullin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2007-2010, Andrey Rahmatullin # Copyright (c) 2010, Andrey Rahmatullin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,7 @@
### ###
# Copyright (c) 2018, Anatoly Popov # Copyright (c) 2018, Anatoly Popov
# Copyright (c) 2018, Andrey Rahmatullin # Copyright (c) 2018, Andrey Rahmatullin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,7 @@
### ###
# Copyright (c) 2018, Anatoly Popov # Copyright (c) 2018, Anatoly Popov
# Copyright (c) 2018, Andrey Rahmatullin # Copyright (c) 2018, Andrey Rahmatullin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,6 +1,7 @@
### ###
# Copyright (c) 2018, Anatoly Popov # Copyright (c) 2018, Anatoly Popov
# Copyright (c) 2018, Andrey Rahmatullin # Copyright (c) 2018, Andrey Rahmatullin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2012, Matthias Meusburger # Copyright (c) 2012, Matthias Meusburger
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,11 +26,10 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
This is a DuckHunt game for supybot DuckHunt: an IRC Duck Hunt game for Limnoria
""" """
import supybot import supybot
@ -38,7 +38,7 @@ import importlib
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('Matthias Meusburger', 'veggiematts', '') __author__ = supybot.Author('Matthias Meusburger', 'veggiematts', '')

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2012, Matthias Meusburger # Copyright (c) 2012, Matthias Meusburger
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2012, Matthias Meusburger # Copyright (c) 2012, Matthias Meusburger
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2012, Matthias Meusburger # Copyright (c) 2012, Matthias Meusburger
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,8 +1,30 @@
### ###
# Copyright (c) 2019 oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -14,7 +36,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('oddluck', 'oddluck', __author__ = supybot.Author('oddluck', 'oddluck',

View File

@ -1,8 +1,30 @@
### ###
# Copyright (c) 2019, oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,411 +1,433 @@
### ###
# Copyright (c) 2019 oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# # Redistribution and use in source and binary forms, with or without
### # modification, are permitted provided that the following conditions are met:
#
import supybot.utils as utils # * Redistributions of source code must retain the above copyright notice,
from supybot.commands import * # this list of conditions, and the following disclaimer.
import supybot.plugins as plugins # * Redistributions in binary form must reproduce the above copyright notice,
import supybot.ircutils as ircutils # this list of conditions, and the following disclaimer in the
import supybot.callbacks as callbacks # documentation and/or other materials provided with the distribution.
import supybot.ircmsgs as ircmsgs # * Neither the name of the author of this software nor the name of
import random # contributors to this software may be used to endorse or promote products
import requests # derived from this software without specific prior written consent.
from bs4 import BeautifulSoup #
import codecs # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
import os # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
import collections # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
try: # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
from supybot.i18n import PluginInternationalization # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
_ = PluginInternationalization('Weed') # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
except ImportError: # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# Placeholder that allows to run the plugin on a bot # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# without the i18n module # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
_ = lambda x: x # POSSIBILITY OF SUCH DAMAGE.
###
class Fun(callbacks.Plugin):
"""Uses API to retrieve information""" import supybot.utils as utils
threaded = True from supybot.commands import *
import supybot.plugins as plugins
def advice(self, irc, msg, args): import supybot.ircutils as ircutils
""" import supybot.callbacks as callbacks
Get some advice import supybot.ircmsgs as ircmsgs
""" import random
import requests
channel = msg.args[0] from bs4 import BeautifulSoup
data = requests.get("https://api.adviceslip.com/advice").json() import codecs
irc.reply(data['slip']['advice']) import os
import collections
advice = wrap(advice)
try:
def joke(self, irc, msg, args): from supybot.i18n import PluginInternationalization
""" _ = PluginInternationalization('Weed')
Get a joke except ImportError:
""" # Placeholder that allows to run the plugin on a bot
# without the i18n module
channel = msg.args[0] _ = lambda x: x
headers = {
'Accept': 'application/json', class Fun(callbacks.Plugin):
} """Uses API to retrieve information"""
data = requests.get('https://icanhazdadjoke.com/', headers=headers).json() threaded = True
irc.reply(data['joke'].replace('\n', '').replace('\r', '').replace('\t', ''))
def advice(self, irc, msg, args):
joke = wrap(joke) """
Get some advice
def catfact(self, irc, msg, args): """
"""
Cat fact channel = msg.args[0]
""" data = requests.get("https://api.adviceslip.com/advice").json()
irc.reply(data['slip']['advice'])
channel = msg.args[0]
data = requests.get("https://catfact.ninja/fact").json() advice = wrap(advice)
irc.reply(data['fact'])
def joke(self, irc, msg, args):
catfact = wrap(catfact) """
Get a joke
def useless(self, irc, msg, args): """
"""
Useless fact channel = msg.args[0]
""" headers = {
'Accept': 'application/json',
channel = msg.args[0] }
data = requests.get("https://uselessfacts.jsph.pl/random.json?language=en").json() data = requests.get('https://icanhazdadjoke.com/', headers=headers).json()
irc.reply(data['text']) irc.reply(data['joke'].replace('\n', '').replace('\r', '').replace('\t', ''))
useless = wrap(useless) joke = wrap(joke)
def buzz(self, irc, msg, args): def catfact(self, irc, msg, args):
""" """
Corporate buzzord generator Cat fact
""" """
channel = msg.args[0]
data = requests.get("https://corporatebs-generator.sameerkumar.website").json() channel = msg.args[0]
irc.reply(data['phrase']) data = requests.get("https://catfact.ninja/fact").json()
buzz = wrap(buzz) irc.reply(data['fact'])
def startup(self, irc, msg, args): catfact = wrap(catfact)
"""
Startup generator def useless(self, irc, msg, args):
""" """
channel = msg.args[0] Useless fact
data = requests.get("http://itsthisforthat.com/api.php?json").json() """
vowels = ('a','e','i','o','u','A','E','I','O','U')
if data['this'].startswith(vowels): channel = msg.args[0]
response = "So, Basically, It\'s Like An {0} for {1}".format(data['this'], data['that']) data = requests.get("https://uselessfacts.jsph.pl/random.json?language=en").json()
else: irc.reply(data['text'])
response = "So, Basically, It\'s Like A {0} for {1}".format(data['this'], data['that'])
irc.reply(response) useless = wrap(useless)
startup = wrap(startup)
def buzz(self, irc, msg, args):
def insult(self, irc, msg, args, nick): """
"""[<nick>] Corporate buzzord generator
Insult generator. Optionally send insult to <nick> (<nick> must be in channel). """
""" channel = msg.args[0]
channel = msg.args[0] data = requests.get("https://corporatebs-generator.sameerkumar.website").json()
data = requests.get("https://insult.mattbas.org/api/en/insult.json").json() irc.reply(data['phrase'])
if nick: buzz = wrap(buzz)
response = "{0}: {1}".format(nick, data['insult'])
irc.reply(response, prefixNick=False) def startup(self, irc, msg, args):
else: """
irc.reply(data['insult']) Startup generator
insult = wrap(insult, [additional('nickInChannel')]) """
channel = msg.args[0]
def devexcuse(self, irc, msg, args): data = requests.get("http://itsthisforthat.com/api.php?json").json()
""" vowels = ('a','e','i','o','u','A','E','I','O','U')
Returns an excuse from http://developerexcuses.com if data['this'].startswith(vowels):
""" response = "So, Basically, It\'s Like An {0} for {1}".format(data['this'], data['that'])
data = requests.get('http://developerexcuses.com') else:
if not data: # http fetch breaks. response = "So, Basically, It\'s Like A {0} for {1}".format(data['this'], data['that'])
irc.reply("ERROR") irc.reply(response)
return startup = wrap(startup)
soup = BeautifulSoup(data.text)
text = soup.find('center').getText() def insult(self, irc, msg, args, nick):
irc.reply("{0}".format(text)) """[<nick>]
devexcuse = wrap(devexcuse) Insult generator. Optionally send insult to <nick> (<nick> must be in channel).
"""
def _pigword(self, word): channel = msg.args[0]
shouldCAP = (word[:1] == word[:1].upper()) data = requests.get("https://insult.mattbas.org/api/en/insult.json").json()
word = word.lower() if nick:
letters = "qwertyuiopasdfghjklzxcvbnm" response = "{0}: {1}".format(nick, data['insult'])
i = len(word) - 1 irc.reply(response, prefixNick=False)
while i >= 0 and letters.find(word[i]) == -1: else:
i = i - 1 irc.reply(data['insult'])
if i == -1: insult = wrap(insult, [additional('nickInChannel')])
return word
punctuation = word[i+1:] def devexcuse(self, irc, msg, args):
word = word[:i+1] """
Returns an excuse from http://developerexcuses.com
vowels = "aeiou" """
if vowels.find(word[0]) >= 0: data = requests.get('http://developerexcuses.com')
word = word + "yay" + punctuation if not data: # http fetch breaks.
else: irc.reply("ERROR")
word = word[1:] + word[0] + "ay" + punctuation return
soup = BeautifulSoup(data.text)
if shouldCAP: text = soup.find('center').getText()
return word[:1].upper() + word[1:] irc.reply("{0}".format(text))
else: devexcuse = wrap(devexcuse)
return word
def _pigword(self, word):
def piglatin(self, irc, msg, args, optinput): shouldCAP = (word[:1] == word[:1].upper())
"""<text> word = word.lower()
Convert text from English to Pig Latin. letters = "qwertyuiopasdfghjklzxcvbnm"
""" i = len(word) - 1
while i >= 0 and letters.find(word[i]) == -1:
l = optinput.split(" ") i = i - 1
for i in range(len(l)): if i == -1:
l[i] = self._pigword(l[i]) return word
punctuation = word[i+1:]
irc.reply(" ".join(l)) word = word[:i+1]
piglatin = wrap(piglatin, [('text')])
vowels = "aeiou"
if vowels.find(word[0]) >= 0:
def bofh(self, irc, msg, args): word = word + "yay" + punctuation
""" else:
BOFH (Bastard Operator From Hell) Excuse Generator word = word[1:] + word[0] + "ay" + punctuation
"""
data = open("{0}/excuses.txt".format(os.path.dirname(os.path.abspath(__file__)))) if shouldCAP:
text = data.read() return word[:1].upper() + word[1:]
reply = text.splitlines() else:
excuse = random.randrange(0, len(reply)) return word
irc.reply(reply[excuse])
bofh = wrap(bofh) def piglatin(self, irc, msg, args, optinput):
"""<text>
def rock(self, irc, msg, args): Convert text from English to Pig Latin.
"""takes no arguments """
Choose rock in Rock, Paper, Scissors. l = optinput.split(" ")
""" for i in range(len(l)):
botchoice2 = random.randint(1, 3) l[i] = self._pigword(l[i])
if botchoice2 == 1:
botchoice = "rock" irc.reply(" ".join(l))
elif botchoice2 == 2: piglatin = wrap(piglatin, [('text')])
botchoice = "paper"
elif botchoice2 == 3:
botchoice = "scissors" def bofh(self, irc, msg, args):
userchoice = "rock" """
if botchoice == userchoice: BOFH (Bastard Operator From Hell) Excuse Generator
irc.reply("I chose %s. Looks like we tied." % (botchoice)) """
elif botchoice == "paper" and userchoice == "rock": data = open("{0}/excuses.txt".format(os.path.dirname(os.path.abspath(__file__))))
irc.reply("I chose %s. Looks like I won." % (botchoice)) text = data.read()
elif botchoice == "scissors" and userchoice == "rock": reply = text.splitlines()
irc.reply("I chose %s. Looks like you won." % (botchoice)) excuse = random.randrange(0, len(reply))
rock = wrap(rock) irc.reply(reply[excuse])
bofh = wrap(bofh)
def paper(self, irc, msg, args):
"""takes no arguments def rock(self, irc, msg, args):
"""takes no arguments
Choose paper in Rock, Paper, Scissors.
""" Choose rock in Rock, Paper, Scissors.
botchoice2 = random.randint(1, 3) """
if botchoice2 == 1: botchoice2 = random.randint(1, 3)
botchoice = "rock" if botchoice2 == 1:
elif botchoice2 == 2: botchoice = "rock"
botchoice = "paper" elif botchoice2 == 2:
elif botchoice2 == 3: botchoice = "paper"
botchoice = "scissors" elif botchoice2 == 3:
userchoice = "paper" botchoice = "scissors"
if botchoice == userchoice: userchoice = "rock"
irc.reply("I chose %s. Looks like we tied." % (botchoice)) if botchoice == userchoice:
elif botchoice == "scissors" and userchoice == "paper": irc.reply("I chose %s. Looks like we tied." % (botchoice))
irc.reply("I chose %s. Looks like I won." % (botchoice)) elif botchoice == "paper" and userchoice == "rock":
elif botchoice == "rock" and userchoice == "paper": irc.reply("I chose %s. Looks like I won." % (botchoice))
irc.reply("I chose %s. Looks like you won." % (botchoice)) elif botchoice == "scissors" and userchoice == "rock":
paper = wrap(paper) irc.reply("I chose %s. Looks like you won." % (botchoice))
rock = wrap(rock)
def scissors(self, irc, msg, args):
"""takes no arguments def paper(self, irc, msg, args):
"""takes no arguments
Choose scissors in Rock, Paper, Scissors.
""" Choose paper in Rock, Paper, Scissors.
botchoice2 = random.randint(1, 3) """
if botchoice2 == 1: botchoice2 = random.randint(1, 3)
botchoice = "rock" if botchoice2 == 1:
elif botchoice2 == 2: botchoice = "rock"
botchoice = "paper" elif botchoice2 == 2:
elif botchoice2 == 3: botchoice = "paper"
botchoice = "scissors" elif botchoice2 == 3:
userchoice = "scissors" botchoice = "scissors"
if botchoice == userchoice: userchoice = "paper"
irc.reply("I chose %s. Looks like we tied." % (botchoice)) if botchoice == userchoice:
elif botchoice == "rock" and userchoice == "scissors": irc.reply("I chose %s. Looks like we tied." % (botchoice))
irc.reply("I chose %s. Looks like I won." % (botchoice)) elif botchoice == "scissors" and userchoice == "paper":
elif botchoice == "paper" and userchoice == "scissors": irc.reply("I chose %s. Looks like I won." % (botchoice))
irc.reply("I chose %s. Looks like you won." % (botchoice)) elif botchoice == "rock" and userchoice == "paper":
scissors = wrap(scissors) irc.reply("I chose %s. Looks like you won." % (botchoice))
paper = wrap(paper)
def catgif(self, irc, msg, args):
""" def scissors(self, irc, msg, args):
Get a random cat .gif """takes no arguments
"""
try: Choose scissors in Rock, Paper, Scissors.
response = utils.web.getUrl("http://edgecats.net/random").decode("utf8") """
# Expecting a link botchoice2 = random.randint(1, 3)
if "http" in response: if botchoice2 == 1:
irc.reply(response) botchoice = "rock"
else: elif botchoice2 == 2:
self.log.error("Received unexpected response from http://edgecats.net/random") botchoice = "paper"
except: elif botchoice2 == 3:
self.log.exception("Error fetching URL") botchoice = "scissors"
catgif = wrap(catgif) userchoice = "scissors"
if botchoice == userchoice:
def mitch(self, irc, msg, args): irc.reply("I chose %s. Looks like we tied." % (botchoice))
""" elif botchoice == "rock" and userchoice == "scissors":
Mitch Hedberg Jokes irc.reply("I chose %s. Looks like I won." % (botchoice))
""" elif botchoice == "paper" and userchoice == "scissors":
data = open("{0}/mitch_hedberg.txt".format(os.path.dirname(os.path.abspath(__file__)))) irc.reply("I chose %s. Looks like you won." % (botchoice))
text = data.read() scissors = wrap(scissors)
reply = text.splitlines()
excuse = random.randrange(0, len(reply)) def catgif(self, irc, msg, args):
irc.reply(reply[excuse]) """
mitch = wrap(mitch) Get a random cat .gif
"""
def chuck(self, irc, msg, args): try:
""" response = utils.web.getUrl("http://edgecats.net/random").decode("utf8")
Chuck Norris Jokes # Expecting a link
""" if "http" in response:
data = open("{0}/chuck_norris.txt".format(os.path.dirname(os.path.abspath(__file__)))) irc.reply(response)
text = data.read() else:
reply = text.splitlines() self.log.error("Received unexpected response from http://edgecats.net/random")
excuse = random.randrange(0, len(reply)) except:
irc.reply(reply[excuse]) self.log.exception("Error fetching URL")
chuck = wrap(chuck) catgif = wrap(catgif)
def rodney(self, irc, msg, args): def mitch(self, irc, msg, args):
""" """
Rodney Dangerfield Jokes Mitch Hedberg Jokes
""" """
data = open("{0}/rodney_dangerfield.txt".format(os.path.dirname(os.path.abspath(__file__)))) data = open("{0}/mitch_hedberg.txt".format(os.path.dirname(os.path.abspath(__file__))))
text = data.read() text = data.read()
reply = text.splitlines() reply = text.splitlines()
excuse = random.randrange(0, len(reply)) excuse = random.randrange(0, len(reply))
irc.reply(reply[excuse]) irc.reply(reply[excuse])
rodney = wrap(rodney) mitch = wrap(mitch)
def rot(self, irc, msg, args, text): def chuck(self, irc, msg, args):
"""<text> """
Encode text with ROT13 Chuck Norris Jokes
""" """
irc.reply(codecs.encode(text, "rot_13")) data = open("{0}/chuck_norris.txt".format(os.path.dirname(os.path.abspath(__file__))))
rot = wrap(rot, ['text']) text = data.read()
reply = text.splitlines()
def unrot(self, irc, msg, args, text): excuse = random.randrange(0, len(reply))
"""<text> irc.reply(reply[excuse])
Decode ROT13 text chuck = wrap(chuck)
"""
irc.reply(codecs.decode(text, "rot_13")) def rodney(self, irc, msg, args):
unrot = wrap(unrot, ['text']) """
Rodney Dangerfield Jokes
def coin(self, irc, msg, args, optcoin): """
"""[coin] data = open("{0}/rodney_dangerfield.txt".format(os.path.dirname(os.path.abspath(__file__))))
Fetches current values for a given coin text = data.read()
""" reply = text.splitlines()
coin_url = 'https://min-api.cryptocompare.com/data/pricemultifull?fsyms={coins}&tsyms=USD' excuse = random.randrange(0, len(reply))
coins = [] irc.reply(reply[excuse])
coins.append(optcoin) rodney = wrap(rodney)
coins_str = ','.join(c.upper() for c in coins)
coin_data = requests.get(coin_url.format(coins=coins_str)) def rot(self, irc, msg, args, text):
coin_data = coin_data.json() """<text>
if 'RAW' not in coin_data: Encode text with ROT13
irc.reply('ERROR: no coin found for {}'.format(optcoin)) """
return irc.reply(codecs.encode(text, "rot_13"))
output = [] rot = wrap(rot, ['text'])
tmp = {}
data = coin_data['RAW'] def unrot(self, irc, msg, args, text):
data2 = collections.OrderedDict.fromkeys(sorted(data)) """<text>
for k,v in data.items(): Decode ROT13 text
data2.update({k: v}) """
output = self._parseCoins(data2, optcoin) irc.reply(codecs.decode(text, "rot_13"))
irc.reply(' | '.join(t for t in output)) unrot = wrap(unrot, ['text'])
return
coin = wrap(coin, ['text']) def coin(self, irc, msg, args, optcoin):
"""[coin]
def coins(self, irc, msg, args, optcoin): Fetches current values for a given coin
""" """
Fetches current values for top 10 coins (+ dogecoin) trading by volume coin_url = 'https://min-api.cryptocompare.com/data/pricemultifull?fsyms={coins}&tsyms=USD'
""" coins = []
volm_url = 'https://min-api.cryptocompare.com/data/top/totalvol?limit=10&tsym=USD' coins.append(optcoin)
coin_url = 'https://min-api.cryptocompare.com/data/pricemultifull?fsyms={coins}&tsyms=USD' coins_str = ','.join(c.upper() for c in coins)
volm_data = requests.get(volm_url).json() coin_data = requests.get(coin_url.format(coins=coins_str))
coins = [] coin_data = coin_data.json()
for thing in volm_data['Data']: if 'RAW' not in coin_data:
name = thing['CoinInfo']['Name'] irc.reply('ERROR: no coin found for {}'.format(optcoin))
coins.append(name) return
coins.append('DOGE') output = []
coins_str = ','.join(c for c in coins) tmp = {}
coin_data = requests.get(coin_url.format(coins=coins_str)) data = coin_data['RAW']
coin_data = coin_data.json() data2 = collections.OrderedDict.fromkeys(sorted(data))
output = [] for k,v in data.items():
tmp = {} data2.update({k: v})
data = coin_data['RAW'] output = self._parseCoins(data2, optcoin)
tmp['BTC'] = data.pop('BTC') irc.reply(' | '.join(t for t in output))
data2 = collections.OrderedDict.fromkeys(sorted(data)) return
for k,v in data.items(): coin = wrap(coin, ['text'])
data2.update({k: v})
data2.update(tmp) def coins(self, irc, msg, args, optcoin):
data2.move_to_end('BTC', last=False) """
output = self._parseCoins(data2, optcoin) Fetches current values for top 10 coins (+ dogecoin) trading by volume
irc.reply(' | '.join(t for t in output)) """
return volm_url = 'https://min-api.cryptocompare.com/data/top/totalvol?limit=10&tsym=USD'
coins = wrap(coins, [optional('somethingWithoutSpaces')]) coin_url = 'https://min-api.cryptocompare.com/data/pricemultifull?fsyms={coins}&tsyms=USD'
volm_data = requests.get(volm_url).json()
def _parseCoins(self, data, optmarket=None): coins = []
for thing in volm_data['Data']:
ticker = [] name = thing['CoinInfo']['Name']
coins.append(name)
def _humifyCap(cap): coins.append('DOGE')
if not cap: coins_str = ','.join(c for c in coins)
return cap coin_data = requests.get(coin_url.format(coins=coins_str))
if cap > 1000000000000: coin_data = coin_data.json()
cap = cap / 1000000000000 output = []
cap = '${:.2f}T'.format(cap) tmp = {}
return cap data = coin_data['RAW']
elif cap > 1000000000: tmp['BTC'] = data.pop('BTC')
cap = cap / 1000000000 data2 = collections.OrderedDict.fromkeys(sorted(data))
cap = '${:.2f}B'.format(cap) for k,v in data.items():
elif cap > 1000000: data2.update({k: v})
cap = cap / 1000000 data2.update(tmp)
cap = '${:.2f}M'.format(cap) data2.move_to_end('BTC', last=False)
else: output = self._parseCoins(data2, optcoin)
cap = '${:.2f}'.format(cap) irc.reply(' | '.join(t for t in output))
return cap return
return cap coins = wrap(coins, [optional('somethingWithoutSpaces')])
for symbol in data: def _parseCoins(self, data, optmarket=None):
name = symbol
name = ircutils.bold(name) ticker = []
symbol = data[symbol]['USD']
current_price = symbol['PRICE'] def _humifyCap(cap):
change = symbol['CHANGEDAY'] if not cap:
pct_change = symbol['CHANGEPCTDAY'] return cap
high24 = '${:g}'.format(symbol['HIGH24HOUR']) if cap > 1000000000000:
low24 = '${:g}'.format(symbol['LOW24HOUR']) cap = cap / 1000000000000
mcap = _humifyCap(symbol['MKTCAP']) cap = '${:.2f}T'.format(cap)
if 0 < pct_change < 0.5: return cap
change = ircutils.mircColor('+{:g}'.format(change), 'yellow') elif cap > 1000000000:
pct_change = ircutils.mircColor('+{:.2g}%'.format(pct_change), 'yellow') cap = cap / 1000000000
elif pct_change >= 0.5: cap = '${:.2f}B'.format(cap)
change = ircutils.mircColor('+{:g}'.format(change), 'green') elif cap > 1000000:
pct_change = ircutils.mircColor('+{:.2g}%'.format(pct_change), 'green') cap = cap / 1000000
elif 0 > pct_change > -0.5: cap = '${:.2f}M'.format(cap)
change = ircutils.mircColor('{:g}'.format(change), 'orange') else:
pct_change = ircutils.mircColor('{:.2g}%'.format(pct_change), 'orange') cap = '${:.2f}'.format(cap)
elif pct_change <= -0.5: return cap
change = ircutils.mircColor('{:g}'.format(change), 'red') return cap
pct_change = ircutils.mircColor('{:.2g}%'.format(pct_change), 'red')
else: for symbol in data:
change = '{:g}'.format(change) name = symbol
pct_change = '{:g}%'.format(pct_change) name = ircutils.bold(name)
string = '{} ${:g} {} ({})'.format(name, current_price, change, pct_change) symbol = data[symbol]['USD']
if optmarket: current_price = symbol['PRICE']
if optmarket.lower() in name.lower(): change = symbol['CHANGEDAY']
string += ' :: \x02Market Cap:\x02 {} | \x0224hr High:\x02 {} | \x0224hr Low:\x02 {}'.format( pct_change = symbol['CHANGEPCTDAY']
mcap, ircutils.mircColor(high24, 'green'), ircutils.mircColor(low24, 'red')) high24 = '${:g}'.format(symbol['HIGH24HOUR'])
ticker.append(string) low24 = '${:g}'.format(symbol['LOW24HOUR'])
else: mcap = _humifyCap(symbol['MKTCAP'])
ticker.append(string) if 0 < pct_change < 0.5:
return ticker change = ircutils.mircColor('+{:g}'.format(change), 'yellow')
pct_change = ircutils.mircColor('+{:.2g}%'.format(pct_change), 'yellow')
Class = Fun elif pct_change >= 0.5:
change = ircutils.mircColor('+{:g}'.format(change), 'green')
pct_change = ircutils.mircColor('+{:.2g}%'.format(pct_change), 'green')
elif 0 > pct_change > -0.5:
change = ircutils.mircColor('{:g}'.format(change), 'orange')
pct_change = ircutils.mircColor('{:.2g}%'.format(pct_change), 'orange')
elif pct_change <= -0.5:
change = ircutils.mircColor('{:g}'.format(change), 'red')
pct_change = ircutils.mircColor('{:.2g}%'.format(pct_change), 'red')
else:
change = '{:g}'.format(change)
pct_change = '{:g}%'.format(pct_change)
string = '{} ${:g} {} ({})'.format(name, current_price, change, pct_change)
if optmarket:
if optmarket.lower() in name.lower():
string += ' :: \x02Market Cap:\x02 {} | \x0224hr High:\x02 {} | \x0224hr Low:\x02 {}'.format(
mcap, ircutils.mircColor(high24, 'green'), ircutils.mircColor(low24, 'red'))
ticker.append(string)
else:
ticker.append(string)
return ticker
Class = Fun

View File

@ -1,16 +0,0 @@
###
# Copyright (c) 2019, oddluck
# All rights reserved.
#
#
###
from supybot.test import *
class AdviceTestCase(PluginTestCase):
plugins = ('Fun',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,9 +1,35 @@
### ###
# by SpiderDave # Copyright (c) SpiderDave
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
Plugin to Geoloacate an IP Geo: Geolocate an IP/hostname
""" """
import supybot import supybot
@ -12,7 +38,7 @@ import importlib
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
__author__ = supybot.Author('SpiderDave', 'SpiderDave', '') __author__ = supybot.Author('SpiderDave', 'SpiderDave', '')
__maintainer__ = getattr(supybot.authors, 'oddluck', __maintainer__ = getattr(supybot.authors, 'oddluck',

View File

@ -1,3 +1,33 @@
###
# Copyright (c) SpiderDave
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
import supybot.conf as conf import supybot.conf as conf
import supybot.registry as registry import supybot.registry as registry

View File

@ -1,6 +1,31 @@
### ###
# Geo/plugin.py # Copyright (c) SpiderDave
# by SpiderDave # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import time import time

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2012, resistivecorpse # Copyright (c) 2012, resistivecorpse
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,12 +26,10 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
Add a description of the plugin (to be presented to the user inside the wizard) HuntNFish: a hunting and fishing IRC game
here. This should describe *what* the plugin does.
""" """
import supybot import supybot
@ -39,7 +38,7 @@ import importlib
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('resistivecorpse', 'resistivecorpse', __author__ = supybot.Author('resistivecorpse', 'resistivecorpse',

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2012, resistivecorpse # Copyright (c) 2012, resistivecorpse
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2012, resistivecorpse # Copyright (c) 2012, resistivecorpse
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import os import os

View File

@ -1,37 +0,0 @@
###
# Copyright (c) 2012, resistivecorpse
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
from supybot.test import *
class HuntNFishTestCase(PluginTestCase):
plugins = ('HuntNFish',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2015, butterscotchstallion # Copyright (c) 2015, butterscotchstallion
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -14,7 +37,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('butterscotchstallion', 'butterscotchstallion', __author__ = supybot.Author('butterscotchstallion', 'butterscotchstallion',

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2015, butterscotchstallion # Copyright (c) 2015, butterscotchstallion
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2015, butterscotchstallion # Copyright (c) 2015, butterscotchstallion
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import sys import sys

View File

@ -1,15 +0,0 @@
###
# Copyright (c) 2015, butterscotchstallion
# All rights reserved.
#
#
###
from supybot.test import *
class IMDBTestCase(PluginTestCase):
plugins = ('IMDB',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,5 +1,7 @@
### ###
# Copyright (c) 2019, oddluck # Copyright (c) 2010, quantumlemur
# Copyright (c) 2011, Valentin Lorentz
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,12 +27,10 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
Add a description of the plugin (to be presented to the user inside the wizard) Jeopardy: a trivia game using Jeopardy! questions
here. This should describe *what* the plugin does.
""" """
import supybot import supybot
@ -38,7 +38,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('oddluck', 'oddluck', __author__ = supybot.Author('oddluck', 'oddluck',

View File

@ -1,7 +1,7 @@
### ###
# Copyright (c) 2010, quantumlemur # Copyright (c) 2010, quantumlemur
# Copyright (c) 2011, Valentin Lorentz # Copyright (c) 2011, Valentin Lorentz
# Copyright (c) 2020, oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -27,7 +27,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,7 +1,7 @@
### ###
# Copyright (c) 2010, quantumlemur # Copyright (c) 2010, quantumlemur
# Copyright (c) 2011, Valentin Lorentz # Copyright (c) 2011, Valentin Lorentz
# Copyright (c) 2020, oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,8 +1,30 @@
### ###
# Copyright (c) 2019 oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -14,7 +36,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('oddluck', 'oddluck', __author__ = supybot.Author('oddluck', 'oddluck',

View File

@ -1,8 +1,30 @@
### ###
# Copyright (c) 2019, oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,77 +1,99 @@
### ###
# Copyright (c) 2019 oddluck # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# # Redistribution and use in source and binary forms, with or without
### # modification, are permitted provided that the following conditions are met:
#
import supybot.utils as utils # * Redistributions of source code must retain the above copyright notice,
from supybot.commands import * # this list of conditions, and the following disclaimer.
import supybot.plugins as plugins # * Redistributions in binary form must reproduce the above copyright notice,
import supybot.ircutils as ircutils # this list of conditions, and the following disclaimer in the
import supybot.callbacks as callbacks # documentation and/or other materials provided with the distribution.
import supybot.ircmsgs as ircmsgs # * Neither the name of the author of this software nor the name of
from bs4 import BeautifulSoup # contributors to this software may be used to endorse or promote products
import requests # derived from this software without specific prior written consent.
import re #
import pylyrics3 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
from fake_useragent import UserAgent # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
try: # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
from supybot.i18n import PluginInternationalization # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
_ = PluginInternationalization('Weed') # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
except ImportError: # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# Placeholder that allows to run the plugin on a bot # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# without the i18n module # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
_ = lambda x: x # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
class Lyrics(callbacks.Plugin): ###
"""Retrieves song lyrics"""
threaded = True import supybot.utils as utils
from supybot.commands import *
def dosearch(self, lyric): import supybot.plugins as plugins
try: import supybot.ircutils as ircutils
searchurl = "https://www.google.com/search?&q={0} site:lyrics.fandom.com/wiki/".format(lyric) import supybot.callbacks as callbacks
ua = UserAgent() import supybot.ircmsgs as ircmsgs
header = {'User-Agent':str(ua.random)} from bs4 import BeautifulSoup
data = requests.get(searchurl, headers=header) import requests
soup = BeautifulSoup(data.text) import re
elements = soup.select('.r a') import pylyrics3
url = elements[0]['href'] from fake_useragent import UserAgent
url = re.split('https?://', url)[-1]
url = re.sub("&rct=.*", "", url) try:
url = "https://{0}".format(url) from supybot.i18n import PluginInternationalization
title = soup.find("h3").getText() _ = PluginInternationalization('Weed')
except Exception: except ImportError:
return # Placeholder that allows to run the plugin on a bot
else: # without the i18n module
return title, url _ = lambda x: x
def getlyrics(self, url): class Lyrics(callbacks.Plugin):
try: """Retrieves song lyrics"""
lyrics = pylyrics3.get_lyrics_from_url(url) threaded = True
lyrics = re.sub('(?<!\.|\!|\?)\s\\n', '.', lyrics).replace(" \n", "")
except Exception: def dosearch(self, lyric):
lyrics = pylyrics3.get_lyrics_from_url(url) try:
lyrics = re.sub('(?<!\.|\!|\?)\s\\n', '.', lyrics).replace(" \n", "") searchurl = "https://www.google.com/search?&q={0} site:lyrics.fandom.com/wiki/".format(lyric)
else: ua = UserAgent()
return lyrics header = {'User-Agent':str(ua.random)}
data = requests.get(searchurl, headers=header)
def lyric(self, irc, msg, args, lyric): soup = BeautifulSoup(data.text)
"""<text> elements = soup.select('.r a')
Get song lyrics from Lyrics Wiki. Search powered by Google. url = elements[0]['href']
""" url = re.split('https?://', url)[-1]
try: url = re.sub("&rct=.*", "", url)
title, url = self.dosearch(lyric) url = "https://{0}".format(url)
except Exception: title = soup.find("h3").getText()
irc.reply("No results found for {0}".format(lyric)) except Exception:
else: return
try: else:
lyrics = self.getlyrics(url) return title, url
irc.reply(title.replace(":", " - "))
irc.reply(lyrics) def getlyrics(self, url):
except Exception: try:
irc.reply("Unable to retrieve lyrics from {0}".format(url)) lyrics = pylyrics3.get_lyrics_from_url(url)
lyric = wrap(lyric, ['text']) lyrics = re.sub('(?<!\.|\!|\?)\s\\n', '.', lyrics).replace(" \n", "")
except Exception:
Class = Lyrics lyrics = pylyrics3.get_lyrics_from_url(url)
lyrics = re.sub('(?<!\.|\!|\?)\s\\n', '.', lyrics).replace(" \n", "")
else:
return lyrics
def lyric(self, irc, msg, args, lyric):
"""<text>
Get song lyrics from Lyrics Wiki. Search powered by Google.
"""
try:
title, url = self.dosearch(lyric)
except Exception:
irc.reply("No results found for {0}".format(lyric))
else:
try:
lyrics = self.getlyrics(url)
irc.reply(title.replace(":", " - "))
irc.reply(lyrics)
except Exception:
irc.reply("Unable to retrieve lyrics from {0}".format(url))
lyric = wrap(lyric, ['text'])
Class = Lyrics

View File

@ -1,16 +0,0 @@
###
# Copyright (c) 2019, oddluck
# All rights reserved.
#
#
###
from supybot.test import *
class LyricsTestCase(PluginTestCase):
plugins = ('Lyrics',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2014, Valentin Lorentz # Copyright (c) 2014, Valentin Lorentz
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,12 +26,10 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
Add a description of the plugin (to be presented to the user inside the wizard) Markovgen: reply to messages with markov generated text
here. This should describe *what* the plugin does.
""" """
import supybot import supybot
@ -38,7 +37,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2014, Valentin Lorentz # Copyright (c) 2014, Valentin Lorentz
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1 +0,0 @@
# Stub so local is a module, used for third-party modules

View File

@ -1,6 +1,6 @@
# coding: utf8
### ###
# Copyright (c) 2014, Valentin Lorentz # Copyright (c) 2014, Valentin Lorentz
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -26,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import os import os

View File

@ -1,37 +0,0 @@
###
# Copyright (c) 2014, Valentin Lorentz
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
from supybot.test import *
class MarkovgenTestCase(PluginTestCase):
plugins = ('Markovgen',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2016, Santiago Gil # Copyright (c) 2016, Santiago Gil
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -37,7 +37,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('Santiago Gil', 'santigl', '') __author__ = supybot.Author('Santiago Gil', 'santigl', '')

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2016, Santiago Gil # Copyright (c) 2016, Santiago Gil
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,18 +1,31 @@
### ###
# Copyright (c) 2018, Santiago Gil # Copyright (c) 2018, Santiago Gil
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved.
# #
# This program is free software: you can redistribute it and/or modify # Redistribution and use in source and binary forms, with or without
# it under the terms of the GNU General Public License as published by # modification, are permitted provided that the following conditions are met:
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# #
# This program is distributed in the hope that it will be useful, # * Redistributions of source code must retain the above copyright notice,
# but WITHOUT ANY WARRANTY; without even the implied warranty of # this list of conditions, and the following disclaimer.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # * Redistributions in binary form must reproduce the above copyright notice,
# GNU General Public License for more details. # this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
# #
# You should have received a copy of the GNU General Public License # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# along with this program. If not, see <http://www.gnu.org/licenses/>. # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
#import supybot.utils as utils #import supybot.utils as utils

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2019, cottongin # Copyright (c) 2019, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -15,7 +38,7 @@ from supybot import world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('cottongin', 'cottongin', __author__ = supybot.Author('cottongin', 'cottongin',

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2019, cottongin # Copyright (c) 2019, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
from supybot import conf, registry from supybot import conf, registry

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2019, cottongin # Copyright (c) 2019, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import pendulum import pendulum

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2016, Santiago Gil # Copyright (c) 2016, Santiago Gil
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -37,7 +37,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('Santiago Gil', 'santigl', '') __author__ = supybot.Author('Santiago Gil', 'santigl', '')

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2016, Santiago Gil # Copyright (c) 2016, Santiago Gil
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,8 +1,6 @@
### ###
# Limnoria plugin to retrieve results from NHL.com using their (undocumented)
# JSON API.
# Copyright (c) 2016, Santiago Gil # Copyright (c) 2016, Santiago Gil
# adapted by cottongin # Copyright (c) 2020, oddluck <oddluck@riseup.net>
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by

View File

@ -1,12 +1,35 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
Odds: Fetches odds Odds: Fetches sports odds
""" """
import sys import sys
@ -15,7 +38,7 @@ from supybot import world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('cottongin', 'cottongin', __author__ = supybot.Author('cottongin', 'cottongin',

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
from supybot import conf, registry from supybot import conf, registry

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import requests import requests

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -15,7 +38,7 @@ from supybot import world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('cottongin', 'cottongin', __author__ = supybot.Author('cottongin', 'cottongin',

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
from supybot import conf, registry from supybot import conf, registry

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import pendulum import pendulum

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2011, Anthony Boot # Copyright (c) 2011, Anthony Boot
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,12 +26,10 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
Add a description of the plugin (to be presented to the user inside the wizard) RPG: simple IRC role-playing game for Limnoria
here. This should describe *what* the plugin does.
""" """
import supybot import supybot
@ -39,7 +38,7 @@ import importlib
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('Anthiny Boot', 'antb', '') __author__ = supybot.Author('Anthiny Boot', 'antb', '')

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2011, Anthony Boot # Copyright (c) 2011, Anthony Boot
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2011, Anthony Boot # Copyright (c) 2011, Anthony Boot
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without
@ -14,7 +15,7 @@
# contributors to this software may be used to endorse or promote products # contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent. # derived from this software without specific prior written consent.
# #
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
@ -25,7 +26,6 @@
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE. # POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.utils as utils import supybot.utils as utils

View File

@ -1,37 +0,0 @@
###
# Copyright (c) 2011, Anthony Boot
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
###
from supybot.test import *
class RpgTestCase(PluginTestCase):
plugins = ('RPG',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
@ -15,7 +38,7 @@ from supybot import world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('cottongin', 'cottongin', __author__ = supybot.Author('cottongin', 'cottongin',

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
from supybot import conf, registry from supybot import conf, registry

View File

@ -1,9 +1,31 @@
### ###
# Copyright (c) 2018, cottongin # Copyright (c) 2018, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# See LICENSE.txt # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
from supybot import utils, plugins, ircutils, callbacks, schedule, conf from supybot import utils, plugins, ircutils, callbacks, schedule, conf

View File

@ -1,12 +1,35 @@
### ###
# Copyright (c) 2015, butterscotchstallion # Copyright (c) 2015, butterscotchstallion
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
SpiffyTitles: Displays link titles when posted in a channel SpiffyTitles: displays link titles when posted in a channel
""" """
import supybot import supybot
@ -14,7 +37,7 @@ import supybot.world as world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('butterscotchstallion', 'butterscotchstallion', '') __author__ = supybot.Author('butterscotchstallion', 'butterscotchstallion', '')

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2015, butterscotchstallion # Copyright (c) 2015, butterscotchstallion
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import supybot.conf as conf import supybot.conf as conf

View File

@ -1,9 +1,31 @@
# -*- coding: utf-8 -*-
### ###
# Copyright (c) 2015, butterscotchstallion # Copyright (c) 2015, butterscotchstallion
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
from supybot.commands import * from supybot.commands import *
@ -1126,12 +1148,10 @@ class SpiffyTitles(callbacks.Plugin):
"writer": response["Writer"], "writer": response["Writer"],
"votes": response["imdbVotes"], "votes": response["imdbVotes"],
"website": response["Website"], "website": response["Website"],
"type": response["Type"],
"language": response["Language"], "language": response["Language"],
"box_office": response["BoxOffice"], "box_office": response["BoxOffice"],
"production": response["Production"], "production": response["Production"],
"poster": response["Poster"], "poster": response["Poster"],
"ratings": response["Ratings"],
"imdb_logo": self.get_imdb_logo() "imdb_logo": self.get_imdb_logo()
} }
result = imdb_template.render(template_vars) result = imdb_template.render(template_vars)

View File

@ -1,20 +0,0 @@
###
# Copyright (c) 2015, butterscotchstallion
# All rights reserved.
#
#
###
from supybot.test import *
class SpiffyTitlesTestCase(ChannelPluginTestCase):
plugins = ('SpiffyTitles',)
def setUp(self):
ChannelPluginTestCase.setUp(self)
self.assertNotError('reload SpiffyTitles')
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

View File

@ -1,12 +1,35 @@
### ###
# Copyright (c) 2019, cottongin # Copyright (c) 2019, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
""" """
TVMaze: Limnoria plugin to fetch TV show information and schedules from tvmaze.com API TVMaze: plugin to fetch TV show information and schedules from the tvmaze.com API
""" """
import sys import sys
@ -15,7 +38,7 @@ from supybot import world
# Use this for the version of this plugin. You may wish to put a CVS keyword # Use this for the version of this plugin. You may wish to put a CVS keyword
# in here if you're keeping the plugin in CVS or some similar system. # in here if you're keeping the plugin in CVS or some similar system.
__version__ = "" __version__ = "2020.02.24+git"
# XXX Replace this with an appropriate author or supybot.Author instance. # XXX Replace this with an appropriate author or supybot.Author instance.
__author__ = supybot.Author('cottongin', 'cottongin', __author__ = supybot.Author('cottongin', 'cottongin',

View File

@ -1,5 +1,6 @@
### ###
# Copyright (c) 2019, James Lu <james@overdrivenetworks.com> # Copyright (c) 2019, James Lu <james@overdrivenetworks.com>
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without # Redistribution and use in source and binary forms, with or without

View File

@ -1,8 +1,31 @@
### ###
# Copyright (c) 2019, cottongin # Copyright (c) 2019, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# #
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
from supybot import conf, registry from supybot import conf, registry

View File

@ -1,9 +1,31 @@
# TVMaze v0.0.1
### ###
# Copyright (c) 2019, cottongin # Copyright (c) 2019, cottongin
# Copyright (c) 2020, oddluck <oddluck@riseup.net>
# All rights reserved. # All rights reserved.
# #
# See LICENSE.txt # Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions, and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions, and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the author of this software nor the name of
# contributors to this software may be used to endorse or promote products
# derived from this software without specific prior written consent.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
### ###
import requests import requests

View File

@ -1,15 +0,0 @@
###
# Copyright (c) 2019, cottongin
# All rights reserved.
#
#
###
from supybot.test import *
class TVMazeTestCase(PluginTestCase):
plugins = ('TVMaze',)
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:

Some files were not shown because too many files have changed in this diff Show More