Switch /VER command to use ctcp_simple()

This commit is contained in:
Kevin Easton
2017-04-11 01:24:36 +10:00
parent bad8c2fa02
commit 170b79c0d0
2 changed files with 1 additions and 25 deletions

View File

@@ -106,7 +106,6 @@ extern void dcc_crash (char *, char *, char *, char *);
extern void do_msay (char *, char *, char *, char *); extern void do_msay (char *, char *, char *, char *);
extern void send_mode (char *, char *, char *, char *); extern void send_mode (char *, char *, char *, char *);
extern void do_offers (char *, char *, char *, char *); extern void do_offers (char *, char *, char *, char *);
extern void ctcp_version (char *, char *, char *, char *);
extern void about (char *, char *, char *, char *); extern void about (char *, char *, char *, char *);
extern void dcc_stat_comm (char *, char *, char *, char *); extern void dcc_stat_comm (char *, char *, char *, char *);
extern void sping (char *, char *, char *, char *); extern void sping (char *, char *, char *, char *);

View File

@@ -697,7 +697,7 @@ IrcCommand irc_command[] =
#endif #endif
{ "USLEEP", NULL, usleepcmd, 0, NULL }, { "USLEEP", NULL, usleepcmd, 0, NULL },
{ "USRIP", "USRIP", usripcmd, 0, NULL }, { "USRIP", "USRIP", usripcmd, 0, NULL },
{ "VER", "Version", ctcp_version, 0, NULL }, { "VER", "VERSION", ctcp_simple, 0, "%Y<%Cnick%Y>%n\n- Sends a CTCP VERSION query to %Y<%Cnick%Y>%n" },
{ "VERSION", "VERSION", version1, 0, NULL }, { "VERSION", "VERSION", version1, 0, NULL },
{ "VOICE", "v", doop, 0, NULL }, { "VOICE", "v", doop, 0, NULL },
{ "W", "W", whocmd, 0, NULL }, { "W", "W", whocmd, 0, NULL },
@@ -1749,29 +1749,6 @@ BUILT_IN_COMMAND(ctcp_simple)
} }
} }
BUILT_IN_COMMAND(ctcp_version)
{
char *person;
int type = 0;
if ((person = next_arg(args, &args)) == NULL || !strcmp(person, "*"))
{
if ((person = get_current_channel_by_refnum(0)) == NULL)
if (!(person = get_target_by_refnum(0)))
person = zero;
}
if ((type = in_ctcp()) == -1)
echocmd(NULL, "*** You may not use the CTCP command in an ON CTCP_REPLY!", empty_string, NULL);
else
{
send_ctcp(type, person, CTCP_VERSION, NULL);
put_it("%s", convert_output_format(fget_string_var(FORMAT_SEND_CTCP_FSET),
"%s %s %s",update_clock(GET_TIME), person, "VERSION"));
add_last_type(&last_sent_ctcp[0], 1, NULL, NULL, person, "VERSION");
}
}
BUILT_IN_COMMAND(do_offers) BUILT_IN_COMMAND(do_offers)
{ {
char *person; char *person;