Replace get_server_flag() with get_server_umode()

This function gets the status of a single umode flag identified by umode char rather than
internal server flag number.

This also lets us remove all the USER_MODE* constants because they're no longer required.

Invert the sense of the +w check in e_wall() - we only echo our OPERWALL if we're *not* +w,
because if we are +w then the server will echo it back to us anyway.
This commit is contained in:
Kevin Easton
2017-12-07 00:23:43 +11:00
parent 1769c03951
commit 3800e4b099
7 changed files with 61 additions and 69 deletions

View File

@@ -532,7 +532,7 @@ extern Function_ptr *global;
#define get_server_motd (*(int (*)(int ))global[GET_SERVER_MOTD])
#define get_server_operator (*(int (*)(int ))global[GET_SERVER_OPERATOR])
#define get_server_version (*(int (*)(int ))global[GET_SERVER_VERSION])
#define get_server_flag (*(int (*)(int , int ))global[GET_SERVER_FLAG])
#define get_server_umode (*(int (*)(int , char))global[GET_SERVER_UMODE])
#define get_server_port (*(int (*)(int ))global[GET_SERVER_PORT])
#define get_server_lag (*(int (*)(int ))global[GET_SERVER_LAG])
#define get_server2_8 (*(int (*)(int ))global[GET_SERVER2_8])