Changed baseplugin not to require 'from baseplugin import *' because fix is now munging builtins.

This commit is contained in:
Jeremy Fincher 2003-10-05 12:56:56 +00:00
parent 0a46f90104
commit ec0de6431d
46 changed files with 65 additions and 62 deletions

View File

@ -33,7 +33,7 @@
Lots of stuff relating to random numbers.
"""
from baseplugin import *
import plugins
import random

View File

@ -33,7 +33,7 @@
Allows 'aliases' for other commands.
"""
from baseplugin import *
import plugins
import re
import new

View File

@ -33,7 +33,7 @@
Amazon module, to use Amazon's Web Services. Currently only does ISBN lookups.
"""
from baseplugin import *
import plugins
import amazon

View File

@ -33,7 +33,7 @@
Babelfish-related commands.
"""
from baseplugin import *
import plugins
import random

View File

@ -34,7 +34,7 @@ Filters bad words on outgoing messages from the bot, so the bot can't be made
to say bad words.
"""
from baseplugin import *
import plugins
import re
import sets

View File

@ -35,7 +35,7 @@ concerning joins, parts, and various other commands in addition to tracking
statistics about smileys, actions, characters, and words.
"""
from baseplugin import *
import plugins
import os
import re
@ -75,10 +75,10 @@ frowns = (':|', ':-/', ':-\\', ':\\', ':/', ':(', ':-(', ':\'(')
smileyre = re.compile('|'.join(map(re.escape, smileys)))
frownre = re.compile('|'.join(map(re.escape, frowns)))
class ChannelDB(ChannelDBHandler, callbacks.PrivmsgCommandAndRegexp):
class ChannelDB(plugins.ChannelDBHandler, callbacks.PrivmsgCommandAndRegexp):
regexps = sets.Set(['increaseKarma', 'decreaseKarma'])
def __init__(self):
ChannelDBHandler.__init__(self)
plugins.ChannelDBHandler.__init__(self)
callbacks.PrivmsgCommandAndRegexp.__init__(self)
def makeDb(self, filename):

View File

@ -33,7 +33,7 @@
Logs each channel to its own individual logfile.
"""
from baseplugin import *
import plugins
import time
from cStringIO import StringIO

View File

@ -34,7 +34,7 @@ Handles standard CTCP responses to PING, TIME, SOURCE, VERSION, USERINFO,
and FINGER.
"""
from baseplugin import *
import plugins
import os
import sys

View File

@ -33,7 +33,7 @@
Supports various DCC things.
"""
from baseplugin import *
import plugins
import socket
import textwrap

View File

@ -33,7 +33,7 @@
This is a module to contain Debian-specific commands.
"""
from baseplugin import *
import plugins
import re
import gzip
@ -88,7 +88,7 @@ example = utils.wrapLines("""
""")
class Debian(callbacks.Privmsg, PeriodicFileDownloader):
class Debian(callbacks.Privmsg, plugins.PeriodicFileDownloader):
threaded = True
periodicFiles = {
# This file is only updated once a week, so there's no sense in
@ -100,7 +100,7 @@ class Debian(callbacks.Privmsg, PeriodicFileDownloader):
contents = os.path.join(conf.dataDir, 'Contents-i386.gz')
def __init__(self):
callbacks.Privmsg.__init__(self)
PeriodicFileDownloader.__init__(self)
plugins.PeriodicFileDownloader.__init__(self)
self.usePythonZegrep = False
def usepythonzegrep(self, irc, msg, args):

View File

@ -33,7 +33,7 @@
Commands that use the dictd protocol to snag stuff off a server.
"""
from baseplugin import *
import plugins
import sets
import random

View File

@ -34,7 +34,7 @@ Enforcer: Enforces capabilities on a channel, watching MODEs, KICKs,
JOINs, etc. to make sure they match the channel's config.
"""
from baseplugin import *
import plugins
import conf
import ircdb

View File

@ -34,7 +34,7 @@ Handles "factoids," little tidbits of information held in a database and
available on demand via several commands.
"""
from baseplugin import *
import plugins
import time
import getopt
@ -87,9 +87,9 @@ G<supybot> jemfinch: Error: No factoid matches that key.
<supybot> jemfinch: 'CFnews' and 'sf.net-website'
""")
class Factoids(ChannelDBHandler, callbacks.Privmsg):
class Factoids(plugins.ChannelDBHandler, callbacks.Privmsg):
def __init__(self):
ChannelDBHandler.__init__(self)
plugins.ChannelDBHandler.__init__(self)
callbacks.Privmsg.__init__(self)
def makeDb(self, filename):

