reflectionircd/src/Server.ts

24 lines
791 B
TypeScript
Raw Normal View History

2021-12-05 18:33:49 -05:00
import { Channel } from "./Channel.js"
import { IRCUser } from "./IRCUser.js"
import { MatrixUser } from "./MatrixUser.js"
export class Server {
public name: string
// <roomId, Channel>
public matrixRooms: Map<string, Channel>
// <roomAlias (fallback to roomId), Channel>
public ircChannels: Map<string, Channel>
// <mxid, MatrixUser>
public matrixUsers: Map<string, MatrixUser>
// <mxid, IRCUser>
public ircUsers: Map<string, IRCUser>
public nickToMxid: Map<string, string>
constructor(public config: any) {
this.name = this.config.serverName;
this.matrixRooms = new Map();
this.ircChannels = new Map();
this.matrixUsers = new Map();
this.ircUsers = new Map();
this.nickToMxid = new Map();
}
}