Bläddra i källkod

Merge pull request #113 from rathena/hotfix/1024

Removed script command 'getusersname' (bugreport:1024)
Akkarinage 10 år sedan
förälder
incheckning
90f127012a
2 ändrade filer med 2 tillägg och 42 borttagningar
  1. 2 12
      doc/script_commands.txt
  2. 0 30
      src/map/script.c

+ 2 - 12
doc/script_commands.txt

@@ -368,7 +368,7 @@ return 0 if the there is no player attached or the attached player no longer
 is logged on to the map-server).
 
 But what about GID?
---- ---- ----- ----
+-------------------
 
 GID stands for the Game ID of something, this can either be the GID obtained
 through mobspawn (mob control commands) or the account ID of a character.
@@ -643,7 +643,7 @@ the '$', normally denoting a string variable, before the square brackets that
 denotes an array index.
 
 Resume of the allowed variable and array scopes
------- -- --- ------- -------- --- ----- ------
+-----------------------------------------------
 
 +==========+======+=======+
 |VarType   | Norm | Array |
@@ -2996,16 +2996,6 @@ within the specified area - an x1/y1-x2/y2 square on the specified map.
 This is useful for maps that are split into many buildings, such as all the 
 "*_in" maps, due to all the shops and houses.
 
----------------------------------------
-
-*getusersname;
-
-This command will give the invoking character a list of names of the connected 
-characters (including themselves) into an NPC script message window (see 'mes') 
-paging it by 10 names as if with the 'next' command.
-
-You need to put a 'close' after that yourself.
-
 ---------------------------------------
 \\
 2,2.- Guild-related commands

+ 0 - 30
src/map/script.c

@@ -10220,35 +10220,6 @@ BUILDIN_FUNC(getusers)
 	return SCRIPT_CMD_SUCCESS;
 }
 
-/*==========================================
- * Works like @WHO - displays all online users names in window
- *------------------------------------------*/
-BUILDIN_FUNC(getusersname)
-{
-	TBL_PC *sd, *pl_sd;
-	int /*disp_num=1,*/ group_level = 0;
-	struct s_mapiterator* iter;
-
-	sd = script_rid2sd(st);
-	if (!sd) return 0;
-
-	group_level = pc_get_group_level(sd);
-	iter = mapit_getallusers();
-	for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
-	{
-		if (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > group_level)
-			continue; // skip hidden sessions
-
-		/* Temporary fix for bugreport:1023.
-		 * Do not uncomment unless you want thousands of 'next' buttons.
-		if((disp_num++)%10==0)
-			clif_scriptnext(sd,st->oid);*/
-		clif_scriptmes(sd,st->oid,pl_sd->status.name);
-	}
-	mapit_free(iter);
-	return SCRIPT_CMD_SUCCESS;
-}
-
 /*==========================================
  * getmapguildusers("mapname",guild ID) Returns the number guild members present on a map [Reddozen]
  *------------------------------------------*/
@@ -19451,7 +19422,6 @@ struct script_function buildin_func[] = {
 #endif
 	BUILDIN_DEF(preg_match,"ss?"),
 	BUILDIN_DEF(dispbottom,"s?"), //added from jA [Lupus]
-	BUILDIN_DEF(getusersname,""),
 	BUILDIN_DEF(recovery,"i???"),
 	BUILDIN_DEF(getpetinfo,"i"),
 	BUILDIN_DEF(gethominfo,"i"),