View File

@ -34,7 +34,7 @@ Allows people behind a relaybot (which uses <nick@network> to relay messages)
to access the bot.
"""
from baseplugin import *
import plugins
import re
import random

View File

@ -33,7 +33,7 @@
Provides FreeBSD ports searching and other FreeBSD-specific services.
"""
from baseplugin import *
import plugins
import string
import getopt
@ -47,12 +47,15 @@ import privmsgs
import callbacks
indexFile = 'INDEX'
indexUrl = 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/INDEX'
dbFile = os.path.join(conf.dataDir, 'FreeBSD.db')
def getIndex():
"""Returns a file-like object that is the Ports index."""
# ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-stable/INDEX
return file(indexFile, 'r')
if os.path.exists(indexFile):
return file(indexFile, 'r')
else:
return urllib2.urlopen(indexUrl)
def makeDb(dbfilename, indexfd, replace=False):
if os.path.exists(dbfilename):

View File

@ -33,7 +33,7 @@
Just a regexp module to make the bot a wee bit friendlier.
"""
from baseplugin import *
import plugins
import re

View File

@ -33,7 +33,7 @@
Provides a multitude of fun, useless commands.
"""
from baseplugin import *
import plugins
from itertools import imap, ifilter
import os

View File

@ -33,7 +33,7 @@
Provides fun commands that require a database to operate.
"""
from baseplugin import *
import plugins
import sets
import time

View File

@ -32,7 +32,7 @@
Handles URL snarfing for Gameknot.com and the gkstats command.
"""
from baseplugin import *
import plugins
import re
import sets

View File

@ -33,7 +33,7 @@
Acceses Google for various things.
"""
from baseplugin import *
import plugins
import re
import sets

View File

@ -33,7 +33,7 @@
Provides several commands that go out to websites and get things.
"""
from baseplugin import *
import plugins
import re
import sets

View File

@ -34,7 +34,7 @@ Does various (well, only one at the moment :)) things with the Internet Movie
Database.
"""
from baseplugin import *
import plugins
import IMDb

View File

@ -33,7 +33,7 @@
A plugin that tries to emulate Infobot somewhat faithfully.
"""
from baseplugin import *
import plugins
import re
import os.path

View File

@ -33,7 +33,7 @@
Removes all bold output by the bot.
"""
from baseplugin import *
import plugins
import re

View File

@ -33,7 +33,7 @@
The Lookup plugin handles looking up various values by their key.
"""
from baseplugin import *
import plugins
import os
import sys

View File

@ -36,7 +36,7 @@ later hijinks. To read more about Markov Chains, check out
large enough, you can have it make fun little random messages from it.
"""
from baseplugin import *
import plugins
import os.path
@ -57,10 +57,10 @@ def configure(onStart, afterConnect, advanced):
from questions import expect, anything, something, yn
onStart.append('load Markov')
class Markov(ChannelDBHandler, callbacks.Privmsg):
class Markov(plugins.ChannelDBHandler, callbacks.Privmsg):
threaded = True
def __init__(self):
ChannelDBHandler.__init__(self)
plugins.ChannelDBHandler.__init__(self)
callbacks.Privmsg.__init__(self)
def makeDb(self, filename):

View File

@ -33,7 +33,7 @@
Various math-related commands.
"""
from baseplugin import *
import plugins
import re
import new

View File

@ -37,7 +37,7 @@ Provides several commands that shamelessly imitate Moobot, if only to show
developers coming from Moobot how to code to Supybot.
"""
from baseplugin import *
import plugins
import re
import base64

View File

@ -33,7 +33,7 @@
Various network-related commands.
"""
from baseplugin import *
import plugins
import sets
import socket

View File

