From 47279108e413b2bf0fa953a83d7e6facb5d1ff42 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sat, 25 Sep 2021 11:02:39 +0200 Subject: [PATCH] Use get_operclass() in extbans/operclass as well. --- src/modules/extbans/operclass.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/modules/extbans/operclass.c b/src/modules/extbans/operclass.c index 6bdfbf1d6..5b6bc2a51 100644 --- a/src/modules/extbans/operclass.c +++ b/src/modules/extbans/operclass.c @@ -92,11 +92,7 @@ int extban_operclass_is_banned(BanContext *b) { if (MyUser(b->client) && IsOper(b->client)) { - char *operclass = NULL; - ConfigItem_oper *oper = find_oper(b->client->user->operlogin); - if (oper && oper->operclass) - operclass = oper->operclass; - + const char *operclass = get_operclass(b->client); if (operclass && match_simple(b->banstr, operclass)) return 1; }