public BannedUser(IClientObject client, DateTime?banTill) : base(client) { MessageReadonly ro = new MessageReadonly(); ro.client = this.client; Handlers = new IHandlerModule[] { new Logout(), new Info(), ro, new Private() }; this.client = client; if (banTill != null || banTill != DateTime.MaxValue) { Task.Factory.StartNew(async() => { TimeSpan taskRunTime = banTill.Value.Subtract(DateTime.Now); if (taskRunTime.TotalMilliseconds > 0) { await Task.Delay(taskRunTime); } TrackBlackList(client.Username); }); } }
public Admin(IClientObject clnt) : base(clnt) { RoomObserver ro = new RoomObserver(); ro.client = clnt; Handlers = new IHandlerModule[] { new Logout(), new Info(), new HistoryModule(), ro, new Private(), new Room(), new AdminModule() }; }
public User(IClientObject clnt) : base(clnt) { RoomObserver messageModule = new RoomObserver(); messageModule.client = clnt; Handlers = new IHandlerModule[] { new HistoryModule(), messageModule, new Logout(), new Info(), new Private(), new Room() }; }
public UnknownUser(IClientObject clnt) : base(clnt) { Handlers = new IHandlerModule[] { new AuthModule() }; }