summaryrefslogtreecommitdiff
path: root/src/map/map.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-02-20 16:02:17 +0300
committerAndrei Karas <akaras@inbox.ru>2015-02-20 16:02:17 +0300
commit5db78490d8bb2703752bd33747c1c7252bbbbc42 (patch)
treea9e9fb850aad94c0577058305b4d62159a4ddf3c /src/map/map.c
parent60097ba0d9a71ab575c89a3d0162bb4df1cdc0ff (diff)
downloadevol-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.c9
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);