Use macros instead of raw numbers for login type

This commit is contained in:
Berke Viktor
2013-05-13 13:22:25 +02:00
parent 2c15270be1
commit 83107ee222
5 changed files with 50 additions and 34 deletions

View File

@@ -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)
switch (serv->loginmethod)
{
return 1;
}
else
{
return 0;
case LOGIN_MSG_NICKSERV:
case LOGIN_NICKSERV:
case LOGIN_NS:
case LOGIN_MSG_NS:
case LOGIN_AUTH:
return 1;
default:
return 0;
}
}