fix: propagating mod.started and mod.stopped events

This commit is contained in:
evilsocket 2019-03-15 17:28:20 +01:00
commit c89123f305
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 10 additions and 10 deletions

View file

@ -186,12 +186,10 @@ func (m *SessionModule) SetRunning(running bool, cb func()) error {
m.Started = running
m.StatusLock.Unlock()
if *m.Session.Options.Debug {
if running {
m.Session.Events.Add("mod.started", m.Name)
} else {
m.Session.Events.Add("mod.stopped", m.Name)
}
if running {
m.Session.Events.Add("mod.started", m.Name)
} else {
m.Session.Events.Add("mod.stopped", m.Name)
}
if cb != nil {