@ -34,7 +34,7 @@ A module to allow each channel to have "news" which people will be notified of
when they join the channel. News items may have expiration dates.
"""
from baseplugin import *
import plugins
import os
import time
@ -77,9 +77,9 @@ be a lot more detailed. (Subject: "Another test news item", added by Strike on
07:12 PM, September 12, 2003, expires at 08:36 PM, September 12, 2003)
""")
class News(ChannelDBHandler, callbacks.Privmsg):
class News(plugins.ChannelDBHandler, callbacks.Privmsg):
def __init__(self):
ChannelDBHandler.__init__(self)
plugins.ChannelDBHandler.__init__(self)
callbacks.Privmsg.__init__(self)
self.removeOld = False

View File

@ -34,7 +34,7 @@ A complete messaging system that allows users to leave 'notes' for other
users that can be retrieved later.
"""
from baseplugin import *
import plugins
import time
import os.path

View File

@ -34,7 +34,7 @@ Commands specific to OSU;
(The Ohio State University, <http://www.ohio-state.edu/>)
"""
from baseplugin import *
import plugins
import urllib2

View File

@ -36,7 +36,7 @@ bots. This module makes supybot automatically part certain channels as soon
as he joins.
"""
from baseplugin import *
import plugins
import conf
import utils

View File

@ -34,7 +34,7 @@ Various commands relating to Python (the programming language supybot is
written in) somehow.
"""
from baseplugin import *
import plugins
import os
import imp

View File

@ -33,7 +33,7 @@
Maintains a Quotes database for each channel.
"""
from baseplugin import *
import plugins
import re
import time
@ -48,9 +48,9 @@ import ircdb
import privmsgs
import callbacks
class Quotes(ChannelDBHandler, callbacks.Privmsg):
class Quotes(plugins.ChannelDBHandler, callbacks.Privmsg):
def __init__(self):
ChannelDBHandler.__init__(self)
plugins.ChannelDBHandler.__init__(self)
callbacks.Privmsg.__init__(self)
def makeDb(self, filename):

View File

@ -34,7 +34,7 @@ Provides basic functionality for handling RSS/RDF feeds. Depends on the Alias
module for user-friendliness.
"""
from baseplugin import *
import plugins
import time

View File

@ -33,7 +33,7 @@
Logs raw IRC messages to a file, conf.dataDir/raw.log
"""
from baseplugin import *
import plugins
import os
import conf

View File

@ -33,7 +33,7 @@
Handles relaying between networks.
"""
from baseplugin import *
import plugins
import re
import sets

View File

@ -33,7 +33,7 @@
Warns people when they join a channel if their ident is root.
"""
from baseplugin import *
import plugins
import irclib
import ircmsgs

View File

@ -33,7 +33,7 @@
Services: Handles management of nicks with NickServ, and ops with ChanServ.
"""
from baseplugin import *
import plugins
import re
import time

View File

@ -33,7 +33,7 @@
A simple module to handle various informational commands querying the bot's
current status and statistics.
"""
from baseplugin import *
import plugins
import os
import sets

View File

@ -33,7 +33,7 @@
Provides commands for manipulating channel topics.
"""
from baseplugin import *
import plugins
import re
import random

View File

@ -33,7 +33,7 @@
Various commands that depend on Twisted <http://www.twistedmatrix.com/>.
"""
from baseplugin import *
import plugins
import re

View File

@ -35,7 +35,7 @@ searching for URLs and returning random URLs. Also provides statistics on the
URLs in the database.
"""
from baseplugin import *
import plugins
import os
import re
@ -80,11 +80,11 @@ def configure(onStart, afterConnect, advanced):
from questions import expect, anything, something, yn
onStart.append('load URLSnarfer')
class URLSnarfer(ChannelDBHandler, callbacks.Privmsg):
class URLSnarfer(plugins.ChannelDBHandler, callbacks.Privmsg):
def __init__(self):
self.nextMsgs = {}
callbacks.Privmsg.__init__(self)
ChannelDBHandler.__init__(self)
plugins.ChannelDBHandler.__init__(self)
def makeDb(self, filename):
if os.path.exists(filename):

View File

@ -33,7 +33,7 @@
Provides commands available only on Unix.
"""
from baseplugin import *
import plugins
import os
import re

View File

@ -33,7 +33,7 @@
Various utility commands, mostly useful for manipulating nested commands.
"""
from baseplugin import *
import plugins
import string