diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-04-18 17:48:39 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-04-18 17:48:39 -0300 |
commit | 72b919758f400ea6fb5d62a7073a379cd4730cfe (patch) | |
tree | 247655e9078ebcc3a2b1bf0bd148b4513a7af0a5 /world/map/npc | |
parent | 6609ed3a7aec3f32bda2df73e650611541452681 (diff) | |
download | serverdata-72b919758f400ea6fb5d62a7073a379cd4730cfe.tar.gz serverdata-72b919758f400ea6fb5d62a7073a379cd4730cfe.tar.bz2 serverdata-72b919758f400ea6fb5d62a7073a379cd4730cfe.tar.xz serverdata-72b919758f400ea6fb5d62a7073a379cd4730cfe.zip |
Fix privilege escalation bug at @puppeter
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/functions/gm_island.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/world/map/npc/functions/gm_island.txt b/world/map/npc/functions/gm_island.txt index 900e0222..e2763bbf 100644 --- a/world/map/npc/functions/gm_island.txt +++ b/world/map/npc/functions/gm_island.txt @@ -15,6 +15,7 @@ OnInit: close; OnSpawn: + if (GM < G_SYSOP) goto L_GM; callfunc "argv_splitter"; if (@argv$[4] == "") goto L_Failed; set $@PMAP$, @argv$[0]; @@ -22,8 +23,8 @@ OnSpawn: set $@PY, @argv$[2]; set $@PNAME$, @argv$[3]; set $@PNPC, @argv$[4]; - debugmes "Map "+$@PMAP$+" ID "+$@PNPC; - if (puppet($@PMAP$, $@PX, $@PY, $@PNAME$, $@PNPC) < 1) debugmes "Error"; + if (puppet($@PMAP$, $@PX, $@PY, $@PNAME$, $@PNPC) > 0) + gmlog "@puppeter " + @args$; set $@PMAP$, ""; set $@PX, 0; set $@PY, 0; @@ -35,6 +36,10 @@ L_Failed: message strcharinfo(0), "Syntax: @puppeter MAP X Y NAME NPCID"; end; +L_GM: + message strcharinfo(0), "puppeter : GM command is level "+ G_SYSOP +", but you are level " + GM; + end; + OnInit: registercmd chr(ATCMD_SYMBOL) + "puppeter", strnpcinfo(0)+"::OnSpawn"; end; |