Jump to content
  • 0

Hide active GM session


Mumbles

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

I'd like to request an eAthena source modification regarding online GM sessions. This was previously asked and partially answered back on the old eAthena boards; the difference this time is that I'd like for GMs of a certain level (i.e., developers) to be hidden from @who, even when they are not @hide.

What I think would work would be an adjustment to the script that backs hide_GM_session, so that instead of a yes/no option that completely hides all GMs online, allow a number value to be set that defines the minimum level of the GMs being hidden; in rAthena, this could be changed to hide a GM group or an array of groups.

Notice: I apologize to those of you who are displeased with requests for eAthena support on the rAthena forum. However, I find that rAthena's boards thrive in activity with the many of you who provide constructive input and working solutions. Thank you all for the help you've given and continue giving. It's amazing seeing what's been accomplished over the last few years.

  • Upvote 1
Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   219
  • Joined:  11/22/11
  • Last Seen:  

so what you mean is player can't see GM and can't use @who to find them?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

atcommand.c inside ACMD_FUNC(who){... }


   for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
   {
       pl_GM_level = pc_isGM(pl_sd);
+      if ( pl_GM_level == ? ) continue;
       if(!( (battle_config.hide_GM_session || (pl_sd->sc.option & OPTION_INVISIBLE)) && pl_GM_level > GM_level ))
       {// you can look only lower or same level

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

so what you mean is player can't see GM and can't use @who to find them?

No, what I'm requesting is that an adjustment be made to hide_GM_session so that you can set a minimum level (in eAthena) or group (in rAthena) to be hidden from @who without the GM being required to use @hide. The way it currently works, you can choose yes or no (1 or 0) as values; if you chose yes, hide_GM_session would hide all online GMs. What I'm aiming for is the ability to define the levels/groups hidden. For example, if hide_GM_session was set to 90, all GMs of that command level and higher will be hidden from @who display, regardless of whether or not they use @hide; in rAthena, this would be so that a specific GM group (or groups) would be hidden from @who display. I actually wanna take a look at this myself and see if I can come up with something, but I figured it'd be sensible to ask help from people with more experience than me lol.

atcommand.c inside ACMD_FUNC(who){... }


for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
	pl_GM_level = pc_isGM(pl_sd);
+	  if ( pl_GM_level == ? ) continue;
	if(!( (battle_config.hide_GM_session || (pl_sd->sc.option & OPTION_INVISIBLE)) && pl_GM_level > GM_level ))
	{// you can look only lower or same level

Someone please correct me if I'm wrong, but this did not work. Did you test this before you posted it?

	if ( pl_GM_level == ? ) continue;

I'm guessing this ? is supposed to be replaced with a number input directly into the source; however, wouldn't it be more convenient to

  • add a check for what was defined for hide_GM_session
  • check if the value defined for hide_GM_session => the GM levels of the players being parsed
    • if this is true, continue to hide the online status

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  587
  • Reputation:   104
  • Joined:  11/19/11
  • Last Seen:  

eathena doesn't have haspermissions-system

you can create an new battle conf for setting or use player var for checking

player was gm and has variable hide_GM_session >0 won't be shown in who list


for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
	pl_GM_level = pc_isGM(pl_sd);
+	if(pl_GM_level >0 ){
+		if( pc_readglobalreg(pl_sd,"hide_GM_session")>0 ) continue;
+	}
	if(!( (battle_config.hide_GM_session || (pl_sd->sc.option & OPTION_INVISIBLE)) && pl_GM_level > GM_level ))
	{// you can look only lower or same level

Edited by QQfoolsorellina
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

atcommand.c, inside who3, who2, and who there are these lines

iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
pl_GM_level = pc_isGM(pl_sd);
-if(!( (battle_config.hide_GM_session || (pl_sd->sc.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level) ))
+if(!( ((battle_config.hide_GM_session && pl_GM_level > 40) || (pl_sd->sc.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level) ))
{// you can look only lower or same level

pl_GM_level > 40 can be change with battle_config.hide_GM_sessionLv.

battle.h

int bg_misc_damage_rate;
int bg_flee_penalty;
+int hide_GM_sessionLv;
} battle_config;

void do_init_battle(void);

battle.c

{ "bg_misc_attack_damage_rate",		 &battle_config.bg_misc_damage_rate,			 60,	 0,	  INT_MAX,		},
{ "bg_flee_penalty",					&battle_config.bg_flee_penalty,				 20,	 0,	  INT_MAX,		},
+{ "hide_GM_sessionLv",					&battle_config.hide_GM_sessionLv,				 10,	 0,	  100,		},
};


int battle_set_value(const char* w1, const char* w2)

Edited by cydh
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

atcommand.c, inside who3, who2, and who there are these lines

iter = mapit_getallusers();
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) )
{
pl_GM_level = pc_isGM(pl_sd);
-if(!( (battle_config.hide_GM_session || (pl_sd->sc.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level) ))
+if(!( ((battle_config.hide_GM_session && pl_GM_level > 40) || (pl_sd->sc.option & OPTION_INVISIBLE)) && (pl_GM_level > GM_level) ))
{// you can look only lower or same level

pl_GM_level > 40 can be change with battle_config.hide_GM_sessionLv.

battle.h

int bg_misc_damage_rate;
int bg_flee_penalty;
+int hide_GM_sessionLv;
} battle_config;

void do_init_battle(void);

battle.c

{ "bg_misc_attack_damage_rate",		 &battle_config.bg_misc_damage_rate,			 60,	 0,	  INT_MAX,		},
{ "bg_flee_penalty",					&battle_config.bg_flee_penalty,				 20,	 0,	  INT_MAX,		},
+{ "hide_GM_sessionLv",					&battle_config.hide_GM_sessionLv,				 10,	 0,	  100,		},
};


int battle_set_value(const char* w1, const char* w2)

Although this returned no errors, it did not function as expected; players are still able to see a GM online who is not @hide, even when I defined hide_GM_sessionLv in gm.conf. I feel like the answer is right around the corner, though. Thanks for your efforts so far guys.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

my bad, I think the simple is

if(!(battle_config.hide_GM_session && pl_sd->sc.option&OPTION_INVISIBLE && pl_GM_level>GM_level))

and this with min GM lv

if((!battle_config.hide_GM_session || (battle_config.hide_GM_session && pl_GM_level < battle_config.hide_GM_sessionLv)) || !pl_sd->sc.option&OPTION_INVISIBLE || pl_GM_level<GM_level)

It should be, just show players as @who/2/3 results:

  • if hide_GM_session if no
  • if hide_GM_session is yes but the GM Level below hide_GM_sessionLv
  • if GM is not hide
  • if GM Level below the user GM level

Edited by cydh
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...