diff options
author | Berke Viktor <bviktor@hexchat.org> | 2013-05-13 13:22:25 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2013-05-13 13:22:25 +0200 |
commit | 83107ee222a9b660bb73595dd321ffd724864876 (patch) | |
tree | 98cfff194796f1f3e81f106f216391a7755a9359 /src/common/inbound.c | |
parent | 2c15270be1cdb3c5034373a4d47eae3b11e19688 (diff) |
Use macros instead of raw numbers for login type
Diffstat (limited to 'src/common/inbound.c')
-rw-r--r-- | src/common/inbound.c | 17 |
1 files changed, 10 insertions, 7 deletions
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; } } |