mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
refact: refactored module parameters api
This commit is contained in:
parent
611e3fe078
commit
e543582257
12 changed files with 111 additions and 198 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue