C# 클래스 wmib.Security

파일 보기 프로젝트 열기: benapetr/wikimedia-bot 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Roles Role>.Dictionary
Users List

공개 메소드들

메소드 설명
AddUser ( string level, string user ) : bool

Add

Auth ( string User, string Password ) : SystemUser

Verify the users credentials and if they are correct, returns a user instance

DeleteUser ( SystemUser origin, string user ) : void

Delete user

Dump ( ) : string
EscapeUser ( string name ) : string

Normalize user

GetGlobalUser ( string user ) : SystemUser

Gets the global user. Work just as GetUser, but only for global records

GetLevel ( libirc user ) : int

Return a level of role that this user posses

GetLevelOfRole ( string role ) : int
GetNameOfRole ( Security role ) : string
GetUser ( libirc user ) : SystemUser
GetUser ( string user ) : SystemUser

Return user object from a name Search all global and local records for matching regex, if multiple matches are existing the one with highest privileges is returned.

Global ( ) : void

Load a global list

Init ( ) : void

Load all roles

InsertUser ( XmlNode node ) : void
IsApproved ( libirc user, string command ) : bool

Check if user is approved to do operation requested

IsApproved ( string User, string Host, string privilege ) : bool

Check if user is approved to do operation requested

IsGloballyApproved ( SystemUser user, string permission ) : bool
IsGloballyApproved ( libirc user, string permission ) : bool
IsKnown ( libirc user ) : bool
IsKnown ( string User, string Host ) : bool
IsRole ( string name ) : bool
ListAll ( ) : string

List all users to a channel

Save ( ) : bool

Save

Security ( Channel channel ) : System

비공개 메소드들

메소드 설명
GlobalChanged ( object sender, EventArgs e ) : void

This is called when the file is changed

GlobalLoad ( ) : void

Load all global users of bot

HasPrivilege ( string privilege, string role ) : bool

메소드 상세

AddUser() 공개 메소드

Add
public AddUser ( string level, string user ) : bool
level string Level
user string Regex
리턴 bool

Auth() 공개 정적인 메소드

Verify the users credentials and if they are correct, returns a user instance
public static Auth ( string User, string Password ) : SystemUser
User string Username
Password string Password
리턴 SystemUser

DeleteUser() 공개 메소드

Delete user
public DeleteUser ( SystemUser origin, string user ) : void
origin SystemUser
user string Regex
리턴 void

Dump() 공개 정적인 메소드

public static Dump ( ) : string
리턴 string

EscapeUser() 공개 정적인 메소드

Normalize user
public static EscapeUser ( string name ) : string
name string
리턴 string

GetGlobalUser() 공개 정적인 메소드

Gets the global user. Work just as GetUser, but only for global records
public static GetGlobalUser ( string user ) : SystemUser
user string /// Identification string against which the user regexes are tested, this is usually a string /// in format of 'nick!ident@hostname' ///
리턴 SystemUser

GetLevel() 공개 메소드

Return a level of role that this user posses
public GetLevel ( libirc user ) : int
user libirc
리턴 int

GetLevelOfRole() 공개 정적인 메소드

public static GetLevelOfRole ( string role ) : int
role string
리턴 int

GetNameOfRole() 공개 정적인 메소드

public static GetNameOfRole ( Security role ) : string
role Security
리턴 string

GetUser() 공개 메소드

public GetUser ( libirc user ) : SystemUser
user libirc
리턴 SystemUser

GetUser() 공개 메소드

Return user object from a name Search all global and local records for matching regex, if multiple matches are existing the one with highest privileges is returned.
public GetUser ( string user ) : SystemUser
user string /// Identification string against which the user regexes are tested, this is usually a string /// in format of nick!ident@hostname (typical for IRC protocol) ///
리턴 SystemUser

Global() 공개 정적인 메소드

Load a global list
public static Global ( ) : void
리턴 void

Init() 공개 정적인 메소드

Load all roles
public static Init ( ) : void
리턴 void

InsertUser() 공개 메소드

public InsertUser ( XmlNode node ) : void
node System.Xml.XmlNode
리턴 void

IsApproved() 공개 메소드

Check if user is approved to do operation requested
public IsApproved ( libirc user, string command ) : bool
user libirc
command string
리턴 bool

IsApproved() 공개 메소드

Check if user is approved to do operation requested
public IsApproved ( string User, string Host, string privilege ) : bool
User string Username
Host string Hostname
privilege string Approved for specified object / request
리턴 bool

IsGloballyApproved() 공개 정적인 메소드

public static IsGloballyApproved ( SystemUser user, string permission ) : bool
user SystemUser
permission string
리턴 bool

IsGloballyApproved() 공개 정적인 메소드

public static IsGloballyApproved ( libirc user, string permission ) : bool
user libirc
permission string
리턴 bool

IsKnown() 공개 메소드

public IsKnown ( libirc user ) : bool
user libirc
리턴 bool

IsKnown() 공개 메소드

public IsKnown ( string User, string Host ) : bool
User string
Host string
리턴 bool

IsRole() 공개 정적인 메소드

public static IsRole ( string name ) : bool
name string
리턴 bool

ListAll() 공개 메소드

List all users to a channel
public ListAll ( ) : string
리턴 string

Save() 공개 메소드

Save
public Save ( ) : bool
리턴 bool

Security() 공개 메소드

public Security ( Channel channel ) : System
channel Channel
리턴 System

프로퍼티 상세

Roles 공개적으로 정적으로 프로퍼티

public static Dictionary Roles
리턴 Role>.Dictionary

Users 공개적으로 프로퍼티

List of all users in a channel
public List Users
리턴 List