refact: refactored module parameters api

This commit is contained in:
evilsocket 2018-01-11 00:27:53 +01:00
commit e543582257
12 changed files with 111 additions and 198 deletions

View file

@ -133,7 +133,9 @@ func (s *Session) Close() {
s.Events.Add("session.closing", nil)
for _, m := range s.Modules {
m.OnSessionEnded(s)
if m.Running() {
m.Stop()
}
}
s.Firewall.Restore()
@ -216,11 +218,6 @@ func (s *Session) Start() error {
}()
s.Active = true
for _, m := range s.Modules {
m.OnSessionStarted(s)
}
s.Events.Add("session.started", nil)
return nil