summaryrefslogtreecommitdiff
path: root/src/emap/console.c
blob: 687da46993f23bfadaecd0a9580b5030c4e309e5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// Copyright (c) 2014 - 2015 Evol developers

#include "common/hercules.h"

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "common/HPMi.h"
#include "common/memmgr.h"
#include "common/socket.h"
#include "map/map.h"
#include "map/npc.h"
#include "map/pc.h"
#include "map/script.h"

#include "emap/console.h"
#include "emap/inter.h"

CPCMD(serverExit)
{
    int code = 0;
    if (!line || !*line || sscanf(line, "%5d", &code) < 1)
    {
        ShowError("Wrong parameter\n");
        return;
    }

    send_char_exit(code);

    map->retval = code;
    map->do_shutdown();
}

CPCMD(C_doevent)
{
	struct map_session_data* sd;
	sd = pc->get_dummy_sd();

	//script->check_event(st, line); // Dangerous but not needed
	npc->event(sd, line, 0);
	return;
}