mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: propagating mod.started and mod.stopped events
This commit is contained in:
parent
0f427911be
commit
c89123f305
2 changed files with 10 additions and 10 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue