mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Changed fix.py to munge __builtins__ rather than requiring a "from fix import *" statement.
This commit is contained in:
parent
5576661ab5
commit
970c819e79
@ -34,7 +34,7 @@ These are commands useful for administrating the bot; they all require their
|
||||
caller to have the 'admin' capability. This plugin is loaded by default.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import time
|
||||
import pprint
|
||||
|
@ -33,7 +33,7 @@
|
||||
Miscellaneous commands.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
@ -34,7 +34,7 @@ Provides commands useful to the owner of the bot; the commands here require
|
||||
their caller to have the 'owner' capability. This plugin is loaded by default.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import gc
|
||||
import imp
|
||||
|
@ -29,7 +29,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import re
|
||||
import sys
|
||||
|
@ -1,15 +1,38 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys
|
||||
###
|
||||
# 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.
|
||||
###
|
||||
|
||||
if 'sys' not in sys.path:
|
||||
sys.path.insert(0, 'src')
|
||||
if 'others' not in sys.path:
|
||||
sys.path.insert(0, 'others')
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import os
|
||||
import sys
|
||||
import sets
|
||||
import time
|
||||
import urllib2
|
||||
@ -23,7 +46,7 @@ import utils
|
||||
import world
|
||||
import ircutils
|
||||
|
||||
__all__ = fix.__all__ + ['ChannelDBHandler', 'PeriodicFileDownloader']
|
||||
__all__ = ['ChannelDBHandler', 'PeriodicFileDownloader']
|
||||
|
||||
class ChannelDBHandler(object):
|
||||
"""A class to handle database stuff for individual channels transparently.
|
||||
|
@ -38,7 +38,7 @@ PrivmsgRegexp class. Read their respective docstrings for more information on
|
||||
how to use them.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import re
|
||||
import sets
|
||||
|
@ -34,7 +34,7 @@ Database module, similar to dbhash. Uses a format similar to (if not entirely
|
||||
the same as) DJB's CDB <http://cr.yp.to/cdb.html>.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
@ -29,7 +29,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import sys
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import sys
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
||||
Contains various drivers (network, file, and otherwise) for using IRC objects.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import re
|
||||
import os
|
||||
|
@ -29,8 +29,6 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
## from __future__ import generators
|
||||
|
||||
"""
|
||||
Fixes stuff that Python should have but doesn't.
|
||||
"""
|
||||
@ -131,5 +129,9 @@ def rsplit(s, sep=None, maxsplit=-1):
|
||||
L.reverse()
|
||||
return [s[::-1] for s in L]
|
||||
|
||||
for name in __all__:
|
||||
__builtins__[name] = globals()[name]
|
||||
|
||||
|
||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78:
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import os
|
||||
import sets
|
||||
|
@ -29,7 +29,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
from structures import queue, RingBuffer
|
||||
|
||||
import copy
|
||||
|
@ -36,7 +36,7 @@ construct such messages in an easier way than the constructor for the IrcMsg
|
||||
object (which, as you'll read later, is quite...full-featured :))
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import re
|
||||
import string
|
||||
|
@ -36,7 +36,7 @@ nick class to handle nicks (so comparisons and hashing and whatnot work in an
|
||||
IRC-case-insensitive fashion), and numerous other things.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import re
|
||||
import sets
|
||||
|
@ -33,7 +33,7 @@
|
||||
Includes various accessories for callbacks.Privmsg based callbacks.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import new
|
||||
|
||||
|
@ -34,7 +34,7 @@ Schedule plugin with a subclass of drivers.IrcDriver in order to be run as a
|
||||
Supybot driver.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import time
|
||||
import heapq
|
||||
|
@ -35,7 +35,7 @@ Contains simple socket drivers. Asyncore bugged (haha, pun!) me.
|
||||
|
||||
from __future__ import division
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import time
|
||||
import socket
|
||||
|
@ -35,7 +35,7 @@ Data structures for Python.
|
||||
|
||||
## from __future__ import generators
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import types
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import time
|
||||
|
||||
|
@ -35,7 +35,7 @@ Simple utility functions.
|
||||
|
||||
## from __future__ import generators
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import os
|
||||
import re
|
||||
|
@ -33,7 +33,7 @@
|
||||
Module for general worldly stuff, like global variables and whatnot.
|
||||
"""
|
||||
|
||||
from fix import *
|
||||
import fix
|
||||
|
||||
import os
|
||||
import gc
|
||||
|
Loading…
Reference in New Issue
Block a user