new: new limit optional argument for events.show

This commit is contained in:
evilsocket 2018-02-08 12:03:40 +01:00
parent 1353c47056
commit 3c2932514a
4 changed files with 37 additions and 24 deletions

View file

@ -127,9 +127,11 @@ func (m *SessionModule) SetRunning(running bool) {
defer m.StatusLock.Unlock()
m.Started = running
if running {
m.Session.Events.Add("mod.started", m.Name)
} else {
m.Session.Events.Add("mod.stopped", m.Name)
if *m.Session.Options.Debug == true {
if running {
m.Session.Events.Add("mod.started", m.Name)
} else {
m.Session.Events.Add("mod.stopped", m.Name)
}
}
}