Skip to content

Commit

Permalink
tweak: changed a few strings
Browse files Browse the repository at this point in the history
  • Loading branch information
tabarra committed Aug 2, 2023
1 parent 617327c commit dc10718
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2023 André Tabarra <maintainer@txadm.in>
Copyright (c) 2019-2023 André Tabarra <maintainer@txadmin.gg>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
16 changes: 9 additions & 7 deletions core/webroutes/deployer/actions.js
@@ -1,8 +1,8 @@
const modulename = 'WebServer:DeployerActions';
import path from 'path';
import { cloneDeep } from 'lodash-es';
import { cloneDeep } from 'lodash-es';
import slash from 'slash';
import mysql from 'mysql2/promise'
import mysql from 'mysql2/promise';
import consts from '@core/extras/consts';
import { txEnv, convars } from '@core/globalData';
import { validateModifyServerConfig } from '../../extras/fxsConfigHelper';
Expand Down Expand Up @@ -113,18 +113,20 @@ async function handleSetVariables(ctx) {
};
await mysql.createConnection(mysqlOptions);
} catch (error) {
const msgHeader = `<b>Database connection failed:</b> ${error.message}`;
if (error.code == 'ECONNREFUSED') {
let outMessage = error?.message ?? 'Unknown error occurred.';
if (error?.code === 'ECONNREFUSED') {
let specificError = (txEnv.isWindows)
? 'If you do not have a database installed, you can download and run XAMPP.'
: 'If you do not have a database installed, you must download and run MySQL or MariaDB.';
if (userVars.dbPort !== 3306) {
specificError += '<br>\n<b>You are not using the default DB port 3306, make sure it is correct!</b>';
}
return ctx.send({ type: 'danger', message: `${msgHeader}<br>\n${specificError}` });
} else {
return ctx.send({ type: 'danger', message: msgHeader });
outMessage = `${error?.message}<br>\n${specificError}`;
} else if (error.message?.includes('auth_gssapi_client')) {
outMessage = `Your database does not accept the required authentication method. Please update your MySQL/MariaDB server and try again.`;
}

return ctx.send({ type: 'danger', message: `<b>Database connection failed:</b> ${outMessage}` });
}

//Setting connection string
Expand Down
2 changes: 1 addition & 1 deletion docs/dev_notes.md
@@ -1,5 +1,5 @@
# TODO:
- [ ] xxx
- [ ] add `cache-control` and/or `vary` to all pages

> next up
- [ ] Add a tracking for % of redm/fivem/libertym servers to txTracker
Expand Down
2 changes: 1 addition & 1 deletion resource/menu/client/cl_spectate.lua
Expand Up @@ -316,7 +316,7 @@ RegisterNetEvent('txcl:spectate:start', function(targetServerId, targetCoords)
Wait(50)
end

--If failed to resolve the targer
--If failed to resolve the target
if (resolvedPlayerId <= 0 or resolvedPed <= 0) then
debugPrint('Failed to resolve target PlayerId or Ped')
-- reset spectator
Expand Down

0 comments on commit dc10718

Please sign in to comment.