diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-08-07 13:23:58 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-08-07 13:23:58 -0300 |
commit | a22e3af8232b2e72e2c610339b3fd4fc9a0693e9 (patch) | |
tree | d4918b73873569ae8f265e7815d0a2a6b1f1f64a /src/emap/script_buildins.c | |
parent | 0902765036bc3fe663317043435b73aabe39677a (diff) | |
download | evol-hercules-a22e3af8232b2e72e2c610339b3fd4fc9a0693e9.tar.gz evol-hercules-a22e3af8232b2e72e2c610339b3fd4fc9a0693e9.tar.bz2 evol-hercules-a22e3af8232b2e72e2c610339b3fd4fc9a0693e9.tar.xz evol-hercules-a22e3af8232b2e72e2c610339b3fd4fc9a0693e9.zip |
Revert "add a script command to kick players offline"
This reverts commit 0902765036bc3fe663317043435b73aabe39677a.
Diffstat (limited to 'src/emap/script_buildins.c')
-rw-r--r-- | src/emap/script_buildins.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/emap/script_buildins.c b/src/emap/script_buildins.c index 4c2ea93..da9ccf2 100644 --- a/src/emap/script_buildins.c +++ b/src/emap/script_buildins.c @@ -2515,40 +2515,6 @@ BUILDIN(readBattleParam) return true; } -BUILDIN(kick) -{ - struct map_session_data *tsd = NULL; - - if (script_isstringtype(st, 2)) { - tsd = map->nick2sd(script_getstr(st, 2), false); - } else { - tsd = map->id2sd(script_getnum(st, 2)); - } - - if (tsd == NULL) { - // silently fail - script_pushint(st, 0); - return true; - } - - // clif_authfail_fd reason - // see https://github.com/ManaPlus/ManaPlus/blob/master/src/net/eathena/generalrecv.cpp#L48 - int reason = 15; // default: 15 - disconnection forced by a GM - - if (script_hasdata(st, 3)) { - reason = script_getnum(st, 3); - } - - if (tsd->fd > 0) { - clif->authfail_fd(tsd->fd, reason); - } else { - map->quit(tsd); - } - - script_pushint(st, 1); - return true; -} - /////////////////////////////////////////////////////////////////////////////// // TMW2 Custom Commands |