Introduce get_kick_reason() and switch all kick commands to use it
get_reason() is then used only for the implementation of get_kick_reason() and for the $getreason() scripting function. Add current nick as an explicit argument for get_reason(), which pushes all use of from_server out of the ransom reason functions. Also switch a few instances of send_to_server() to my_send_to_server() where the current server has been returned by prepare_command().
This commit is contained in:
@@ -5081,9 +5081,9 @@ char *blah;
|
||||
|
||||
BUILT_IN_FUNCTION(function_getreason, word)
|
||||
{
|
||||
char *nick = NULL;
|
||||
char *nick = NULL;
|
||||
GET_STR_ARG(nick, word);
|
||||
RETURN_STR(get_reason(nick, word));
|
||||
RETURN_STR(get_reason(nick, get_server_nickname(from_server), word));
|
||||
}
|
||||
|
||||
BUILT_IN_FUNCTION(function_chmod, words)
|
||||
|
||||
Reference in New Issue
Block a user