Documentation updates:
global: Modified the unicode in |stub| to be compatible with sphinx. Still appears as a wrench in the browser. events: added information for events, and a list of events, as well as their arg paramater. Still marked as 'WIP', as I feel my documentation was a bit lacking permissions: added information for channel\server permissions, dual channel permissions, and roles. need to update with bits at some point.
This commit is contained in:
28
docs/samples/permissions.cs
Normal file
28
docs/samples/permissions.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
// Finding User Permissions
|
||||
|
||||
void FindPermissions(User u, Channel c)
|
||||
{
|
||||
ChannelPermissions cperms = u.GetPermissions(c);
|
||||
ServerPermissions sperms = u.GetServerPermissions();
|
||||
}
|
||||
|
||||
void SetPermissionsChannelPerms(User u, Channel c)
|
||||
{
|
||||
ChannelPermissions allow = new ChannelPermissions();
|
||||
ChannelPermissions deny = new ChannelPermissions();
|
||||
|
||||
allow.Connect = true;
|
||||
deny.AttachFiles = true;
|
||||
|
||||
client.SetChannelPermissions(c, u, allow, deny)
|
||||
}
|
||||
|
||||
void SetPermissionsDualPerms(User u, Channel c)
|
||||
{
|
||||
DualChannelPermissions dual = new DualChannelPermissions();
|
||||
dual.ReadMessageHistory = false;
|
||||
dual.Connect = true;
|
||||
dual.AttachFiles = null;
|
||||
|
||||
client.SetChannelPermissions(c, u, dual);
|
||||
}
|
||||
Reference in New Issue
Block a user