mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Alias & RSS: Use types.MethodType instead of new.instancemethod.
This commit is contained in:
parent
7f0e1115b5
commit
8b7d16c850
@ -29,7 +29,7 @@
|
||||
###
|
||||
|
||||
import re
|
||||
import new
|
||||
import types
|
||||
|
||||
import supybot.conf as conf
|
||||
import supybot.utils as utils
|
||||
@ -264,7 +264,7 @@ class Alias(callbacks.Plugin):
|
||||
raise AliasError, format('Alias %q is locked.', name)
|
||||
try:
|
||||
f = makeNewAlias(name, alias)
|
||||
f = new.instancemethod(f, self, Alias)
|
||||
f = types.MethodType(f, self, Alias)
|
||||
except RecursiveAlias:
|
||||
raise AliasError, 'You can\'t define a recursive alias.'
|
||||
aliasGroup = self.registryValue('aliases', value=False)
|
||||
|
@ -28,8 +28,8 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
###
|
||||
|
||||
import new
|
||||
import time
|
||||
import types
|
||||
import socket
|
||||
import sgmllib
|
||||
import threading
|
||||
@ -349,7 +349,7 @@ class RSS(callbacks.Plugin):
|
||||
args.insert(0, url)
|
||||
self.rss(irc, msg, args)
|
||||
f = utils.python.changeFunctionName(f, name, docstring)
|
||||
f = new.instancemethod(f, self, RSS)
|
||||
f = types.MethodType(f, self, RSS)
|
||||
self.feedNames[name] = (url, f)
|
||||
self._registerFeed(name, url)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user