added remove function for permissions.
This commit is contained in:
		@@ -74,6 +74,17 @@ func (p *Permissions) Add(perms ...string) *Permissions {
 | 
				
			|||||||
	return p
 | 
						return p
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Remove permission(s).
 | 
				
			||||||
 | 
					func (p *Permissions) Remove(perms ...string) *Permissions {
 | 
				
			||||||
 | 
						for _, perm := range perms {
 | 
				
			||||||
 | 
							if value, ok := p.Permissions[perm]; ok {
 | 
				
			||||||
 | 
								p.Bitvise = p.Bitvise - value
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return p
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Calculate perms and return unsigned int.
 | 
					// Calculate perms and return unsigned int.
 | 
				
			||||||
func (p Permissions) Calculate(perms ...string) uint {
 | 
					func (p Permissions) Calculate(perms ...string) uint {
 | 
				
			||||||
	var total uint
 | 
						var total uint
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user