Skip to content

Commit

Permalink
Merge pull request #700 from ao-org/remote_shutdown
Browse files Browse the repository at this point in the history
Implemented remote shutdown
  • Loading branch information
RecoX authored Jan 16, 2025
2 parents a1420d8 + 6780212 commit 054b4de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
18 changes: 13 additions & 5 deletions Codigo/Protocol_GmCommands.bas
Original file line number Diff line number Diff line change
Expand Up @@ -4965,12 +4965,20 @@ On Error GoTo HandleFeatureToggle_Err:
Exit Sub
End If
If (UserList(UserIndex).flags.Privilegios And (e_PlayerType.Admin)) Then
Call SetFeatureToggle(name, value > 0)
'Msg1006= variable configurada correctamente.
Call WriteLocaleMsg(UserIndex, "1006", e_FontTypeNames.FONTTYPE_INFO)
If Name = "SGRACEFULLY" Then
Call SendData(SendTarget.ToAll, 0, PrepareMessageConsoleMsg("Server » closing down now.", e_FontTypeNames.FONTTYPE_PROMEDIO_MENOR))
Call GuardarUsuarios
Call EcharPjsNoPrivilegiados
frmMain.GuardarYCerrar = True
Unload frmMain
Else
Call SetFeatureToggle(Name, Value > 0)
'Msg1006= variable configurada correctamente.
Call WriteLocaleMsg(UserIndex, "1006", e_FontTypeNames.FONTTYPE_INFO)
End If
Else
'Msg1007= no tienes permisos para realizar esta accion.
Call WriteLocaleMsg(UserIndex, "1007", e_FontTypeNames.FONTTYPE_INFO)
'Msg1007= no tienes permisos para realizar esta accion.
Call WriteLocaleMsg(UserIndex, "1007", e_FontTypeNames.FONTTYPE_INFO)
End If
Exit Sub
HandleFeatureToggle_Err:
Expand Down
2 changes: 1 addition & 1 deletion Codigo/frmMain.frm
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ Const WM_MOUSEMOVE = &H200
Const WM_LBUTTONDBLCLK = &H203
Const WM_RBUTTONUP = &H205

Private GuardarYCerrar As Boolean
Public GuardarYCerrar As Boolean
Private tHechizosMinutesCounter As Byte

Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
Expand Down

0 comments on commit 054b4de

Please sign in to comment.