Fixed @version issue
Signed-off-by: Cahyadi Ramadhan Togihon <house.bad@gmail.com>
This commit is contained in:
parent
8ad5d4f7c4
commit
e0397a6e34
@ -1,2 +1,2 @@
|
||||
// Internal default is limited to 128 lines. If you need more, you will need to modify the MOTD_LINE_SIZE definition in pc.c
|
||||
Welcome to rAthena SVN! Enjoy! Please report any bugs you find.
|
||||
Welcome to rAthena! Enjoy! Please report any bugs you find.
|
||||
|
@ -1229,8 +1229,8 @@
|
||||
1294: They are family... wish them luck.
|
||||
|
||||
// @version
|
||||
1295: rAthena Version SVN r%s
|
||||
1296: Cannot determine SVN revision.
|
||||
1295: rAthena Version %s %s
|
||||
1296: Cannot determine SVN/Git version.
|
||||
|
||||
// @mutearea
|
||||
1297: Please enter a time in minutes (usage: @mutearea/@stfu <time in minutes>).
|
||||
|
@ -1228,8 +1228,8 @@
|
||||
1294: Sekarang mereka adalah satu keluarga... Selamat!!
|
||||
|
||||
// @version
|
||||
1295: Versi SVN rAthena r%s
|
||||
1296: Tidak dapat mendapatkan revisi SVN.
|
||||
1295: Versi rAthena %s %s
|
||||
1296: Tidak dapat mendapatkan versi saat ini.
|
||||
|
||||
// @mutearea
|
||||
1297: Harap masukkan waktu dalam menit. (Penggunaan: @mutearea/@stfu <waktu dalam menit>).
|
||||
|
@ -7498,14 +7498,7 @@ ACMD_FUNC(whereis)
|
||||
|
||||
ACMD_FUNC(version)
|
||||
{
|
||||
const char * revision;
|
||||
|
||||
if ((revision = get_svn_revision()) != 0) {
|
||||
sprintf(atcmd_output,msg_txt(sd,1295),revision); // rAthena Version SVN r%s
|
||||
clif_displaymessage(fd,atcmd_output);
|
||||
} else
|
||||
clif_displaymessage(fd,msg_txt(sd,1296)); // Cannot determine SVN revision.
|
||||
|
||||
pc_show_version(sd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
29
src/map/pc.c
29
src/map/pc.c
@ -1113,19 +1113,8 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
|
||||
|
||||
if( !changing_mapservers ) {
|
||||
|
||||
if (battle_config.display_version == 1) {
|
||||
const char* svn = get_svn_revision();
|
||||
const char* git = get_git_hash();
|
||||
char buf[256];
|
||||
|
||||
if( svn[0] != UNKNOWN_VERSION )
|
||||
sprintf(buf,"SVN Revision: %s", svn);
|
||||
else if( git[0] != UNKNOWN_VERSION )
|
||||
sprintf(buf,"Git Hash: %s", git);
|
||||
else
|
||||
sprintf(buf,"Unknown Version");
|
||||
clif_displaymessage(sd->fd, buf);
|
||||
}
|
||||
if (battle_config.display_version == 1)
|
||||
pc_show_version(sd);
|
||||
|
||||
// Message of the Day [Valaris]
|
||||
for(i=0; motd_text[i][0] && i < MOTD_LINE_SIZE; i++) {
|
||||
@ -10347,6 +10336,20 @@ void pc_crimson_marker_clear(struct map_session_data *sd) {
|
||||
}
|
||||
}
|
||||
|
||||
void pc_show_version(struct map_session_data *sd) {
|
||||
const char* svn = get_svn_revision();
|
||||
const char* git = get_git_hash();
|
||||
char buf[CHAT_SIZE_MAX];
|
||||
|
||||
if( svn[0] != UNKNOWN_VERSION )
|
||||
sprintf(buf,msg_txt(sd,1295),"SVN: r",svn); //rAthena Version SVN: r%s
|
||||
else if( git[0] != UNKNOWN_VERSION )
|
||||
sprintf(buf,msg_txt(sd,1295),"Git Hash: ",git); //rAthena Version Git Hash: %s
|
||||
else
|
||||
sprintf(buf,msg_txt(sd,1296)); //Cannot determine SVN/Git version.
|
||||
clif_displaymessage(sd->fd,buf);
|
||||
}
|
||||
|
||||
/*==========================================
|
||||
* pc Init/Terminate
|
||||
*------------------------------------------*/
|
||||
|
@ -1023,6 +1023,8 @@ enum e_BANKING_WITHDRAW_ACK pc_bank_withdraw(struct map_session_data *sd, int mo
|
||||
|
||||
void pc_crimson_marker_clear(struct map_session_data *sd);
|
||||
|
||||
void pc_show_version(struct map_session_data *sd);
|
||||
|
||||
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
|
||||
int pc_level_penalty_mod(struct map_session_data *sd, int mob_level, uint32 mob_race, uint32 mob_mode, int type);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user