summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 686d03c87..d15b04937 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -294,6 +294,7 @@ ACMD_FUNC(main); // LuzZza
ACMD_FUNC(clone); // [Valaris]
ACMD_FUNC(tonpc); // LuzZza
ACMD_FUNC(commands); // [Skotlex]
+ACMD_FUNC(noask); //LuzZza
/*==========================================
*AtCommandInfo atcommand_info[]構造体の定義
@@ -609,6 +610,7 @@ static AtCommandInfo atcommand_info[] = {
{ AtCommand_Clone, "@evilclone", 50, atcommand_clone }, // [Valaris]
{ AtCommand_ToNPC, "@tonpc", 40, atcommand_tonpc }, // LuzZza
{ AtCommand_Commands, "@commands", 1, atcommand_commands }, // [Skotlex]
+ { AtCommand_NoAsk, "@noask", 1, atcommand_noask }, // [LuzZza]
// add new commands before this line
{ AtCommand_Unknown, NULL, 1, NULL }
@@ -10191,6 +10193,27 @@ int atcommand_main(
return 0;
}
+/*=====================================
+ * Autorejecting Invites/Deals [LuzZza]
+ * Usage: @noask
+ *-------------------------------------
+ */
+int atcommand_noask(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+
+ if(sd->state.noask) {
+ clif_displaymessage(fd, msg_txt(391)); // Autorejecting is deactivated.
+ sd->state.noask = 0;
+ } else {
+ clif_displaymessage(fd, msg_txt(390)); // Autorejecting is activated.
+ sd->state.noask = 1;
+ }
+
+ return 0;
+}
+
void do_init_atcommand() {
users_db = db_alloc(__FILE__,__LINE__,DB_UINT,DB_OPT_BASE,sizeof(int));
duel_count = 0;