summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/init.c1
-rw-r--r--src/map/map.c9
-rw-r--r--src/map/permission.c3
-rw-r--r--src/map/permission.h1
4 files changed, 10 insertions, 4 deletions
diff --git a/src/map/init.c b/src/map/init.c
index 78bd14d..48992ff 100644
--- a/src/map/init.c
+++ b/src/map/init.c
@@ -200,6 +200,7 @@ HPExport void server_preinit (void)
addHookPre("quest->read_db_sub", equest_read_db_sub);
addGroupPermission("send_gm_flag", permission_send_gm_flag);
+ addGroupPermission("show_client_version", permission_show_client_version_flag);
}
HPExport void server_online (void)
diff --git a/src/map/map.c b/src/map/map.c
index 1d18499..ec7483b 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -55,7 +55,6 @@ void emap_online_list(int fd)
char *ptr = buf;
struct map_session_data* sd;
-
struct SessionExt *data1 = session_get(fd);
const time_t t = time(NULL);
if (data1->onlinelistlasttime + 15 >= t)
@@ -64,6 +63,8 @@ void emap_online_list(int fd)
return;
}
+ struct map_session_data* ssd = (struct map_session_data*)session[fd]->session_data;
+ const bool showVersion = pc_has_permission(ssd, permission_show_client_version_flag);
data1->onlinelistlasttime = t;
DBIterator* iter = db_iterator(map->pc_db);
@@ -96,8 +97,10 @@ void emap_online_list(int fd)
*ptr = sd->status.base_level;
ptr ++;
- // need permissions what allow show version. now show always
- *ptr = data->clientVersion;
+ if (showVersion)
+ *ptr = data->clientVersion;
+ else
+ *ptr = 0;
ptr ++;
strcpy(ptr, sd->status.name);
diff --git a/src/map/permission.c b/src/map/permission.c
index 83928de..03026d0 100644
--- a/src/map/permission.c
+++ b/src/map/permission.c
@@ -14,4 +14,5 @@
#include "../../../map/npc.h"
#include "../../../map/status.h"
-unsigned int permission_send_gm_flag = UINT_MAX - 1; \ No newline at end of file
+unsigned int permission_send_gm_flag = UINT_MAX - 1;
+unsigned int permission_show_client_version_flag = UINT_MAX - 2;
diff --git a/src/map/permission.h b/src/map/permission.h
index 8cbdebb..a585c98 100644
--- a/src/map/permission.h
+++ b/src/map/permission.h
@@ -5,5 +5,6 @@
#define EVOL_MAP_PERMISSION
extern unsigned int permission_send_gm_flag;
+extern unsigned int permission_show_client_version_flag;
#endif // EVOL_MAP_PERMISSION