mirror of
https://github.com/znc/znc.git
synced 2026-06-28 14:01:35 +02:00
Move pyeval module to the right place.
Also make 'network' work better when pyeval is a user module.
This commit is contained in:
@@ -53,13 +53,13 @@ class pyeval(znc.Module, InteractiveInterpreter):
|
||||
self.locals['znc'] = znc
|
||||
self.locals['module'] = self
|
||||
self.locals['user'] = self.GetUser()
|
||||
self.locals['network'] = self.GetNetwork()
|
||||
self.indent = re.compile(r'^>+')
|
||||
|
||||
return True
|
||||
|
||||
def OnModCommand(self, line):
|
||||
self.locals['client'] = self.GetClient()
|
||||
self.locals['network'] = self.GetNetwork()
|
||||
|
||||
# Hijack sys.stdout.write
|
||||
stdout_write = sys.stdout.write
|
||||
@@ -76,4 +76,5 @@ class pyeval(znc.Module, InteractiveInterpreter):
|
||||
# Revert sys.stdout.write
|
||||
sys.stdout.write = stdout_write
|
||||
del self.locals['client']
|
||||
del self.locals['network']
|
||||
|
||||
Reference in New Issue
Block a user