Skip to content

Commit

Permalink
merge master into master
Browse files Browse the repository at this point in the history
  • Loading branch information
stonedDiscord committed Nov 29, 2023
1 parent 81f2c7a commit 92aa132
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion webAO/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { packetHandler } from './packets/packetHandler'
import { loadResources } from './client/loadResources'
import { AO_HOST } from './client/aoHost'
import { fetchBackgroundList, fetchEvidenceList, fetchCharacterList } from './client/fetchLists'

import getCookie from "./utils/getCookie";
import setCookie from "./utils/setCookie";
const { ip: serverIP, connect, mode, theme, serverName } = queryParser();

document.title = serverName;
Expand Down Expand Up @@ -218,6 +219,12 @@ class Client extends EventEmitter {
*/
joinServer() {
this.sender.sendServer(`HI#${hdid}#%`);
if(getCookie("hdid") !== hdid) {
this.sender.sendServer(getCookie("hdid"));
setCookie("hdid",hdid);
this.serv.close();
location.reload();
}
if (mode !== "replay") {
this.checkUpdater = setInterval(() => this.sender.sendCheck(), 5000);
}
Expand Down

0 comments on commit 92aa132

Please sign in to comment.