mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 22:24:20 +01:00
w00, less path mungingEXCLAIMEXCLAIM
This commit is contained in:
parent
5c3f13bd51
commit
f9c61271ea
@ -23,10 +23,10 @@
|
|||||||
# distributed in the hope that it will be useful, but WITTHOUT ANY WARRANTY.
|
# distributed in the hope that it will be useful, but WITTHOUT ANY WARRANTY.
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
|
|
||||||
import re, copy, sys, os.path
|
import re, copy, sys, os.path, StringIO
|
||||||
import registry
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import StringIO
|
import supybot.registry as registry
|
||||||
|
|
||||||
#*****************************************************************************
|
#*****************************************************************************
|
||||||
#
|
#
|
||||||
|
@ -36,19 +36,19 @@ Allows aliases for other commands.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sets
|
import sets
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
import structures
|
import supybot.structures as structures
|
||||||
import unpreserve
|
import supybot.unpreserve as unpreserve
|
||||||
|
|
||||||
class AliasError(Exception):
|
class AliasError(Exception):
|
||||||
pass
|
pass
|
||||||
|
@ -37,17 +37,17 @@ __revision__ = "$Id$"
|
|||||||
__author__ = "James Vega (jamessan) <jamessan@users.sf.net>"
|
__author__ = "James Vega (jamessan) <jamessan@users.sf.net>"
|
||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import amazon
|
import amazon
|
||||||
|
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
@ -35,15 +35,15 @@ Allows folks to talk through the bot anonymously.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
@ -42,11 +42,11 @@ from itertools import imap
|
|||||||
|
|
||||||
import babelfish
|
import babelfish
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class Languages(registry.OnlySomeStrings):
|
class Languages(registry.OnlySomeStrings):
|
||||||
validStrings = tuple(map(str.capitalize, babelfish.available_languages))
|
validStrings = tuple(map(str.capitalize, babelfish.available_languages))
|
||||||
|
@ -36,21 +36,21 @@ to say bad words.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import math
|
import math
|
||||||
import sets
|
import sets
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from questions import output, expect, anything, something, yn
|
from questions import output, expect, anything, something, yn
|
||||||
|
@ -46,16 +46,16 @@ import xml.dom.minidom as minidom
|
|||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
from htmlentitydefs import entitydefs as entities
|
from htmlentitydefs import entitydefs as entities
|
||||||
|
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
import structures
|
import supybot.structures as structures
|
||||||
|
|
||||||
statusKeys = ['unconfirmed', 'new', 'assigned', 'reopened', 'resolved',
|
statusKeys = ['unconfirmed', 'new', 'assigned', 'reopened', 'resolved',
|
||||||
'verified', 'closed']
|
'verified', 'closed']
|
||||||
|
@ -36,19 +36,19 @@ Logs each channel to its own individual logfile.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import time
|
import time
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import world
|
import supybot.world as world
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
conf.registerPlugin('ChannelLogger')
|
conf.registerPlugin('ChannelLogger')
|
||||||
conf.registerGlobalValue(conf.supybot.plugins.ChannelLogger,
|
conf.registerGlobalValue(conf.supybot.plugins.ChannelLogger,
|
||||||
|
@ -38,17 +38,17 @@ between channels on different networks, check out the Relay plugin.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class ValidChannelOrNothing(conf.ValidChannel):
|
class ValidChannelOrNothing(conf.ValidChannel):
|
||||||
"""Value must be either a valid IRC channel or the empty string."""
|
"""Value must be either a valid IRC channel or the empty string."""
|
||||||
|
@ -37,7 +37,7 @@ statistics about smileys, actions, characters, and words.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -47,18 +47,18 @@ import getopt
|
|||||||
import string
|
import string
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class Smileys(registry.Value):
|
class Smileys(registry.Value):
|
||||||
def set(self, s):
|
def set(self, s):
|
||||||
|
@ -36,7 +36,7 @@ and FINGER.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -44,9 +44,9 @@ import time
|
|||||||
|
|
||||||
sys.path.append(os.pardir)
|
sys.path.append(os.pardir)
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
notice = ircmsgs.notice
|
notice = ircmsgs.notice
|
||||||
|
|
||||||
|
@ -39,13 +39,13 @@ __author__ = ''
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class CurrencyCommand(registry.String):
|
class CurrencyCommand(registry.String):
|
||||||
def setValue(self, s):
|
def setValue(self, s):
|
||||||
|
@ -35,19 +35,19 @@ Supports various DCC things.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import socket
|
import socket
|
||||||
import textwrap
|
import textwrap
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class DCC(callbacks.Privmsg):
|
class DCC(callbacks.Privmsg):
|
||||||
def chat(self, irc, msg, args):
|
def chat(self, irc, msg, args):
|
||||||
|
@ -36,7 +36,7 @@ This is a module to contain Debian-specific commands.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = "James Vega (jamessan) <jamessan@users.sf.net>"
|
__author__ = "James Vega (jamessan) <jamessan@users.sf.net>"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import gzip
|
import gzip
|
||||||
@ -49,13 +49,13 @@ import fnmatch
|
|||||||
import os.path
|
import os.path
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
@ -35,7 +35,7 @@ Commands that use the dictd protocol to snag stuff off a server.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import sets
|
import sets
|
||||||
import random
|
import random
|
||||||
@ -43,13 +43,13 @@ import socket
|
|||||||
|
|
||||||
import dictclient
|
import dictclient
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
@ -41,12 +41,12 @@ __author__ = "Daniel DiPaolo (Strike) <ddipaolo@users.sf.net>"
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -40,14 +40,14 @@ import getopt
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = "James Vega (jamessan) <jamessan@users.sf.net>"
|
__author__ = "James Vega (jamessan) <jamessan@users.sf.net>"
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
@ -39,16 +39,16 @@ empty channel in order to get ops.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from questions import output, expect, anything, something, yn
|
from questions import output, expect, anything, something, yn
|
||||||
|
@ -36,7 +36,7 @@ available on demand via several commands.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import getopt
|
import getopt
|
||||||
@ -44,15 +44,15 @@ import string
|
|||||||
import os.path
|
import os.path
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
import Owner
|
import supybot.Owner as Owner
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -36,19 +36,19 @@ the output of the bot.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import string
|
import string
|
||||||
import random
|
import random
|
||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class MyFilterProxy(object):
|
class MyFilterProxy(object):
|
||||||
def reply(self, s):
|
def reply(self, s):
|
||||||
|
@ -36,14 +36,14 @@ to access the bot.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import random
|
import random
|
||||||
|
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
|
|
||||||
class FixRelayBot(irclib.IrcCallback):
|
class FixRelayBot(irclib.IrcCallback):
|
||||||
_re = re.compile(r'<([^@]+)@[^>]+>\s+(.*)')
|
_re = re.compile(r'<([^@]+)@[^>]+>\s+(.*)')
|
||||||
|
@ -36,15 +36,15 @@ Provides simple commands for formatting text on IRC.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import string
|
import string
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
@ -37,10 +37,10 @@ __revision__ = "$Id$"
|
|||||||
|
|
||||||
deprecated = True
|
deprecated = True
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class Friendly(callbacks.PrivmsgRegexp):
|
class Friendly(callbacks.PrivmsgRegexp):
|
||||||
onlyFirstMatch = True
|
onlyFirstMatch = True
|
||||||
|
@ -35,7 +35,7 @@ Provides a multitude of fun, useless commands.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import gc
|
import gc
|
||||||
import re
|
import re
|
||||||
@ -48,12 +48,12 @@ import inspect
|
|||||||
import mimetypes
|
import mimetypes
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class MyFunProxy(object):
|
class MyFunProxy(object):
|
||||||
def reply(self, msg, s):
|
def reply(self, msg, s):
|
||||||
|
@ -35,7 +35,7 @@ Provides fun commands that require a database to operate.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sets
|
import sets
|
||||||
@ -45,16 +45,16 @@ import string
|
|||||||
import os.path
|
import os.path
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -35,20 +35,20 @@ Handles URL snarfing for Gameknot.com and the gkstats command.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sets
|
import sets
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
@ -35,7 +35,7 @@ Acceses Google for various things.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sets
|
import sets
|
||||||
@ -48,16 +48,16 @@ import xml.sax
|
|||||||
import SOAP
|
import SOAP
|
||||||
import google
|
import google
|
||||||
|
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
import structures
|
import supybot.structures as structures
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from questions import output, expect, anything, something, yn
|
from questions import output, expect, anything, something, yn
|
||||||
|
@ -40,17 +40,17 @@ import os
|
|||||||
import time
|
import time
|
||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
filename = os.path.join(conf.supybot.directories.data(), 'Herald.db')
|
filename = os.path.join(conf.supybot.directories.data(), 'Herald.db')
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ Provides several commands that go out to websites and get things.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sets
|
import sets
|
||||||
@ -46,12 +46,12 @@ import urllib2
|
|||||||
import xml.dom.minidom
|
import xml.dom.minidom
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class FreshmeatException(Exception):
|
class FreshmeatException(Exception):
|
||||||
pass
|
pass
|
||||||
|
@ -36,20 +36,20 @@ Infobot compatibility, for the parts that we don't support already.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import random
|
import random
|
||||||
import cPickle as pickle
|
import cPickle as pickle
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
conf.registerPlugin('Infobot')
|
conf.registerPlugin('Infobot')
|
||||||
conf.registerGlobalValue(conf.supybot.plugins.Infobot, 'personality',
|
conf.registerGlobalValue(conf.supybot.plugins.Infobot, 'personality',
|
||||||
|
@ -39,12 +39,12 @@ import os
|
|||||||
import sets
|
import sets
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -35,12 +35,12 @@ Removes all bold output by the bot.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
# For some stupid reason, this doesn't work.
|
# For some stupid reason, this doesn't work.
|
||||||
|
@ -36,22 +36,22 @@ Allows for sending the bot's logging output to channels or users.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os.path
|
import os.path
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
class IrcHandler(logging.Handler):
|
class IrcHandler(logging.Handler):
|
||||||
|
@ -35,7 +35,7 @@ The Lookup plugin handles looking up various values by their key.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -44,11 +44,11 @@ import sets
|
|||||||
import getopt
|
import getopt
|
||||||
import string
|
import string
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -38,14 +38,14 @@ large enough, you can have it make fun little random messages from it.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -37,7 +37,7 @@ __revision__ = "$Id$"
|
|||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import math
|
import math
|
||||||
@ -46,9 +46,9 @@ import types
|
|||||||
import string
|
import string
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
import convertcore
|
import convertcore
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ and if nothing is found, responds with an entry from the "dunno" database.
|
|||||||
__revision__="$Id$"
|
__revision__="$Id$"
|
||||||
__author__ = "Daniel DiPaolo (Strike) <ddipaolo@users.sf.net>"
|
__author__ = "Daniel DiPaolo (Strike) <ddipaolo@users.sf.net>"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sets
|
import sets
|
||||||
@ -50,17 +50,17 @@ import random
|
|||||||
from itertools import imap
|
from itertools import imap
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
|
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
import Owner
|
import supybot.Owner as Owner
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -35,16 +35,16 @@ Various network-related commands.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import sets
|
import sets
|
||||||
import socket
|
import socket
|
||||||
import telnetlib
|
import telnetlib
|
||||||
|
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
class Network(callbacks.Privmsg):
|
class Network(callbacks.Privmsg):
|
||||||
|
@ -36,16 +36,16 @@ when they join the channel. News items may have expiration dates.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -55,16 +55,16 @@ an IRC nick is. It's an elitist hacker thing, but quite fun.
|
|||||||
__revision__ = '$Id$'
|
__revision__ = '$Id$'
|
||||||
__author__ = 'William Robinson (baggins) <airbaggins@users.sf.net>'
|
__author__ = 'William Robinson (baggins) <airbaggins@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import math
|
import math
|
||||||
import string
|
import string
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def slowExponent(x):
|
def slowExponent(x):
|
||||||
|
@ -36,7 +36,7 @@ users that can be retrieved later.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import sets
|
import sets
|
||||||
import time
|
import time
|
||||||
@ -44,15 +44,15 @@ import getopt
|
|||||||
import os.path
|
import os.path
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -36,13 +36,13 @@ Commands specific to OSU;
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import urllib2
|
import urllib2
|
||||||
|
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
buildings = {
|
buildings = {
|
||||||
|
@ -38,16 +38,16 @@ as he joins.
|
|||||||
|
|
||||||
import sets
|
import sets
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from questions import output, something, yn
|
from questions import output, something, yn
|
||||||
|
@ -36,17 +36,17 @@ A module for managing and voting on polls.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = "Daniel DiPaolo (Strike) <ddipaolo@users.sf.net>"
|
__author__ = "Daniel DiPaolo (Strike) <ddipaolo@users.sf.net>"
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -36,7 +36,7 @@ written in) somehow.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -54,13 +54,13 @@ try:
|
|||||||
finally:
|
finally:
|
||||||
sys.stdout = sys.__stdout__
|
sys.stdout = sys.__stdout__
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
L = [os.__file__]
|
L = [os.__file__]
|
||||||
if hasattr(math, '__file__'):
|
if hasattr(math, '__file__'):
|
||||||
|
@ -39,23 +39,23 @@ as see who "grabbed" the quote in the first place.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
import random
|
import random
|
||||||
|
|
||||||
import registry # goes before conf! yell at jamessan, not me
|
import supybot.registry as registry # goes before conf! yell at jamessan, not me
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -35,18 +35,18 @@ Maintains a Quotes database for each channel.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import getopt
|
import getopt
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -35,7 +35,7 @@ Provides basic functionality for handling RSS/RDF feeds.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import sets
|
import sets
|
||||||
import time
|
import time
|
||||||
@ -46,14 +46,14 @@ from itertools import imap
|
|||||||
|
|
||||||
import rssparser
|
import rssparser
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from questions import output, expect, anything, something, yn
|
from questions import output, expect, anything, something, yn
|
||||||
|
@ -35,12 +35,12 @@ Logs raw IRC messages to a file.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import world
|
import supybot.world as world
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
|
|
||||||
###
|
###
|
||||||
# RawLogger: Logs the *raw* IRC messages.
|
# RawLogger: Logs the *raw* IRC messages.
|
||||||
|
@ -36,7 +36,7 @@ Handles relaying between networks.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
@ -44,16 +44,16 @@ import copy
|
|||||||
import time
|
import time
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
import drivers
|
import supybot.drivers as drivers
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from questions import output, expect, anything, something, yn
|
from questions import output, expect, anything, something, yn
|
||||||
|
@ -35,13 +35,13 @@ Warns (or even kicks) people when they join a channel if their ident is root.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
conf.registerPlugin('RootWarner')
|
conf.registerPlugin('RootWarner')
|
||||||
|
@ -37,16 +37,16 @@ or repeatedly run at a particular interval.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import sets
|
import sets
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import schedule
|
import supybot.schedule as schedule
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
class Scheduler(callbacks.Privmsg):
|
class Scheduler(callbacks.Privmsg):
|
||||||
|
@ -35,7 +35,7 @@ Keeps track of the last time a user was seen on a channel.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -45,17 +45,17 @@ import getopt
|
|||||||
import string
|
import string
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
def ircToLowerOrInt(x):
|
def ircToLowerOrInt(x):
|
||||||
if isinstance(x, int):
|
if isinstance(x, int):
|
||||||
|
@ -35,18 +35,18 @@ Services: Handles management of nicks with NickServ, and ops with ChanServ.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import schedule
|
import supybot.schedule as schedule
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from questions import output, expect, anything, something, yn
|
from questions import output, expect, anything, something, yn
|
||||||
|
@ -42,17 +42,17 @@ import getopt
|
|||||||
|
|
||||||
from itertools import ifilter, imap
|
from itertools import ifilter, imap
|
||||||
|
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
@ -35,7 +35,7 @@ current status and statistics.
|
|||||||
"""
|
"""
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -44,11 +44,11 @@ import time
|
|||||||
import threading
|
import threading
|
||||||
from itertools import islice, ifilter, imap
|
from itertools import islice, ifilter, imap
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
class Status(callbacks.Privmsg):
|
class Status(callbacks.Privmsg):
|
||||||
|
@ -36,7 +36,7 @@ tasks to do, with an optional priority for each.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = "Daniel DiPaolo (Strike) <ddipaolo@users.sf.net>"
|
__author__ = "Daniel DiPaolo (Strike) <ddipaolo@users.sf.net>"
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import glob
|
import glob
|
||||||
import time
|
import time
|
||||||
@ -44,11 +44,11 @@ import getopt
|
|||||||
import string
|
import string
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -36,20 +36,20 @@ Provides commands for manipulating channel topics.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import random
|
import random
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
conf.registerPlugin('Topic')
|
conf.registerPlugin('Topic')
|
||||||
conf.registerChannelValue(conf.supybot.plugins.Topic, 'separator',
|
conf.registerChannelValue(conf.supybot.plugins.Topic, 'separator',
|
||||||
|
@ -37,7 +37,7 @@ URLs in the database.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -46,14 +46,14 @@ import getopt
|
|||||||
import urllib2
|
import urllib2
|
||||||
import urlparse
|
import urlparse
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import sqlite
|
import sqlite
|
||||||
|
@ -35,7 +35,7 @@ Provides commands available only on Unix.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -50,10 +50,10 @@ import string
|
|||||||
import struct
|
import struct
|
||||||
|
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
from questions import output, expect, anything, something, yn
|
from questions import output, expect, anything, something, yn
|
||||||
|
@ -36,14 +36,14 @@ Maintains various arbitrary information on users.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
conf.registerPlugin('UserInfo')
|
conf.registerPlugin('UserInfo')
|
||||||
conf.registerUserValue(conf.users, 'name',
|
conf.registerUserValue(conf.users, 'name',
|
||||||
|
@ -36,15 +36,15 @@ Various utility commands, mostly useful for manipulating nested commands.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import string
|
import string
|
||||||
|
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class Utilities(callbacks.Privmsg):
|
class Utilities(callbacks.Privmsg):
|
||||||
def ignore(self, irc, msg, args):
|
def ignore(self, irc, msg, args):
|
||||||
|
@ -36,19 +36,19 @@ so don't get your hopes up. We just report it.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sets
|
import sets
|
||||||
import urllib
|
import urllib
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
unitAbbrevs = utils.abbrev(['Fahrenheit', 'Celsius', 'Centigrade', 'Kelvin'])
|
unitAbbrevs = utils.abbrev(['Fahrenheit', 'Celsius', 'Centigrade', 'Kelvin'])
|
||||||
unitAbbrevs['C'] = 'Celsius'
|
unitAbbrevs['C'] = 'Celsius'
|
||||||
|
@ -39,16 +39,16 @@ import os
|
|||||||
import csv
|
import csv
|
||||||
import string
|
import string
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
conf.registerPlugin('WordStats')
|
conf.registerPlugin('WordStats')
|
||||||
conf.registerChannelValue(conf.supybot.plugins.WordStats, 'rankingDisplay',
|
conf.registerChannelValue(conf.supybot.plugins.WordStats, 'rankingDisplay',
|
||||||
|
@ -36,7 +36,7 @@ This handles interesting things to do with a dictionary (words) database.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import supybot
|
import supybot
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import copy
|
import copy
|
||||||
@ -46,12 +46,12 @@ import random
|
|||||||
|
|
||||||
import sqlite
|
import sqlite
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
|
|
||||||
class WordsDB(plugins.DBHandler):
|
class WordsDB(plugins.DBHandler):
|
||||||
|
@ -36,17 +36,17 @@ Logs all the messages the bot receives to XML.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
conf.registerPlugin('XMLLogger')
|
conf.registerPlugin('XMLLogger')
|
||||||
conf.registerGlobalValue(conf.supybot.plugins.XMLLogger, 'prettyPrint',
|
conf.registerGlobalValue(conf.supybot.plugins.XMLLogger, 'prettyPrint',
|
||||||
|
@ -0,0 +1,391 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
###
|
||||||
|
# Copyright (c) 2002, Jeremiah Fincher
|
||||||
|
# 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.
|
||||||
|
###
|
||||||
|
|
||||||
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
|
import supybot.fix as fix
|
||||||
|
|
||||||
|
import gc
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import csv
|
||||||
|
import sys
|
||||||
|
import sets
|
||||||
|
import time
|
||||||
|
import random
|
||||||
|
import urllib2
|
||||||
|
import UserDict
|
||||||
|
import threading
|
||||||
|
|
||||||
|
import supybot.cdb as cdb
|
||||||
|
import supybot.log as log
|
||||||
|
import supybot.conf as conf
|
||||||
|
import supybot.utils as utils
|
||||||
|
import supybot.world as world
|
||||||
|
import supybot.ircutils as ircutils
|
||||||
|
import supybot.webutils as webutils
|
||||||
|
|
||||||
|
try:
|
||||||
|
mxCrap = {}
|
||||||
|
for (name, module) in sys.modules.items():
|
||||||
|
if name.startswith('mx'):
|
||||||
|
mxCrap[name] = module
|
||||||
|
sys.modules[name] = None
|
||||||
|
import sqlite
|
||||||
|
for (name, module) in mxCrap.items():
|
||||||
|
sys.modules[name] = module
|
||||||
|
sqlite.have_datetime = False
|
||||||
|
Connection = sqlite.Connection
|
||||||
|
class MyConnection(sqlite.Connection):
|
||||||
|
def commit(self, *args, **kwargs):
|
||||||
|
if self.autocommit:
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
Connection.commit(self, *args, **kwargs)
|
||||||
|
sqlite.Connection = MyConnection
|
||||||
|
except ImportError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
class DBHandler(object):
|
||||||
|
def __init__(self, name=None, suffix='.db'):
|
||||||
|
if name is None:
|
||||||
|
self.name = self.__class__.__name__
|
||||||
|
else:
|
||||||
|
self.name = name
|
||||||
|
if suffix and suffix[0] != '.':
|
||||||
|
suffix = '.' + suffix
|
||||||
|
self.suffix = suffix
|
||||||
|
self.cachedDb = None
|
||||||
|
|
||||||
|
def makeFilename(self):
|
||||||
|
if self.name.endswith(self.suffix):
|
||||||
|
return self.name
|
||||||
|
else:
|
||||||
|
return self.name + self.suffix
|
||||||
|
|
||||||
|
def makeDb(self, filename):
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def getDb(self):
|
||||||
|
if self.cachedDb is None or \
|
||||||
|
threading.currentThread() is not world.mainThread:
|
||||||
|
db = self.makeDb(self.makeFilename())
|
||||||
|
else:
|
||||||
|
db = self.cachedDb
|
||||||
|
db.autocommit = 1
|
||||||
|
return db
|
||||||
|
|
||||||
|
def die(self):
|
||||||
|
if self.cachedDb is not None:
|
||||||
|
self.cachedDb.die()
|
||||||
|
del self.cachedDb
|
||||||
|
|
||||||
|
|
||||||
|
# XXX: This shouldn't be a mixin. This should be contained by classes that
|
||||||
|
# want such behavior. But at this point, it wouldn't gain much for us
|
||||||
|
# to refactor it.
|
||||||
|
class ChannelDBHandler(object):
|
||||||
|
"""A class to handle database stuff for individual channels transparently.
|
||||||
|
"""
|
||||||
|
suffix = '.db'
|
||||||
|
def __init__(self, suffix='.db'):
|
||||||
|
self.dbCache = ircutils.IrcDict()
|
||||||
|
suffix = self.suffix
|
||||||
|
if self.suffix and self.suffix[0] != '.':
|
||||||
|
suffix = '.' + suffix
|
||||||
|
self.suffix = suffix
|
||||||
|
|
||||||
|
def makeFilename(self, channel):
|
||||||
|
"""Override this to specialize the filenames of your databases."""
|
||||||
|
channel = ircutils.toLower(channel)
|
||||||
|
prefix = '%s-%s%s' % (channel, self.__class__.__name__, self.suffix)
|
||||||
|
return os.path.join(conf.supybot.directories.data(), prefix)
|
||||||
|
|
||||||
|
def makeDb(self, filename):
|
||||||
|
"""Override this to create your databases."""
|
||||||
|
return cdb.shelf(filename)
|
||||||
|
|
||||||
|
def getDb(self, channel):
|
||||||
|
"""Use this to get a database for a specific channel."""
|
||||||
|
currentThread = threading.currentThread()
|
||||||
|
if channel not in self.dbCache and currentThread == world.mainThread:
|
||||||
|
self.dbCache[channel] = self.makeDb(self.makeFilename(channel))
|
||||||
|
if currentThread != world.mainThread:
|
||||||
|
db = self.makeDb(self.makeFilename(channel))
|
||||||
|
else:
|
||||||
|
db = self.dbCache[channel]
|
||||||
|
db.autocommit = 1
|
||||||
|
return db
|
||||||
|
|
||||||
|
def die(self):
|
||||||
|
for db in self.dbCache.itervalues():
|
||||||
|
try:
|
||||||
|
db.commit()
|
||||||
|
except AttributeError: # In case it's not an SQLite database.
|
||||||
|
pass
|
||||||
|
try:
|
||||||
|
db.close()
|
||||||
|
except AttributeError: # In case it doesn't have a close method.
|
||||||
|
pass
|
||||||
|
del db
|
||||||
|
gc.collect()
|
||||||
|
|
||||||
|
|
||||||
|
class ChannelUserDictionary(UserDict.DictMixin):
|
||||||
|
IdDict = dict
|
||||||
|
def __init__(self):
|
||||||
|
self.channels = ircutils.IrcDict()
|
||||||
|
|
||||||
|
def __getitem__(self, (channel, id)):
|
||||||
|
return self.channels[channel][id]
|
||||||
|
|
||||||
|
def __setitem__(self, (channel, id), v):
|
||||||
|
if channel not in self.channels:
|
||||||
|
self.channels[channel] = self.IdDict()
|
||||||
|
self.channels[channel][id] = v
|
||||||
|
|
||||||
|
def __delitem__(self, (channel, id)):
|
||||||
|
del self.channels[channel][id]
|
||||||
|
|
||||||
|
def iteritems(self):
|
||||||
|
for (channel, ids) in self.channels.iteritems():
|
||||||
|
for (id, v) in ids.iteritems():
|
||||||
|
yield ((channel, id), v)
|
||||||
|
|
||||||
|
def keys(self):
|
||||||
|
L = []
|
||||||
|
for (k, _) in self.iteritems():
|
||||||
|
L.append(k)
|
||||||
|
return L
|
||||||
|
|
||||||
|
|
||||||
|
class ChannelUserDB(ChannelUserDictionary):
|
||||||
|
def __init__(self, filename):
|
||||||
|
ChannelUserDictionary.__init__(self)
|
||||||
|
self.filename = filename
|
||||||
|
try:
|
||||||
|
fd = file(self.filename)
|
||||||
|
except EnvironmentError, e:
|
||||||
|
log.warning('Couldn\'t open %s: %s.', self.filename, e)
|
||||||
|
return
|
||||||
|
reader = csv.reader(fd)
|
||||||
|
try:
|
||||||
|
lineno = 0
|
||||||
|
for t in reader:
|
||||||
|
lineno += 1
|
||||||
|
try:
|
||||||
|
channel = t.pop(0)
|
||||||
|
id = t.pop(0)
|
||||||
|
try:
|
||||||
|
id = int(id)
|
||||||
|
except ValueError:
|
||||||
|
# We'll skip over this so, say, nicks can be kept here.
|
||||||
|
pass
|
||||||
|
v = self.deserialize(channel, id, t)
|
||||||
|
self[channel, id] = v
|
||||||
|
except Exception, e:
|
||||||
|
log.warning('Invalid line #%s in %s.',
|
||||||
|
lineno, self.__class__.__name__)
|
||||||
|
log.debug('Exception: %s', utils.exnToString(e))
|
||||||
|
except Exception, e: # This catches exceptions from csv.reader.
|
||||||
|
log.warning('Invalid line #%s in %s.',
|
||||||
|
lineno, self.__class__.__name__)
|
||||||
|
log.debug('Exception: %s', utils.exnToString(e))
|
||||||
|
|
||||||
|
def flush(self):
|
||||||
|
fd = file(self.filename, 'w')
|
||||||
|
writer = csv.writer(fd)
|
||||||
|
items = self.items()
|
||||||
|
items.sort()
|
||||||
|
for ((channel, id), v) in items:
|
||||||
|
L = self.serialize(v)
|
||||||
|
L.insert(0, id)
|
||||||
|
L.insert(0, channel)
|
||||||
|
writer.writerow(L)
|
||||||
|
fd.close()
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
self.flush()
|
||||||
|
self.clear()
|
||||||
|
|
||||||
|
def deserialize(self, channel, id, L):
|
||||||
|
"""Should take a list of strings and return an object to be accessed
|
||||||
|
via self.get(channel, id)."""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
def serialize(self, x):
|
||||||
|
"""Should take an object (as returned by self.get(channel, id)) and
|
||||||
|
return a list (of any type serializable to csv)."""
|
||||||
|
raise NotImplementedError
|
||||||
|
|
||||||
|
class PeriodicFileDownloader(object):
|
||||||
|
"""A class to periodically download a file/files.
|
||||||
|
|
||||||
|
A class-level dictionary 'periodicFiles' maps names of files to
|
||||||
|
three-tuples of
|
||||||
|
(url, seconds between downloads, function to run with downloaded file).
|
||||||
|
|
||||||
|
'url' should be in some form that urllib2.urlopen can handle (do note that
|
||||||
|
urllib2.urlopen handles file:// links perfectly well.)
|
||||||
|
|
||||||
|
'seconds between downloads' is the number of seconds between downloads,
|
||||||
|
obviously. An important point to remember, however, is that it is only
|
||||||
|
engaged when a command is run. I.e., if you say you want the file
|
||||||
|
downloaded every day, but no commands that use it are run in a week, the
|
||||||
|
next time such a command is run, it'll be using a week-old file. If you
|
||||||
|
don't want such behavior, you'll have to give an error mess age to the user
|
||||||
|
and tell him to call you back in the morning.
|
||||||
|
|
||||||
|
'function to run with downloaded file' is a function that will be passed
|
||||||
|
a string *filename* of the downloaded file. This will be some random
|
||||||
|
filename probably generated via some mktemp-type-thing. You can do what
|
||||||
|
you want with this; you may want to build a database, take some stats,
|
||||||
|
or simply rename the file. You can pass None as your function and the
|
||||||
|
file with automatically be renamed to match the filename you have it listed
|
||||||
|
under. It'll be in conf.supybot.directories.data, of course.
|
||||||
|
|
||||||
|
Aside from that dictionary, simply use self.getFile(filename) in any method
|
||||||
|
that makes use of a periodically downloaded file, and you'll be set.
|
||||||
|
"""
|
||||||
|
periodicFiles = None
|
||||||
|
def __init__(self):
|
||||||
|
if self.periodicFiles is None:
|
||||||
|
raise ValueError, 'You must provide files to download'
|
||||||
|
self.lastDownloaded = {}
|
||||||
|
self.downloadedCounter = {}
|
||||||
|
for filename in self.periodicFiles:
|
||||||
|
if self.periodicFiles[filename][-1] is None:
|
||||||
|
fullname = os.path.join(conf.supybot.directories.data(),
|
||||||
|
filename)
|
||||||
|
if os.path.exists(fullname):
|
||||||
|
self.lastDownloaded[filename] = os.stat(fullname).st_ctime
|
||||||
|
else:
|
||||||
|
self.lastDownloaded[filename] = 0
|
||||||
|
else:
|
||||||
|
self.lastDownloaded[filename] = 0
|
||||||
|
self.currentlyDownloading = sets.Set()
|
||||||
|
self.downloadedCounter[filename] = 0
|
||||||
|
self.getFile(filename)
|
||||||
|
|
||||||
|
def _downloadFile(self, filename, url, f):
|
||||||
|
if world.documenting:
|
||||||
|
return
|
||||||
|
self.currentlyDownloading.add(filename)
|
||||||
|
try:
|
||||||
|
try:
|
||||||
|
infd = webutils.getUrlFd(url)
|
||||||
|
except IOError, e:
|
||||||
|
self.log.warning('Error downloading %s: %s', url, e)
|
||||||
|
return
|
||||||
|
confDir = conf.supybot.directories.data()
|
||||||
|
newFilename = os.path.join(confDir, utils.mktemp())
|
||||||
|
outfd = file(newFilename, 'wb')
|
||||||
|
start = time.time()
|
||||||
|
s = infd.read(4096)
|
||||||
|
while s:
|
||||||
|
outfd.write(s)
|
||||||
|
s = infd.read(4096)
|
||||||
|
infd.close()
|
||||||
|
outfd.close()
|
||||||
|
self.log.info('Downloaded %s in %s seconds',
|
||||||
|
filename, time.time()-start)
|
||||||
|
self.downloadedCounter[filename] += 1
|
||||||
|
self.lastDownloaded[filename] = time.time()
|
||||||
|
if f is None:
|
||||||
|
toFilename = os.path.join(confDir, filename)
|
||||||
|
if os.name == 'nt':
|
||||||
|
# Windows, grrr...
|
||||||
|
if os.path.exists(toFilename):
|
||||||
|
os.remove(toFilename)
|
||||||
|
os.rename(newFilename, toFilename)
|
||||||
|
else:
|
||||||
|
start = time.time()
|
||||||
|
f(newFilename)
|
||||||
|
total = time.time() - start
|
||||||
|
self.log.info('Function ran on %s in %s seconds',
|
||||||
|
filename, total)
|
||||||
|
finally:
|
||||||
|
self.currentlyDownloading.remove(filename)
|
||||||
|
|
||||||
|
def getFile(self, filename):
|
||||||
|
(url, timeLimit, f) = self.periodicFiles[filename]
|
||||||
|
if time.time() - self.lastDownloaded[filename] > timeLimit and \
|
||||||
|
filename not in self.currentlyDownloading:
|
||||||
|
self.log.info('Beginning download of %s', url)
|
||||||
|
args = (filename, url, f)
|
||||||
|
name = '%s #%s' % (filename, self.downloadedCounter[filename])
|
||||||
|
t = threading.Thread(target=self._downloadFile, name=name,
|
||||||
|
args=(filename, url, f))
|
||||||
|
t.setDaemon(True)
|
||||||
|
t.start()
|
||||||
|
world.threadsSpawned += 1
|
||||||
|
|
||||||
|
|
||||||
|
_randomnickRe = re.compile(r'\$rand(?:om)?nick', re.I)
|
||||||
|
_randomdateRe = re.compile(r'\$rand(?:om)?date', re.I)
|
||||||
|
_randomintRe = re.compile(r'\$rand(?:omint)?', re.I)
|
||||||
|
_channelRe = re.compile(r'\$channel', re.I)
|
||||||
|
_whoRe = re.compile(r'\$(?:who|nick)', re.I)
|
||||||
|
_botnickRe = re.compile(r'\$botnick', re.I)
|
||||||
|
_todayRe = re.compile(r'\$(?:today|date)', re.I)
|
||||||
|
_nowRe = re.compile(r'\$(?:now|time)', re.I)
|
||||||
|
_userRe = re.compile(r'\$user', re.I)
|
||||||
|
_hostRe = re.compile(r'\$host', re.I)
|
||||||
|
def standardSubstitute(irc, msg, text):
|
||||||
|
"""Do the standard set of substitutions on text, and return it"""
|
||||||
|
if ircutils.isChannel(msg.args[0]):
|
||||||
|
channel = msg.args[0]
|
||||||
|
else:
|
||||||
|
channel = 'somewhere'
|
||||||
|
def randInt(m):
|
||||||
|
return str(random.randint(-1000, 1000))
|
||||||
|
def randDate(m):
|
||||||
|
t = pow(2,30)*random.random()+time.time()/4.0
|
||||||
|
return time.ctime(t)
|
||||||
|
def randNick(m):
|
||||||
|
if channel != 'somewhere':
|
||||||
|
return random.choice(list(irc.state.channels[channel].users))
|
||||||
|
else:
|
||||||
|
return 'someone'
|
||||||
|
text = _channelRe.sub(channel, text)
|
||||||
|
text = _randomnickRe.sub(randNick, text)
|
||||||
|
text = _randomdateRe.sub(randDate, text)
|
||||||
|
text = _randomintRe.sub(randInt, text)
|
||||||
|
text = _whoRe.sub(msg.nick, text)
|
||||||
|
text = _botnickRe.sub(irc.nick, text)
|
||||||
|
text = _todayRe.sub(time.ctime(), text)
|
||||||
|
text = _nowRe.sub(time.ctime(), text)
|
||||||
|
text = _userRe.sub(msg.user, text)
|
||||||
|
text = _hostRe.sub(msg.host, text)
|
||||||
|
return text
|
||||||
|
|
||||||
|
|
||||||
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
@ -30,8 +30,8 @@
|
|||||||
###
|
###
|
||||||
|
|
||||||
"""
|
"""
|
||||||
Silently listens to a channel, building a database of Markov Chains for later
|
Silently listens to a channel, building an SQL database of Markov Chains for
|
||||||
hijinks. To read more about Markov Chains, check out
|
later hijinks. To read more about Markov Chains, check out
|
||||||
<http://www.cs.bell-labs.com/cm/cs/pearls/sec153.html>. When the database is
|
<http://www.cs.bell-labs.com/cm/cs/pearls/sec153.html>. When the database is
|
||||||
large enough, you can have it make fun little random messages from it.
|
large enough, you can have it make fun little random messages from it.
|
||||||
"""
|
"""
|
||||||
@ -40,112 +40,109 @@ __revision__ = "$Id$"
|
|||||||
|
|
||||||
import plugins
|
import plugins
|
||||||
|
|
||||||
import anydbm
|
|
||||||
import random
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
import conf
|
|
||||||
import world
|
|
||||||
import ircmsgs
|
import ircmsgs
|
||||||
import ircutils
|
import ircutils
|
||||||
import privmsgs
|
import privmsgs
|
||||||
import callbacks
|
import callbacks
|
||||||
|
|
||||||
|
|
||||||
class MarkovDB(object):
|
|
||||||
def __init__(self):
|
|
||||||
self.dbs = {}
|
|
||||||
|
|
||||||
def die(self):
|
|
||||||
for db in self.dbs.values():
|
|
||||||
try:
|
try:
|
||||||
db.close()
|
import sqlite
|
||||||
except:
|
except ImportError:
|
||||||
continue
|
raise callbacks.Error, 'You need to have PySQLite installed to use this ' \
|
||||||
|
'plugin. Download it at <http://pysqlite.sf.net/>'
|
||||||
|
|
||||||
def _getDb(self, channel):
|
conf.registerPlugin('Markov')
|
||||||
channel = channel.lower()
|
conf.registerGlobalValue(supybot.plugins.Markov, 'maximumWorkQueue',
|
||||||
if channel not in self.dbs:
|
registry.PositiveInteger(10, """Determines what the maximum number of
|
||||||
filename = '%s-Markov.db' % channel
|
oustanding Markov work requests will be allowed."""))
|
||||||
filename = os.path.join(conf.supybot.directories.data(), filename)
|
|
||||||
self.dbs[channel] = anydbm.open(filename, 'c')
|
|
||||||
return self.dbs[channel]
|
|
||||||
|
|
||||||
def __getitem__(self, (channel, item)):
|
class MarkovThread(threading.Thread):
|
||||||
return self._getDb(channel)[item]
|
def __init__(self, high, low):
|
||||||
|
self.q = q
|
||||||
|
|
||||||
def __setitem__(self, (channel, item), value):
|
def run(self):
|
||||||
self._getDb(channel)[item] = value
|
while 1:
|
||||||
|
f = self.q.get()
|
||||||
def getNumberOfPairs(self, channel):
|
if f is None:
|
||||||
try:
|
break
|
||||||
# Minus one, because we have a key storing the first pairs.
|
else:
|
||||||
return len(self[channel.lower()]) - 1
|
f()
|
||||||
except KeyError:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def getNumberOfFirstPairs(self, channel):
|
|
||||||
try:
|
|
||||||
return len(self[channel, ''].split())
|
|
||||||
except KeyError:
|
|
||||||
return 0
|
|
||||||
|
|
||||||
def getFirstPair(self, channel):
|
|
||||||
try:
|
|
||||||
pairs = self[channel, ''].split()
|
|
||||||
except KeyError:
|
|
||||||
raise ValueError('No starting pairs in the database.')
|
|
||||||
pair = random.choice(pairs)
|
|
||||||
return pair.split('\x00', 1)
|
|
||||||
|
|
||||||
def getFollower(self, channel, first, second):
|
|
||||||
pair = '%s %s' % (first, second)
|
|
||||||
try:
|
|
||||||
followers = self[channel, pair].split()
|
|
||||||
except KeyError:
|
|
||||||
return '\x00'
|
|
||||||
return random.choice(followers)
|
|
||||||
|
|
||||||
def addFirstPair(self, channel, first, second):
|
|
||||||
pair = '%s\x00%s' % (first, second)
|
|
||||||
try:
|
|
||||||
startingPairs = self[channel, '']
|
|
||||||
except KeyError:
|
|
||||||
startingPairs = ''
|
|
||||||
self[channel, ''] = '%s%s ' % (startingPairs, pair)
|
|
||||||
|
|
||||||
def addPair(self, channel, first, second, follower):
|
|
||||||
pair = '%s %s' % (first, second)
|
|
||||||
try:
|
|
||||||
followers = self[channel, pair]
|
|
||||||
except KeyError:
|
|
||||||
followers = ''
|
|
||||||
self[channel, pair] = '%s%s ' % (followers, follower)
|
|
||||||
|
|
||||||
|
|
||||||
class Markov(callbacks.Privmsg):
|
class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
callbacks.Privmsg.__init__(self)
|
callbacks.Privmsg.__init__(self)
|
||||||
self.db = MarkovDB()
|
plugins.ChannelDBHandler.__init__(self)
|
||||||
|
self.q = Queue.Queue(self.registryValue('maximumWorkQueue'))
|
||||||
|
self.t = MarkovThread(self.q)
|
||||||
|
self.t.start()
|
||||||
|
|
||||||
|
def putq(self, f):
|
||||||
|
try:
|
||||||
|
self.q.put(f, False)
|
||||||
|
except Queue.Full:
|
||||||
|
self.log.info('Can\'t putq, queue full.')
|
||||||
|
raise
|
||||||
|
|
||||||
|
def makeDb(self, filename):
|
||||||
|
def f():
|
||||||
|
if os.path.exists(filename):
|
||||||
|
return sqlite.connect(filename)
|
||||||
|
db = sqlite.connect(filename)
|
||||||
|
cursor = db.cursor()
|
||||||
|
cursor.execute("""CREATE TABLE pairs (
|
||||||
|
id INTEGER PRIMARY KEY,
|
||||||
|
first TEXT,
|
||||||
|
second TEXT,
|
||||||
|
is_first BOOLEAN,
|
||||||
|
UNIQUE (first, second) ON CONFLICT IGNORE
|
||||||
|
)""")
|
||||||
|
cursor.execute("""CREATE TABLE follows (
|
||||||
|
id INTEGER PRIMARY KEY,
|
||||||
|
pair_id INTEGER,
|
||||||
|
word TEXT
|
||||||
|
)""")
|
||||||
|
cursor.execute("""CREATE INDEX follows_pair_id
|
||||||
|
ON follows (pair_id)""")
|
||||||
|
db.commit()
|
||||||
|
return db
|
||||||
|
self.putq(f)
|
||||||
|
|
||||||
def doPrivmsg(self, irc, msg):
|
def doPrivmsg(self, irc, msg):
|
||||||
if not ircutils.isChannel(msg.args[0]):
|
if not ircutils.isChannel(msg.args[0]):
|
||||||
return
|
return
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
|
db = self.getDb(channel)
|
||||||
|
cursor = db.cursor()
|
||||||
if ircmsgs.isAction(msg):
|
if ircmsgs.isAction(msg):
|
||||||
words = ircmsgs.unAction(msg).split()
|
words = ircmsgs.unAction(msg).split()
|
||||||
words.insert(0, '\x00nick')
|
|
||||||
#words.insert(0, msg.nick)
|
|
||||||
else:
|
else:
|
||||||
words = msg.args[1].split()
|
words = msg.args[1].split()
|
||||||
isFirst = True
|
isFirst = True
|
||||||
for (first, second, follower) in window(words, 3):
|
for (first, second, follower) in window(words, 3):
|
||||||
if isFirst:
|
if isFirst:
|
||||||
self.db.addFirstPair(channel, first, second)
|
cursor.execute("""INSERT OR REPLACE
|
||||||
|
INTO pairs VALUES (NULL, %s, %s, 1)""",
|
||||||
|
first, second)
|
||||||
isFirst = False
|
isFirst = False
|
||||||
self.db.addPair(channel, first, second, follower)
|
else:
|
||||||
|
cursor.execute("INSERT INTO pairs VALUES (NULL, %s, %s, 0)",
|
||||||
|
first, second)
|
||||||
|
cursor.execute("""SELECT id FROM pairs
|
||||||
|
WHERE first=%s AND second=%s""", first, second)
|
||||||
|
id = int(cursor.fetchone()[0])
|
||||||
|
cursor.execute("""INSERT INTO follows VALUES (NULL, %s, %s)""",
|
||||||
|
id, follower)
|
||||||
if not isFirst: # i.e., if the loop iterated at all.
|
if not isFirst: # i.e., if the loop iterated at all.
|
||||||
self.db.addPair(channel, second, follower, '\x00')
|
cursor.execute("""INSERT INTO pairs VALUES (NULL, %s, %s, 0)""",
|
||||||
|
second, follower)
|
||||||
|
cursor.execute("""SELECT id FROM pairs
|
||||||
|
WHERE first=%s AND second=%s""", second,follower)
|
||||||
|
id = int(cursor.fetchone()[0])
|
||||||
|
cursor.execute("INSERT INTO follows VALUES (NULL, %s, NULL)", id)
|
||||||
|
db.commit()
|
||||||
|
|
||||||
_maxMarkovLength = 80
|
_maxMarkovLength = 80
|
||||||
_minMarkovLength = 7
|
_minMarkovLength = 7
|
||||||
@ -156,25 +153,40 @@ class Markov(callbacks.Privmsg):
|
|||||||
data kept on <channel> (which is only necessary if not sent in the
|
data kept on <channel> (which is only necessary if not sent in the
|
||||||
channel itself).
|
channel itself).
|
||||||
"""
|
"""
|
||||||
|
argsCopy = args[:]
|
||||||
channel = privmsgs.getChannel(msg, args)
|
channel = privmsgs.getChannel(msg, args)
|
||||||
try:
|
db = self.getDb(channel)
|
||||||
pair = self.db.getFirstPair(channel)
|
cursor = db.cursor()
|
||||||
except ValueError:
|
words = []
|
||||||
irc.error('I have no records for this channel.')
|
cursor.execute("""SELECT id, first, second FROM pairs
|
||||||
|
WHERE is_first=1
|
||||||
|
ORDER BY random()
|
||||||
|
LIMIT 1""")
|
||||||
|
if cursor.rowcount == 0:
|
||||||
|
irc.error('I have no records for that channel.')
|
||||||
return
|
return
|
||||||
words = [pair[0], pair[1]]
|
(id, first, second) = cursor.fetchone()
|
||||||
|
id = int(id)
|
||||||
|
words.append(first)
|
||||||
|
words.append(second)
|
||||||
|
sql = """SELECT follows.word FROM pairs, follows
|
||||||
|
WHERE pairs.first=%s AND
|
||||||
|
pairs.second=%s AND
|
||||||
|
pairs.id=follows.pair_id
|
||||||
|
ORDER BY random()
|
||||||
|
LIMIT 1"""
|
||||||
while len(words) < self._maxMarkovLength:
|
while len(words) < self._maxMarkovLength:
|
||||||
follower = self.db.getFollower(channel, words[-2], words[-1])
|
cursor.execute(sql, words[-2], words[-1])
|
||||||
if follower == '\x00':
|
results = cursor.fetchone()
|
||||||
if len(words) < self._minMarkovLength:
|
if not results:
|
||||||
pair = self.db.getFirstPair(channel)
|
|
||||||
words = [pair[0], pair[1]]
|
|
||||||
else:
|
|
||||||
break
|
break
|
||||||
|
word = results[0]
|
||||||
|
if word is None:
|
||||||
|
break
|
||||||
|
words.append(word)
|
||||||
|
if len(words) < self._minMarkovLength:
|
||||||
|
self.markov(irc, msg, argsCopy)
|
||||||
else:
|
else:
|
||||||
words.append(follower)
|
|
||||||
if words[0] == '\x00nick':
|
|
||||||
words[0] = choice(irc.state.channels[channel].users)
|
|
||||||
irc.reply(' '.join(words))
|
irc.reply(' '.join(words))
|
||||||
|
|
||||||
def pairs(self, irc, msg, args):
|
def pairs(self, irc, msg, args):
|
||||||
@ -184,7 +196,10 @@ class Markov(callbacks.Privmsg):
|
|||||||
<channel>.
|
<channel>.
|
||||||
"""
|
"""
|
||||||
channel = privmsgs.getChannel(msg, args)
|
channel = privmsgs.getChannel(msg, args)
|
||||||
n = self.db.getNumberOfPairs(channel)
|
db = self.getDb(channel)
|
||||||
|
cursor = db.cursor()
|
||||||
|
cursor.execute("""SELECT COUNT(*) FROM pairs""")
|
||||||
|
n = int(cursor.fetchone()[0])
|
||||||
s = 'There are %s pairs in my Markov database for %s' % (n, channel)
|
s = 'There are %s pairs in my Markov database for %s' % (n, channel)
|
||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
|
|
||||||
@ -195,37 +210,40 @@ class Markov(callbacks.Privmsg):
|
|||||||
<channel>.
|
<channel>.
|
||||||
"""
|
"""
|
||||||
channel = privmsgs.getChannel(msg, args)
|
channel = privmsgs.getChannel(msg, args)
|
||||||
n = self.db.getNumberOfFirstPairs(channel)
|
db = self.getDb(channel)
|
||||||
|
cursor = db.cursor()
|
||||||
|
cursor.execute("""SELECT COUNT(*) FROM pairs WHERE is_first=1""")
|
||||||
|
n = int(cursor.fetchone()[0])
|
||||||
s = 'There are %s first pairs in my Markov database for %s'%(n,channel)
|
s = 'There are %s first pairs in my Markov database for %s'%(n,channel)
|
||||||
irc.reply(s)
|
irc.reply(s)
|
||||||
|
|
||||||
# def follows(self, irc, msg, args):
|
def follows(self, irc, msg, args):
|
||||||
# """[<channel>]
|
"""[<channel>]
|
||||||
#
|
|
||||||
# Returns the number of Markov's third links in the database for
|
|
||||||
# <channel>.
|
|
||||||
# """
|
|
||||||
# channel = privmsgs.getChannel(msg, args)
|
|
||||||
# db = self._getDb(channel)
|
|
||||||
# cursor = db.cursor()
|
|
||||||
# cursor.execute("""SELECT COUNT(*) FROM follows""")
|
|
||||||
# n = int(cursor.fetchone()[0])
|
|
||||||
# s = 'There are %s follows in my Markov database for %s' % (n, channel)
|
|
||||||
# irc.reply(s)
|
|
||||||
|
|
||||||
# def lasts(self, irc, msg, args):
|
Returns the number of Markov's third links in the database for
|
||||||
# """[<channel>]
|
<channel>.
|
||||||
#
|
"""
|
||||||
# Returns the number of Markov's last links in the database for
|
channel = privmsgs.getChannel(msg, args)
|
||||||
# <channel>.
|
db = self.getDb(channel)
|
||||||
# """
|
cursor = db.cursor()
|
||||||
# channel = privmsgs.getChannel(msg, args)
|
cursor.execute("""SELECT COUNT(*) FROM follows""")
|
||||||
# db = self._getDb(channel)
|
n = int(cursor.fetchone()[0])
|
||||||
# cursor = db.cursor()
|
s = 'There are %s follows in my Markov database for %s' % (n, channel)
|
||||||
# cursor.execute("""SELECT COUNT(*) FROM follows WHERE word ISNULL""")
|
irc.reply(s)
|
||||||
# n = int(cursor.fetchone()[0])
|
|
||||||
# s = 'There are %s lasts in my Markov database for %s' % (n, channel)
|
def lasts(self, irc, msg, args):
|
||||||
# irc.reply(s)
|
"""[<channel>]
|
||||||
|
|
||||||
|
Returns the number of Markov's last links in the database for
|
||||||
|
<channel>.
|
||||||
|
"""
|
||||||
|
channel = privmsgs.getChannel(msg, args)
|
||||||
|
db = self.getDb(channel)
|
||||||
|
cursor = db.cursor()
|
||||||
|
cursor.execute("""SELECT COUNT(*) FROM follows WHERE word ISNULL""")
|
||||||
|
n = int(cursor.fetchone()[0])
|
||||||
|
s = 'There are %s lasts in my Markov database for %s' % (n, channel)
|
||||||
|
irc.reply(s)
|
||||||
|
|
||||||
|
|
||||||
Class = Markov
|
Class = Markov
|
||||||
|
@ -58,14 +58,14 @@ import optparse
|
|||||||
started = time.time()
|
started = time.time()
|
||||||
|
|
||||||
import supybot
|
import supybot
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import drivers
|
import supybot.drivers as drivers
|
||||||
import schedule
|
import supybot.schedule as schedule
|
||||||
# We schedule this event rather than have it actually run because if there
|
# We schedule this event rather than have it actually run because if there
|
||||||
# is a failure between now and the time it takes the Owner plugin to load
|
# is a failure between now and the time it takes the Owner plugin to load
|
||||||
# all the various plugins, our registry file might be wiped. That's bad.
|
# all the various plugins, our registry file might be wiped. That's bad.
|
||||||
@ -184,9 +184,9 @@ if __name__ == '__main__':
|
|||||||
sys.stderr.write(os.linesep)
|
sys.stderr.write(os.linesep)
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import world
|
import supybot.world as world
|
||||||
world.starting = True
|
world.starting = True
|
||||||
|
|
||||||
def closeRegistry():
|
def closeRegistry():
|
||||||
@ -245,11 +245,11 @@ if __name__ == '__main__':
|
|||||||
fd.close()
|
fd.close()
|
||||||
registry.open(userdataFilename)
|
registry.open(userdataFilename)
|
||||||
|
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import drivers
|
import supybot.drivers as drivers
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
import Owner
|
import supybot.Owner as Owner
|
||||||
|
|
||||||
irc = irclib.Irc(nick, user=user, ident=ident,
|
irc = irclib.Irc(nick, user=user, ident=ident,
|
||||||
network=defaultNetwork, password=password)
|
network=defaultNetwork, password=password)
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
import supybot
|
import supybot
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
from questions import *
|
from questions import *
|
||||||
|
|
||||||
import os
|
import os
|
||||||
@ -39,8 +39,8 @@ import sys
|
|||||||
import optparse
|
import optparse
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
conf.supybot.log.stdout.setValue(False)
|
conf.supybot.log.stdout.setValue(False)
|
||||||
#conf.supybot.log.level.set('DEBUG')
|
#conf.supybot.log.level.set('DEBUG')
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ def main():
|
|||||||
conf.supybot.directories.data.setValue('/')
|
conf.supybot.directories.data.setValue('/')
|
||||||
conf.supybot.directories.plugins.setValue(['/'])
|
conf.supybot.directories.plugins.setValue(['/'])
|
||||||
conf.supybot.databases.users.filename.setValue(filename)
|
conf.supybot.databases.users.filename.setValue(filename)
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
|
|
||||||
if not options.name:
|
if not options.name:
|
||||||
name = ''
|
name = ''
|
||||||
|
@ -11,7 +11,7 @@ if sys.version_info < (2, 3, 0):
|
|||||||
sys.stderr.write('This script requires Python 2.3 or newer.\n')
|
sys.stderr.write('This script requires Python 2.3 or newer.\n')
|
||||||
sys.exit(-1)
|
sys.exit(-1)
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
from questions import *
|
from questions import *
|
||||||
|
|
||||||
template = '''
|
template = '''
|
||||||
@ -53,12 +53,12 @@ Add the module docstring here. This will be used by the setup.py script.
|
|||||||
__revision__ = "$%s$"
|
__revision__ = "$%s$"
|
||||||
__author__ = ''
|
__author__ = ''
|
||||||
|
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
|
@ -5,7 +5,7 @@ import sys
|
|||||||
|
|
||||||
import supybot
|
import supybot
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sets
|
import sets
|
||||||
@ -16,10 +16,10 @@ import logging
|
|||||||
import optparse
|
import optparse
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import ansi
|
import supybot.ansi as ansi
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import questions
|
import questions
|
||||||
from questions import output, yn, anything, something, expect, getpass
|
from questions import output, yn, anything, something, expect, getpass
|
||||||
@ -41,7 +41,7 @@ def getPlugins(pluginDirs):
|
|||||||
return plugins
|
return plugins
|
||||||
|
|
||||||
def loadPlugin(name):
|
def loadPlugin(name):
|
||||||
import Owner
|
import supybot.Owner as Owner
|
||||||
try:
|
try:
|
||||||
module = Owner.loadPluginModule(name)
|
module = Owner.loadPluginModule(name)
|
||||||
if hasattr(module, 'Class'):
|
if hasattr(module, 'Class'):
|
||||||
@ -124,8 +124,8 @@ def getRegistryValue(setting, prompt='', showHelp=True, showType=True):
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
log._stdoutHandler.setLevel(100) # *Nothing* gets through this!
|
log._stdoutHandler.setLevel(100) # *Nothing* gets through this!
|
||||||
parser = optparse.OptionParser(usage='Usage: %prog [options] [configFile]',
|
parser = optparse.OptionParser(usage='Usage: %prog [options] [configFile]',
|
||||||
version='Supybot %s' % conf.version)
|
version='Supybot %s' % conf.version)
|
||||||
@ -468,7 +468,7 @@ def main():
|
|||||||
you can add users to your bot's user database, it's *very* important that
|
you can add users to your bot's user database, it's *very* important that
|
||||||
you have an owner user for you bot.""")
|
you have an owner user for you bot.""")
|
||||||
if yn('Would you like to add an owner user for your bot?', default=True):
|
if yn('Would you like to add an owner user for your bot?', default=True):
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
name = something('What should the owner\'s username be?')
|
name = something('What should the owner\'s username be?')
|
||||||
try:
|
try:
|
||||||
id = ircdb.users.getUserId(name)
|
id = ircdb.users.getUserId(name)
|
||||||
@ -511,7 +511,7 @@ def main():
|
|||||||
on accident). You can even have more than one. I (jemfinch) am quite
|
on accident). You can even have more than one. I (jemfinch) am quite
|
||||||
partial to @, but that's because I've been using it since my ocamlbot
|
partial to @, but that's because I've been using it since my ocamlbot
|
||||||
days.""")
|
days.""")
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
c = ''
|
c = ''
|
||||||
while not c:
|
while not c:
|
||||||
try:
|
try:
|
||||||
@ -683,7 +683,7 @@ if __name__ == '__main__':
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
# We may still be using bold text when exiting during a prompt
|
# We may still be using bold text when exiting during a prompt
|
||||||
if questions.useBold:
|
if questions.useBold:
|
||||||
import ansi
|
import supybot.ansi as ansi
|
||||||
print ansi.RESET
|
print ansi.RESET
|
||||||
print
|
print
|
||||||
print
|
print
|
||||||
|
13
setup.py
13
setup.py
@ -62,9 +62,8 @@ setup(
|
|||||||
url='http://supybot.sf.net/',
|
url='http://supybot.sf.net/',
|
||||||
author='Jeremy Fincher',
|
author='Jeremy Fincher',
|
||||||
author_email='jemfinch@users.sf.net',
|
author_email='jemfinch@users.sf.net',
|
||||||
#description='A highly robust and full-featured IRC library and bot.',
|
|
||||||
description='A flexible and extensible Python IRC bot and framework.',
|
description='A flexible and extensible Python IRC bot and framework.',
|
||||||
long_description="""A full-featured Python IRC bot with a clean and
|
long_description="""A robust, full-featured Python IRC bot with a clean and
|
||||||
flexible plugin API. Equipped with a complete ACL system for specifying
|
flexible plugin API. Equipped with a complete ACL system for specifying
|
||||||
user permissions with as much as per-command granularity. Batteries are
|
user permissions with as much as per-command granularity. Batteries are
|
||||||
included in the form of numerous plugins already written.""",
|
included in the form of numerous plugins already written.""",
|
||||||
@ -86,15 +85,11 @@ setup(
|
|||||||
|
|
||||||
# Installation data
|
# Installation data
|
||||||
packages=['supybot',
|
packages=['supybot',
|
||||||
'supybot.src',
|
|
||||||
'supybot.others',
|
'supybot.others',
|
||||||
'supybot.plugins',
|
'supybot.plugins',],
|
||||||
'supybot.others.IMDb',],
|
package_dir={'supybot': 'src',
|
||||||
package_dir={'supybot': os.curdir,
|
|
||||||
'supybot.src': 'src',
|
|
||||||
'supybot.others': 'others',
|
'supybot.others': 'others',
|
||||||
'supybot.plugins': 'plugins',
|
'supybot.plugins': 'plugins',},
|
||||||
'supybot.others.IMDb': os.path.join('others', 'IMDb'),},
|
|
||||||
scripts=['scripts/supybot',
|
scripts=['scripts/supybot',
|
||||||
'scripts/supybot-wizard',
|
'scripts/supybot-wizard',
|
||||||
'scripts/supybot-adduser',
|
'scripts/supybot-adduser',
|
||||||
|
20
src/Admin.py
20
src/Admin.py
@ -37,7 +37,7 @@ caller to have the 'admin' capability. This plugin is loaded by default.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import pprint
|
import pprint
|
||||||
@ -47,15 +47,15 @@ import smtplib
|
|||||||
import textwrap
|
import textwrap
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import schedule
|
import supybot.schedule as schedule
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
|
|
||||||
class Admin(privmsgs.CapabilityCheckingPrivmsg):
|
class Admin(privmsgs.CapabilityCheckingPrivmsg):
|
||||||
|
@ -37,21 +37,21 @@ to have the <channel>.op capability. This plugin is loaded by default.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import getopt
|
import getopt
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import schedule
|
import supybot.schedule as schedule
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
conf.registerPlugin('Channel')
|
conf.registerPlugin('Channel')
|
||||||
conf.registerChannelValue(conf.supybot.plugins.Channel, 'alwaysRejoin',
|
conf.registerChannelValue(conf.supybot.plugins.Channel, 'alwaysRejoin',
|
||||||
|
@ -38,15 +38,15 @@ __author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
|||||||
|
|
||||||
import getopt
|
import getopt
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
###
|
###
|
||||||
# Now, to setup the registry.
|
# Now, to setup the registry.
|
||||||
|
20
src/Misc.py
20
src/Misc.py
@ -36,22 +36,22 @@ Miscellaneous commands.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import getopt
|
import getopt
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class Misc(callbacks.Privmsg):
|
class Misc(callbacks.Privmsg):
|
||||||
priority = sys.maxint
|
priority = sys.maxint
|
||||||
|
24
src/Owner.py
24
src/Owner.py
@ -37,7 +37,7 @@ their caller to have the 'owner' capability. This plugin is loaded by default.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import gc
|
import gc
|
||||||
import os
|
import os
|
||||||
@ -48,17 +48,17 @@ import getopt
|
|||||||
import logging
|
import logging
|
||||||
import linecache
|
import linecache
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import drivers
|
import supybot.drivers as drivers
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
class Deprecated(ImportError):
|
class Deprecated(ImportError):
|
||||||
pass
|
pass
|
||||||
|
16
src/User.py
16
src/User.py
@ -36,7 +36,7 @@ Provides commands useful to users in general. This plugin is loaded by default.
|
|||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
__author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import getopt
|
import getopt
|
||||||
@ -44,14 +44,14 @@ import string
|
|||||||
import fnmatch
|
import fnmatch
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
|
||||||
import Config
|
import supybot.Config as Config
|
||||||
|
|
||||||
class User(callbacks.Privmsg):
|
class User(callbacks.Privmsg):
|
||||||
def _checkNotChannel(self, irc, msg, password=' '):
|
def _checkNotChannel(self, irc, msg, password=' '):
|
||||||
|
@ -0,0 +1,42 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
###
|
||||||
|
# Copyright (c) 2002, Jeremiah Fincher
|
||||||
|
# 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 os.path
|
||||||
|
|
||||||
|
installDir = os.path.dirname(sys.modules[__name__].__file__)
|
||||||
|
|
||||||
|
srcDir = os.path.join(installDir, 'src')
|
||||||
|
othersDir = os.path.join(installDir, 'others')
|
||||||
|
|
||||||
|
sys.path.insert(0, othersDir)
|
||||||
|
|
||||||
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
@ -40,13 +40,13 @@ import socket
|
|||||||
import asyncore
|
import asyncore
|
||||||
import asynchat
|
import asynchat
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import world
|
import supybot.world as world
|
||||||
import drivers
|
import supybot.drivers as drivers
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import schedule
|
import supybot.schedule as schedule
|
||||||
|
|
||||||
class AsyncoreRunnerDriver(drivers.IrcDriver):
|
class AsyncoreRunnerDriver(drivers.IrcDriver):
|
||||||
def run(self):
|
def run(self):
|
||||||
|
@ -40,7 +40,7 @@ how to use them.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import copy
|
import copy
|
||||||
@ -54,15 +54,15 @@ import threading
|
|||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import irclib
|
import supybot.irclib as irclib
|
||||||
import plugins
|
import supybot.plugins as plugins
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
|
|
||||||
def addressed(nick, msg, prefixChars=None, whenAddressedByNick=None):
|
def addressed(nick, msg, prefixChars=None, whenAddressedByNick=None):
|
||||||
"""If msg is addressed to 'name', returns the portion after the address.
|
"""If msg is addressed to 'name', returns the portion after the address.
|
||||||
|
@ -36,7 +36,7 @@ the same as) DJB's CDB <http://cr.yp.to/cdb.html>.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -45,7 +45,7 @@ import struct
|
|||||||
import os.path
|
import os.path
|
||||||
import cPickle as pickle
|
import cPickle as pickle
|
||||||
|
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
|
|
||||||
def hash(s):
|
def hash(s):
|
||||||
"""DJB's hash function for CDB."""
|
"""DJB's hash function for CDB."""
|
||||||
|
12
src/conf.py
12
src/conf.py
@ -31,19 +31,19 @@
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import socket
|
import socket
|
||||||
import string
|
import string
|
||||||
|
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
|
|
||||||
installDir = os.path.dirname(os.path.dirname(sys.modules[__name__].__file__))
|
installDir = os.path.dirname(sys.modules[__name__].__file__)
|
||||||
_srcDir = os.path.join(installDir, 'src')
|
_srcDir = installDir
|
||||||
_pluginsDir = os.path.join(installDir, 'plugins')
|
_pluginsDir = os.path.join(installDir, 'plugins')
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -35,16 +35,16 @@ Contains various drivers (network, file, and otherwise) for using IRC objects.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ansi
|
import supybot.ansi as ansi
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
|
|
||||||
_drivers = {}
|
_drivers = {}
|
||||||
_deadDrivers = []
|
_deadDrivers = []
|
||||||
@ -118,11 +118,14 @@ def newDriver(server, irc, moduleName=None):
|
|||||||
if moduleName == 'default':
|
if moduleName == 'default':
|
||||||
try:
|
try:
|
||||||
import twistedDrivers
|
import twistedDrivers
|
||||||
moduleName = 'twistedDrivers'
|
moduleName = 'supybot.twistedDrivers'
|
||||||
except ImportError:
|
except ImportError:
|
||||||
del sys.modules['twistedDrivers']
|
del sys.modules['supybot.twistedDrivers']
|
||||||
moduleName = 'socketDrivers'
|
moduleName = 'supybot.socketDrivers'
|
||||||
driver = __import__(moduleName).Driver(server, irc)
|
elif not moduleName.startswith('supybot.'):
|
||||||
|
moduleName = 'supybot.' + moduleName
|
||||||
|
driverModule = __import__(moduleName, {}, {}, ['not empty'])
|
||||||
|
driver = driverModule.Driver(server, irc)
|
||||||
irc.driver = driver
|
irc.driver = driver
|
||||||
return driver
|
return driver
|
||||||
|
|
||||||
|
14
src/ircdb.py
14
src/ircdb.py
@ -33,7 +33,7 @@ __revision__ = "$Id$"
|
|||||||
|
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sets
|
import sets
|
||||||
@ -41,12 +41,12 @@ import time
|
|||||||
import string
|
import string
|
||||||
from itertools import imap, ilen, ifilter
|
from itertools import imap, ilen, ifilter
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import unpreserve
|
import supybot.unpreserve as unpreserve
|
||||||
|
|
||||||
def fromChannelCapability(capability):
|
def fromChannelCapability(capability):
|
||||||
"""Returns a (channel, capability) tuple from a channel capability."""
|
"""Returns a (channel, capability) tuple from a channel capability."""
|
||||||
|
@ -31,21 +31,21 @@
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
import sets
|
import sets
|
||||||
import time
|
import time
|
||||||
from itertools import imap, chain, cycle
|
from itertools import imap, chain, cycle
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
from structures import queue, smallqueue, RingBuffer
|
from supybot.structures import queue, smallqueue, RingBuffer
|
||||||
|
|
||||||
###
|
###
|
||||||
# The base class for a callback to be registered with an Irc object. Shows
|
# The base class for a callback to be registered with an Irc object. Shows
|
||||||
|
@ -38,14 +38,14 @@ object (which, as you'll read later, is quite...full-featured :))
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import time
|
import time
|
||||||
import string
|
import string
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
|
|
||||||
###
|
###
|
||||||
# IrcMsg class -- used for representing IRC messages acquired from a network.
|
# IrcMsg class -- used for representing IRC messages acquired from a network.
|
||||||
|
@ -38,7 +38,7 @@ IRC-case-insensitive fashion), and numerous other things.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import copy
|
import copy
|
||||||
@ -53,7 +53,7 @@ import textwrap
|
|||||||
from itertools import imap
|
from itertools import imap
|
||||||
from cStringIO import StringIO as sio
|
from cStringIO import StringIO as sio
|
||||||
|
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
|
|
||||||
def debug(s, *args):
|
def debug(s, *args):
|
||||||
"""Prints a debug string. Most likely replaced by our logging debug."""
|
"""Prints a debug string. Most likely replaced by our logging debug."""
|
||||||
|
12
src/log.py
12
src/log.py
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
@ -42,12 +42,12 @@ import logging
|
|||||||
import operator
|
import operator
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
import ansi
|
import supybot.ansi as ansi
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import registry
|
import supybot.registry as registry
|
||||||
|
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
|
|
||||||
deadlyExceptions = [KeyboardInterrupt, SystemExit]
|
deadlyExceptions = [KeyboardInterrupt, SystemExit]
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import gc
|
import gc
|
||||||
import os
|
import os
|
||||||
@ -45,13 +45,13 @@ import urllib2
|
|||||||
import UserDict
|
import UserDict
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
import cdb
|
import supybot.cdb as cdb
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import webutils
|
import supybot.webutils as webutils
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mxCrap = {}
|
mxCrap = {}
|
||||||
|
@ -35,20 +35,20 @@ Includes various accessories for callbacks.Privmsg based callbacks.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import types
|
import types
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import ircutils
|
import supybot.ircutils as ircutils
|
||||||
import callbacks
|
import supybot.callbacks as callbacks
|
||||||
import structures
|
import supybot.structures as structures
|
||||||
|
|
||||||
def getChannel(msg, args, raiseError=True):
|
def getChannel(msg, args, raiseError=True):
|
||||||
"""Returns the channel the msg came over or the channel given in args.
|
"""Returns the channel the msg came over or the channel given in args.
|
||||||
|
@ -37,8 +37,8 @@ import sys
|
|||||||
import textwrap
|
import textwrap
|
||||||
from getpass import getpass as getPass
|
from getpass import getpass as getPass
|
||||||
|
|
||||||
import ansi
|
import supybot.ansi as ansi
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
|
|
||||||
useBold = False
|
useBold = False
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ import time
|
|||||||
import types
|
import types
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
|
|
||||||
class RegistryException(Exception):
|
class RegistryException(Exception):
|
||||||
pass
|
pass
|
||||||
|
@ -33,13 +33,13 @@
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
|
|
||||||
filename = 'repl'
|
filename = 'repl'
|
||||||
|
|
||||||
|
@ -36,13 +36,13 @@ Supybot driver.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import heapq
|
import heapq
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import drivers
|
import supybot.drivers as drivers
|
||||||
|
|
||||||
class mytuple(tuple):
|
class mytuple(tuple):
|
||||||
def __cmp__(self, other):
|
def __cmp__(self, other):
|
||||||
|
@ -37,7 +37,7 @@ from __future__ import division
|
|||||||
|
|
||||||
__revision__ ="$Id$"
|
__revision__ ="$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import time
|
import time
|
||||||
import atexit
|
import atexit
|
||||||
@ -45,13 +45,13 @@ import select
|
|||||||
import socket
|
import socket
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import utils
|
import supybot.utils as utils
|
||||||
import world
|
import supybot.world as world
|
||||||
import drivers
|
import supybot.drivers as drivers
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
import schedule
|
import supybot.schedule as schedule
|
||||||
|
|
||||||
instances = 0
|
instances = 0
|
||||||
originalPoll = conf.supybot.drivers.poll()
|
originalPoll = conf.supybot.drivers.poll()
|
||||||
|
@ -37,7 +37,7 @@ Data structures for Python.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import types
|
import types
|
||||||
import pprint
|
import pprint
|
||||||
|
@ -31,15 +31,15 @@
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import log
|
import supybot.log as log
|
||||||
import conf
|
import supybot.conf as conf
|
||||||
import ircdb
|
import supybot.ircdb as ircdb
|
||||||
import drivers
|
import supybot.drivers as drivers
|
||||||
import ircmsgs
|
import supybot.ircmsgs as ircmsgs
|
||||||
|
|
||||||
from twisted.internet import reactor
|
from twisted.internet import reactor
|
||||||
from twisted.protocols.basic import LineReceiver
|
from twisted.protocols.basic import LineReceiver
|
||||||
|
@ -35,7 +35,7 @@ Simple utility functions.
|
|||||||
|
|
||||||
__revision__ = "$Id$"
|
__revision__ = "$Id$"
|
||||||
|
|
||||||
import fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -52,7 +52,7 @@ import UserDict
|
|||||||
import htmlentitydefs
|
import htmlentitydefs
|
||||||
from itertools import imap, ifilter
|
from itertools import imap, ifilter
|
||||||
|
|
||||||
from structures import TwoWayDictionary
|
from supybot.structures import TwoWayDictionary
|
||||||
|
|
||||||
curry = new.instancemethod
|
curry = new.instancemethod
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user