daily commit
This commit is contained in:
parent
8e2ef82565
commit
71aa8be4d5
@ -60,6 +60,7 @@
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
|
@ -20,6 +20,7 @@ namespace ChatRoomServer.Main
|
||||
{
|
||||
static ILog _log;
|
||||
static readonly object _lockObject = new object();
|
||||
internal static HashSet<string> PresetAdministrators = (System.Configuration.ConfigurationManager.AppSettings["chat:admin"] ?? "").Split(new[] {';'}, StringSplitOptions.RemoveEmptyEntries).ToHashSet(StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
static ChatServer()
|
||||
{
|
||||
|
@ -19,6 +19,7 @@ namespace ChatRoomServer.Main
|
||||
|
||||
DateTime _connecTime = DateTime.Now;
|
||||
long _connectId;
|
||||
bool _isAdmin;
|
||||
|
||||
/// <summary>
|
||||
/// 路径分割
|
||||
@ -55,6 +56,7 @@ namespace ChatRoomServer.Main
|
||||
NickName = System.Net.WebUtility.UrlDecode(path[3]);
|
||||
}
|
||||
PathSegements = path;
|
||||
_isAdmin = ChatServer.PresetAdministrators.Contains(UserName);
|
||||
|
||||
//更新统计
|
||||
var db = new ChatDb();
|
||||
|
@ -17,8 +17,13 @@
|
||||
};
|
||||
|
||||
sessMgr.on("sessionChanged", function () {
|
||||
user = sessMgr.current;
|
||||
checkPrivilege();
|
||||
|
||||
if (!sessMgr.current) {
|
||||
session.exitRoom();
|
||||
} else {
|
||||
user = sessMgr.current;
|
||||
checkPrivilege();
|
||||
}
|
||||
});
|
||||
checkPrivilege();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user