diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-20 16:02:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-20 16:02:17 +0300 |
commit | 5db78490d8bb2703752bd33747c1c7252bbbbc42 (patch) | |
tree | a9e9fb850aad94c0577058305b4d62159a4ddf3c /src/map/map.c | |
parent | 60097ba0d9a71ab575c89a3d0162bb4df1cdc0ff (diff) | |
download | evol-hercules-5db78490d8bb2703752bd33747c1c7252bbbbc42.tar.gz evol-hercules-5db78490d8bb2703752bd33747c1c7252bbbbc42.tar.bz2 evol-hercules-5db78490d8bb2703752bd33747c1c7252bbbbc42.tar.xz evol-hercules-5db78490d8bb2703752bd33747c1c7252bbbbc42.zip |
Add show_client_version permission.
Use show_client_version permission in online list.
Diffstat (limited to 'src/map/map.c')
-rw-r--r-- | src/map/map.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); |