Jump to content
  • 0

@maintenance command


Jamy

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  02/14/12
  • Last Seen:  

Hello I was wondering how to create a command that causes the server to enter for maintenance when typing the command giving en kick all players and not letting them connect until the command is enabledagain.

Link to comment
Share on other sites

Recommended Posts


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  11/19/11
  • Last Seen:  

Hi, I have a question is this @maintenance command works in 3ceam? thanks!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

Hmm how do you make it GM's with group_id ranges from 80 above not get kicked can still enter Server during maintenance?

tried editing this line:

if( runflag != CHARSERVER_ST_RUNNING && (runflag != CHARSERVER_ST_MAINTENANCE || group_id != 99) )

to group_id >= 99) )

also this one

if (atoi(data) != 99) {

to if (atoi(data) >= 80) {

still kicks GM level 80

doesnt seem to work.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  75
  • Topics Per Day:  0.02
  • Content Count:  2223
  • Reputation:   593
  • Joined:  10/26/11
  • Last Seen:  

There is a config in ../conf/login_athena.conf

// Required account group id to connect to server.
// -1: disabled
// 0 or more: group id
group_id_to_connect: -1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

There is a config in ../conf/login_athena.conf

// Required account group id to connect to server.
// -1: disabled
// 0 or more: group id
group_id_to_connect: -1

@Brian how do you configure it? group_id_to_connect: 80?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  152
  • Reputation:   4
  • Joined:  11/25/11
  • Last Seen:  

I got an error, I tried patching this to rAthena trunk sql revision 15832. Below is the picture of my error, any clue?

jbnhCxwy39X8P2.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  94
  • Topics Per Day:  0.02
  • Content Count:  2192
  • Reputation:   252
  • Joined:  11/11/11
  • Last Seen:  

When it comes to those errors, I manually patch my source manually without using a patcher like TortoiseSVN for instance.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  67
  • Reputation:   23
  • Joined:  11/14/11
  • Last Seen:  

Hmm how do you make it GM's with group_id ranges from 80 above not get kicked can still enter Server during maintenance?

rAthena:

Find:

if( runflag != CHARSERVER_ST_RUNNING && (runflag != CHARSERVER_ST_MAINTENANCE || group_id != 99) )

Change to:

if( runflag != CHARSERVER_ST_RUNNING && (runflag != CHARSERVER_ST_MAINTENANCE || group_id < 80) ) // Below 80 can't enter..

Find:

if( (runflag == CHARSERVER_ST_RUNNING || (runflag == CHARSERVER_ST_MAINTENANCE && node->group_id == 99)) &&

Change to:

if( (runflag == CHARSERVER_ST_RUNNING || (runflag == CHARSERVER_ST_MAINTENANCE && node->group_id >= 80)) && // Equal/Above 80 can login

Find:

if (atoi(data) != 99) {

Change to:

if (atoi(data) < 80) { //Below 80 can't login

Find:

if (pc_get_group_level(pl_sd) != 99) { // Only Admin(99) that will stay in maintenance

Change to:

if (pc_get_group_level(pl_sd) < 80) { // Kick player with group id below 80

eAthena:

Find:

< 99

Change to:

< 80

Find:

>= 99

Change to:

>= 80

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  98
  • Topics Per Day:  0.02
  • Content Count:  299
  • Reputation:   5
  • Joined:  04/05/12
  • Last Seen:  

can u please upload this in the rar mode...

because im having a hard time to know how to do this

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  54
  • Reputation:   0
  • Joined:  02/14/12
  • Last Seen:  

Was adding the command in rathena when I was testing, he kicks only players in the map command is used and not all of the server.

Edited by DeMoNiAC
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  152
  • Reputation:   4
  • Joined:  11/25/11
  • Last Seen:  

When it comes to those errors, I manually patch my source manually without using a patcher like TortoiseSVN for instance.

Oh so , I'll have to open the patch file then do it manually on my own without patching it automatically instead?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  530
  • Reputation:   33
  • Joined:  01/17/12
  • Last Seen:  

@FE Thanks again Sir /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

Yeah, anyone have 3ceam patch for this?.. :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  43
  • Reputation:   2
  • Joined:  04/15/12
  • Last Seen:  

:P I don't want to make things complicated ^_^

eathena --

// Indicate the minimum GM level of player that the server accepts to connection.

// 0: all players (normal player are 0. it's default), 1-99: GM level at least with level x

min_level_to_connect: 0

rathena --

// Required account group id to connect to server.

// -1: disabled

// 0 or more: group id

group_id_to_connect: -1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  268
  • Reputation:   27
  • Joined:  12/06/11
  • Last Seen:  

Hello I was wondering how to create a command that causes the server to enter for maintenance when typing the command giving en kick all players and not letting them connect until the command is enabledagain.

@maintenance → kick all players except Admin → change map-server status to Maintenance → tell char-server to change status to Maintenance

Player login → check if (server is in Maintenance and player is not an admin), if yes → block player

at_maintenance.patch

Usage: @maintenance <on/off>

Thanks! ^_^

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  77
  • Reputation:   3
  • Joined:  03/25/12
  • Last Seen:  

someone who know how to work this commands in 3ceam?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  134
  • Reputation:   35
  • Joined:  02/27/12
  • Last Seen:  

There's a problem on algorithm security:

runflag = MAPSERVER_ST_MAINTENANCE; //Activate maintenance, disable all player except Admin to login

Should be before the routine which kicks players from server, not after:

+	iter = mapit_getallusers();
+	for (pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter)) {
+	 if (pc_isGM(pl_sd) < 99) { // Kick anyone with level below Admin(99)
+	  clif_GM_kick(NULL, pl_sd);
+	 }
+	}
+	mapit_free(iter);

As someone could get in right before the flag being set and just after kicking sequence.

Also, apparently while flag is not set, if a player login and wait in char selection page, he just need to wait till kicking routine end to give Ok and play.

Edited by MarkZD
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...