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

@@ -3251,7 +3251,10 @@ BUILT_IN_COMMAND(e_wall)
set_display_target(NULL, LOG_WALLOP);
send_to_server("%s :%s", command, args);
if (get_server_flag(from_server, USER_MODE_W))
/* Only show the message if we are _not_ +w, because if we are the server
* will echo our WALLOPS back to us. */
if (!get_server_umode(from_server, 'w'))
put_it("!! %s", args);
add_last_type(&last_sent_wall[0], 1, get_server_nickname(from_server), NULL, "*", args);
reset_display_target();