1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-12-13 02:10:27 +00:00

Minor cosmetic change

Add a define to indicate any client.  While I'm here use hex values
instead of decimal, it's somewhat clearer that they could be OR'ed
together.
This commit is contained in:
Federico G. Schwindt 2013-09-05 10:40:39 +01:00
parent e5cdd61fe3
commit 9f74c0ff07
2 changed files with 22 additions and 21 deletions

View File

@ -17,19 +17,20 @@
* Client management (header)
*/
#define CLIENT_UNKNOWN 1 /* connection of unknown type */
#define CLIENT_GOTPASS 2 /* client did send PASS */
#define CLIENT_GOTNICK 4 /* client did send NICK */
#define CLIENT_GOTUSER 8 /* client did send USER */
#define CLIENT_USER 16 /* client is an IRC user */
#define CLIENT_SERVER 32 /* client is a server */
#define CLIENT_SERVICE 64 /* client is a service */
#define CLIENT_UNKNOWNSERVER 128 /* unregistered server connection */
#define CLIENT_GOTPASS_2813 256 /* client did send PASS, RFC 2813 style */
#define CLIENT_UNKNOWN 0x0001 /* connection of unknown type */
#define CLIENT_GOTPASS 0x0002 /* client did send PASS */
#define CLIENT_GOTNICK 0x0004 /* client did send NICK */
#define CLIENT_GOTUSER 0x0008 /* client did send USER */
#define CLIENT_USER 0x0010 /* client is an IRC user */
#define CLIENT_SERVER 0x0020 /* client is a server */
#define CLIENT_SERVICE 0x0040 /* client is a service */
#define CLIENT_UNKNOWNSERVER 0x0080 /* unregistered server connection */
#define CLIENT_GOTPASS_2813 0x0100 /* client did send PASS, RFC 2813 style */
#ifndef STRICT_RFC
# define CLIENT_WAITAUTHPING 512 /* waiting for AUTH PONG from client */
# define CLIENT_WAITAUTHPING 0x0200 /* waiting for AUTH PONG from client */
#endif
#define CLIENT_WAITCAPEND 1024 /* waiting for "CAP END" command */
#define CLIENT_WAITCAPEND 0x0400 /* waiting for "CAP END" command */
#define CLIENT_ANY 0xFFFF
#define CLIENT_TYPE int

View File

@ -62,11 +62,11 @@ static COMMAND My_Commands[] =
{
{ "ADMIN", IRC_ADMIN, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "AWAY", IRC_AWAY, CLIENT_USER, 0, 0, 0 },
{ "CAP", IRC_CAP, 0xFFFF, 0, 0, 0 },
{ "CAP", IRC_CAP, CLIENT_ANY, 0, 0, 0 },
{ "CONNECT", IRC_CONNECT, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "DIE", IRC_DIE, CLIENT_USER, 0, 0, 0 },
{ "DISCONNECT", IRC_DISCONNECT, CLIENT_USER, 0, 0, 0 },
{ "ERROR", IRC_ERROR, 0xFFFF, 0, 0, 0 },
{ "ERROR", IRC_ERROR, CLIENT_ANY, 0, 0, 0 },
{ "GLINE", IRC_xLINE, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "HELP", IRC_HELP, CLIENT_USER, 0, 0, 0 },
{ "INFO", IRC_INFO, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
@ -83,20 +83,20 @@ static COMMAND My_Commands[] =
{ "MODE", IRC_MODE, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "MOTD", IRC_MOTD, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "NAMES", IRC_NAMES, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "NICK", IRC_NICK, 0xFFFF, 0, 0, 0 },
{ "NICK", IRC_NICK, CLIENT_ANY, 0, 0, 0 },
{ "NJOIN", IRC_NJOIN, CLIENT_SERVER, 0, 0, 0 },
{ "NOTICE", IRC_NOTICE, 0xFFFF, 0, 0, 0 },
{ "NOTICE", IRC_NOTICE, CLIENT_ANY, 0, 0, 0 },
{ "OPER", IRC_OPER, CLIENT_USER, 0, 0, 0 },
{ "PART", IRC_PART, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "PASS", IRC_PASS, 0xFFFF, 0, 0, 0 },
{ "PASS", IRC_PASS, CLIENT_ANY, 0, 0, 0 },
{ "PING", IRC_PING, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "PONG", IRC_PONG, 0xFFFF, 0, 0, 0 },
{ "PONG", IRC_PONG, CLIENT_ANY, 0, 0, 0 },
{ "PRIVMSG", IRC_PRIVMSG, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "QUIT", IRC_QUIT, 0xFFFF, 0, 0, 0 },
{ "QUIT", IRC_QUIT, CLIENT_ANY, 0, 0, 0 },
{ "REHASH", IRC_REHASH, CLIENT_USER, 0, 0, 0 },
{ "RESTART", IRC_RESTART, CLIENT_USER, 0, 0, 0 },
{ "SERVER", IRC_SERVER, 0xFFFF, 0, 0, 0 },
{ "SERVICE", IRC_SERVICE, 0xFFFF, 0, 0, 0 },
{ "SERVER", IRC_SERVER, CLIENT_ANY, 0, 0, 0 },
{ "SERVICE", IRC_SERVICE, CLIENT_ANY, 0, 0, 0 },
{ "SERVLIST", IRC_SERVLIST, CLIENT_USER, 0, 0, 0 },
{ "SQUERY", IRC_SQUERY, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "SQUIT", IRC_SQUIT, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
@ -106,7 +106,7 @@ static COMMAND My_Commands[] =
{ "TIME", IRC_TIME, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "TOPIC", IRC_TOPIC, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "TRACE", IRC_TRACE, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "USER", IRC_USER, 0xFFFF, 0, 0, 0 },
{ "USER", IRC_USER, CLIENT_ANY, 0, 0, 0 },
{ "USERHOST", IRC_USERHOST, CLIENT_USER, 0, 0, 0 },
{ "USERS", IRC_USERS, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },
{ "VERSION", IRC_VERSION, CLIENT_USER|CLIENT_SERVER, 0, 0, 0 },