HasPrivilege(): check to make sure localClient and localClient.privset are non-NULL.

This commit is contained in:
William Pitcock 2008-08-17 08:52:04 -05:00
parent e2d7f73174
commit 4db97a8263
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ extern void cluster_generic(struct Client *, const char *, int cltype,
#define IsOperConfEncrypted(x) ((x)->flags & OPER_ENCRYPTED)
#define HasPrivilege(x, y) (privilegeset_in_set((x)->localClient->privset, (y)))
#define HasPrivilege(x, y) ((x)->localClient != NULL && (x)->localClient->privset != NULL && privilegeset_in_set((x)->localClient->privset, (y)))
#define IsOperGlobalKill(x) (HasPrivilege((x), "oper:global_kill"))
#define IsOperLocalKill(x) (HasPrivilege((x), "oper:local_kill"))