Skip to content

Commit

Permalink
fix modcall newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
stonedDiscord authored Dec 13, 2024
1 parent 6229783 commit ed18b2a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webAO/packets/handlers/handleZZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { prepChat } from "../../encoding";
*/
export const handleZZ = (args: string[]) => {
const oocLog = document.getElementById("client_ooclog")!;
oocLog.innerHTML += `$Alert: ${prepChat(args[1])}\r\n`;
const message = args[1].replace(/\n/g, "<br>");
oocLog.innerHTML += `$Alert: ${prepChat(message)}<br>`;
if (oocLog.scrollTop > oocLog.scrollHeight - 60) {
oocLog.scrollTop = oocLog.scrollHeight;
}
Expand Down

0 comments on commit ed18b2a

Please sign in to comment.