mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
Fixed problem with new.function.
This commit is contained in:
parent
232c634436
commit
e298f33d7e
@ -148,10 +148,9 @@ def makeNewAlias(name, alias):
|
||||
alias_ = atRe.sub(replace, alias_)
|
||||
alias_ = alias_.replace('$*', ' '.join(map(utils.dqrepr, args)))
|
||||
self.Proxy(irc.irc, msg, callbacks.tokenize(alias_))
|
||||
#f = new.function(f.func_code, f.func_globals, alias)
|
||||
f = new.function(f.func_code, f.func_globals, name, closure=f.func_closure)
|
||||
f.__doc__ ='<an alias, %s>\n\nAlias for %r' % \
|
||||
(utils.nItems(biggestDollar, 'argument'), alias)
|
||||
#f = new.function(f.func_code, f.func_globals, name)
|
||||
return f
|
||||
|
||||
|
||||
|
@ -84,7 +84,8 @@ def checkCapability(f, capability):
|
||||
f(self, irc, msg, args)
|
||||
else:
|
||||
irc.error(msg, conf.replyNoCapability % capability)
|
||||
#newf = new.function(newf.func_code, newf.func_globals, f.func_name)
|
||||
newf = new.function(newf.func_code, newf.func_globals,
|
||||
f.func_name, closure=newf.func_closure)
|
||||
newf.__doc__ = f.__doc__
|
||||
return newf
|
||||
|
||||
@ -102,7 +103,8 @@ def checkChannelCapability(f, capability):
|
||||
ff(irc, msg, args, *L)
|
||||
else:
|
||||
irc.error(msg, conf.replyNoCapability % chancap)
|
||||
#newf = new.function(newf.func_code, newf.func_globals, f.func_name)
|
||||
newf = new.function(newf.func_code, newf.func_globals,
|
||||
f.func_name, closure=newf.func_closure)
|
||||
newf.__doc__ = f.__doc__
|
||||
return newf
|
||||
|
||||
@ -112,7 +114,8 @@ def thread(f):
|
||||
ff = new.instancemethod(f, self, self.__class__)
|
||||
t = callbacks.CommandThread(self.callCommand, ff, irc, msg, args, *L)
|
||||
t.start()
|
||||
#newf = new.function(newf.func_code, newf.func_globals, f.func_name)
|
||||
newf = new.function(newf.func_code, newf.func_globals,
|
||||
f.func_name, closure=newf.func_closure)
|
||||
newf.__doc__ = f.__doc__
|
||||
return newf
|
||||
|
||||
@ -130,7 +133,8 @@ def name(f):
|
||||
L = (name,) + L
|
||||
ff = new.instancemethod(f, self, self.__class__)
|
||||
ff(irc, msg, args, *L)
|
||||
#newf = new.function(newf.func_code, newf.func_globals, f.func_name)
|
||||
newf = new.function(newf.func_code, newf.func_globals,
|
||||
f.func_name, closure=newf.func_closure)
|
||||
newf.__doc__ = f.__doc__
|
||||
return newf
|
||||
|
||||
@ -141,7 +145,8 @@ def channel(f):
|
||||
L = (channel,) + L
|
||||
ff = new.instancemethod(f, self, self.__class__)
|
||||
ff(irc, msg, args, *L)
|
||||
#newf = new.function(newf.func_code, newf.func_globals, f.func_name)
|
||||
newf = new.function(newf.func_code, newf.func_globals,
|
||||
f.func_name, closure=newf.func_closure)
|
||||
newf.__doc__ = f.__doc__
|
||||
return newf
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user