summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorLuzZza <LuzZza@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-29 15:54:20 +0000
committerLuzZza <LuzZza@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-29 15:54:20 +0000
commitfec9362ba4a1cd1b173463b72b58d94bf1d51c79 (patch)
treea2448d4799c3aa2c5908c62cbb8b829eb299b740 /src/map/atcommand.c
parenteba33e17bf19e9e0dfedc387546bd33cfd82daae (diff)
downloadhercules-fec9362ba4a1cd1b173463b72b58d94bf1d51c79.tar.gz
hercules-fec9362ba4a1cd1b173463b72b58d94bf1d51c79.tar.bz2
hercules-fec9362ba4a1cd1b173463b72b58d94bf1d51c79.tar.xz
hercules-fec9362ba4a1cd1b173463b72b58d94bf1d51c79.zip
Added @noask command: enable/disable deals/invites autorejecting.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6376 54d463be-8e91-2dee-dedb-b68131a5f0ec
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;