Move pyeval module to the right place.

Also make 'network' work better when pyeval is a user module.
This commit is contained in:
Alexey Sokolov
2015-08-23 18:18:25 +01:00
parent c8ac04165d
commit 01c73ff5f0
@@ -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']