diff options
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 1e6f76516..0fd9a0d7f 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -295,6 +295,7 @@ ACMD_FUNC(clone); // [Valaris] ACMD_FUNC(tonpc); // LuzZza
ACMD_FUNC(commands); // [Skotlex]
ACMD_FUNC(noask); //LuzZza
+ACMD_FUNC(request); //LuzZza
/*==========================================
*AtCommandInfo atcommand_info[]構造体の定義
@@ -611,6 +612,7 @@ static AtCommandInfo atcommand_info[] = { { AtCommand_ToNPC, "@tonpc", 40, atcommand_tonpc }, // LuzZza
{ AtCommand_Commands, "@commands", 1, atcommand_commands }, // [Skotlex]
{ AtCommand_NoAsk, "@noask", 1, atcommand_noask }, // [LuzZza]
+ { AtCommand_Request, "@request", 20, atcommand_request }, // [LuzZza]
// add new commands before this line
{ AtCommand_Unknown, NULL, 1, NULL }
@@ -10273,6 +10275,27 @@ int atcommand_noask( return 0;
}
+/*=====================================
+ * Send a @request message to all GMs of lowest_gm_level.
+ * Usage: @request <petition>
+ *-------------------------------------
+ */
+int atcommand_request(
+ const int fd, struct map_session_data* sd,
+ const char* command, const char* message)
+{
+ if (!message || !*message) {
+ clif_displaymessage(sd->fd,msg_txt(275));
+ return -1;
+ }
+
+ sprintf(atcmd_output, msg_txt(276), message);
+ intif_wis_message_to_gm(sd->status.name, lowest_gm_level, atcmd_output);
+ clif_disp_onlyself(sd, atcmd_output, strlen(atcmd_output));
+ clif_displaymessage(sd->fd,msg_txt(277));
+ return 0;
+}
+
void do_init_atcommand() {
users_db = db_alloc(__FILE__,__LINE__,DB_UINT,DB_OPT_BASE,sizeof(int));
duel_count = 0;
|