Finished up with toke logic.

This commit is contained in:
rainbow napkin 2024-12-13 22:07:00 -05:00
parent d85f906a69
commit ffd2094f16
5 changed files with 60 additions and 14 deletions

View file

@ -88,6 +88,10 @@ module.exports = class{
this.server.io.in(chan).emit("chatMessage", {user, flair, highLevel, msg, type});
}
relayServerWisper(socket, user, flair, highLevel, msg, type){
socket.emit("chatMessage", {user, flair, highLevel, msg, type});
}
relayGlobalChat(user, flair, highLevel, msg, type = 'chat'){
this.server.io.emit("chatMessage", {user, flair, highLevel, msg, type});
}
@ -96,6 +100,14 @@ module.exports = class{
this.relayGlobalChat("Tokebot", "", 10, msg, "toke");
}
relayTokeWhisper(socket, msg){
this.relayServerWisper(socket, "Tokebot", "", 10, msg, "tokewhisper");
}
relayGlobalTokeWhisper(msg){
this.relayGlobalChat("Tokebot", "", 10, msg, "tokewhisper");
}
relayServerAnnouncement(msg){
//This codebase is always at a 10
this.relayGlobalChat("Server", "", 10, msg, "announcement");