From 83107ee222a9b660bb73595dd321ffd724864876 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Mon, 13 May 2013 13:22:25 +0200 Subject: Use macros instead of raw numbers for login type --- src/common/inbound.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/common/inbound.c') diff --git a/src/common/inbound.c b/src/common/inbound.c index 926a34ba..f16c7b53 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -1373,13 +1373,16 @@ static int inbound_nickserv_login (server *serv) { /* this could grow ugly, but let's hope there won't be new NickServ types */ - if (serv->loginmethod >= 1 && serv->loginmethod <= 5) - { - return 1; - } - else - { - return 0; + switch (serv->loginmethod) + { + case LOGIN_MSG_NICKSERV: + case LOGIN_NICKSERV: + case LOGIN_NS: + case LOGIN_MSG_NS: + case LOGIN_AUTH: + return 1; + default: + return 0; } } -- cgit 1.4.1