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:
Kevin Easton
2015-06-28 00:35:50 +10:00
parent ff251080da
commit 498631e74a
5 changed files with 51 additions and 30 deletions

View File

@@ -102,7 +102,8 @@ ChannelList * BX_prepare_command (int *, char *, int);
int are_you_opped (char *);
void error_not_opped (const char *);
char *get_reason(const char *nick, const char *file);
char *get_reason(const char *target, const char *nick, const char *file);
char *get_kick_reason(const char *target, const char *nick);
char *get_kill_reason(const char *target, const char *nick);
char *get_realname(const char *nick);
char *get_signoffreason(const char *nick);