mirror of
https://git.sr.ht/~emerson/reflectionircd
synced 2025-05-17 22:13:04 +00:00
24 lines
791 B
TypeScript
24 lines
791 B
TypeScript
![]() |
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();
|
||
|
}
|
||
|
}
|