mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-17 20:54:40 +03:00
tgbot - login notify (show password for failed login)
This commit is contained in:
@@ -1019,7 +1019,7 @@ func (t *Tgbot) prepareServerUsageInfo() string {
|
||||
return info
|
||||
}
|
||||
|
||||
func (t *Tgbot) UserLoginNotify(username string, ip string, time string, status LoginStatus) {
|
||||
func (t *Tgbot) UserLoginNotify(username string, password string, ip string, time string, status LoginStatus) {
|
||||
if !t.IsRunning() {
|
||||
return
|
||||
}
|
||||
@@ -1037,11 +1037,12 @@ func (t *Tgbot) UserLoginNotify(username string, ip string, time string, status
|
||||
msg := ""
|
||||
if status == LoginSuccess {
|
||||
msg += t.I18nBot("tgbot.messages.loginSuccess")
|
||||
msg += t.I18nBot("tgbot.messages.hostname", "Hostname=="+hostname)
|
||||
} else if status == LoginFail {
|
||||
msg += t.I18nBot("tgbot.messages.loginFailed")
|
||||
msg += t.I18nBot("tgbot.messages.hostname", "Hostname=="+hostname)
|
||||
msg += t.I18nBot("tgbot.messages.password", "Password=="+password)
|
||||
}
|
||||
|
||||
msg += t.I18nBot("tgbot.messages.hostname", "Hostname=="+hostname)
|
||||
msg += t.I18nBot("tgbot.messages.username", "Username=="+username)
|
||||
msg += t.I18nBot("tgbot.messages.ip", "IP=="+ip)
|
||||
msg += t.I18nBot("tgbot.messages.time", "Time=="+time)
|
||||
|
||||
Reference in New Issue
Block a user