i need a script that can prevent 1 user from logging on to 2 servers at the same

Started by edwardthefma, May 25, 2010, 09:21:20 pm

Previous topic - Next topic

edwardthefma

i need a script that can prevent 1 user from logging on to 2 servers at the same
i have a idea but i dont  know how to wright it is whare

you have that script reads a .php file that is displaying users logged into a server
and it takes the names and dose not allow them to log into the server while already
being logged into 1 i want to prevent messing up the sql
i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
shellium.org :) free linux shells pm me and i will gladly
help you get 1

Blizzard

In case you didn't know, a lot of professional MMOs solve that problem by using a separate database for each server.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

edwardthefma

i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
shellium.org :) free linux shells pm me and i will gladly
help you get 1

Blizzard

Good. Then let 2 servers work with one data and risk data corruption. Go ahead.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

edwardthefma

well i guess ill have to warn my users that doing that will risk damaging their acct and i wont restore them
XD
i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
shellium.org :) free linux shells pm me and i will gladly
help you get 1

SBR*

Quote from: edwardthefma on May 26, 2010, 10:54:36 am
well i guess ill have to warn my users that doing that will risk damaging their acct and i wont restore them
XD


Why do you really need two servers then?

edwardthefma

the servers i have have to have small limits on them prventing a certen number of users per server
to i dont eat up the resources of the server
i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
shellium.org :) free linux shells pm me and i will gladly
help you get 1

Blizzard

Why don't you just increase the setting on the server to allow more connected users? -_-
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

G_G

I thought there was a limit because rmxp could only handle so many connections.

Blizzard

Not really, no. Besides, it's RMXP unrelated. This is Ruby. If you have a monster server with 256 cores and 100 Gbps network connection, you can let it handle 10000 users if you want. :P The limit option is so your server doesn't get overloaded. Nobody wants a lagging server with 500 players online. It's better to run it properly with 100 players.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

jcsnider

Quote from: Blizzard on May 26, 2010, 03:35:45 pm
Not really, no. Besides, it's RMXP unrelated. This is Ruby. If you have a monster server with 256 cores and 100 Gbps network connection, you can let it handle 10000 users if you want. :P The limit option is so your server doesn't get overloaded. Nobody wants a lagging server with 500 players online. It's better to run it properly with 100 players.


Agreed.

But, with Windows PC's it only allows 10 connections before giving an error. If you have a server edition of windows you are fine. If not, then it is time to take the great journey to Ubuntu :D

Subsonic_Noise

First off, edwardthefma, how many people do you expect to play your game? It's an rpg maker mmo, you're lucky if you get 30 active users. Also, I don't get how everyone always talks about Ubuntu. It's literally one of the worst linux distros I ever used.

Blizzard

Sub, we have to accept that Ubuntu is a user-friendly distro. We all know how "good" another user-friendly OS is, though. >_> *cough* ...Windoze... *cough* Soon everybody will start using Ubuntu (yeah, right) and 5 years later people will complain that is sucks and there will be books of jokes about Ubuntu. Ubuntu will become the new Windows (yeah, right again) with all that goes with it including the bad stuff.

Quote from: jcsnider on May 26, 2010, 03:58:01 pm
But, with Windows PC's it only allows 10 connections before giving an error. If you have a server edition of windows you are fine.


Lol, I remember when I was googling around to find a way to increase that number because I thought it was responsible for a problem I was having. Turned out it wasn't. xD
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

edwardthefma

Quote from: Blizzard on May 26, 2010, 03:18:19 pm
Why don't you just increase the setting on the server to allow more connected users? -_-

as i said
Quote from: edwardthefma on May 26, 2010, 02:53:05 pm
the servers i have have to have small limits on them prventing a certen number of users per server
to i dont eat up the resources of the server
to prevent eating up the resources i lmit it to 20 users per server i plan to get 2 servers that run at the same time so if 1 goes offline the other is still up
i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
shellium.org :) free linux shells pm me and i will gladly
help you get 1

Subsonic_Noise

Ubuntu already is the Windows of Linux. If you want Linux, get a real one. I myself like SuSe because it's userfriendly while still providing nearly the full customizablilty that is typical for linix.

edwardthefma

how did this simple script request get into talking about linux :???:
also i relised i was going about it all wrong XD with the user log
why not just make it stop the users with a logged in table 

XD hear is what i have so far
module RMXOS

#------------------------------------------------------------------
# Passes the extension's main module to RMX-OS on the top
# level so it can handle this extension.
# Returns: Module of this extension for update.
#------------------------------------------------------------------
def self.load_current_extension
return Server_States
end

end

#======================================================================
# module ExtensionSkeleton
#======================================================================

module Server_States

# extension version
VERSION = 1.0
# required RMX-OS version
RMXOS_VERSION = 1.14
# whether the server should update this extension in an idividual thread or not
SERVER_THREAD = true

# :::: START Configuration
# - YOUR CONFIGURATION HERE
# :::: END Configuration

#------------------------------------------------------------------
# Initializes the extension (i.e. instantiation of classes).
#------------------------------------------------------------------
def self.initialize
end
#------------------------------------------------------------------
# Calls constant updating on the server.
#------------------------------------------------------------------
def try_login

        return RMXOS::RESULT_DENIED if hash['online'] != '1'
user_id = hash['user_id'].to_i
        RMXOS.server.sql.query #needs to add 1 digit in online in users table


end
def ????
        #wen the user loggs out it needs to put a 0 in in online in users table

   
  end

end
i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
shellium.org :) free linux shells pm me and i will gladly
help you get 1

Blizzard

*facepalm*

The probably single worst thing I have seen in Netplay+ was exactly this: putting the online status into the database. In case you didn't know, if your server crashes or somebody gets disconnected without the server noticing, that player won't be able to login anymore, ever, until you change the online status in the database manually. If it's that what you want, go ahead break the server.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

edwardthefma

then i would need to add a section whare it changes the online table to 0 wen a server is just being started
also i can make a bot command
!cantgetin user-name password
and the bot just puts the 0 where it belongs
i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
shellium.org :) free linux shells pm me and i will gladly
help you get 1

Blizzard

Quote from: Blizzard on June 07, 2010, 05:05:32 pm
or somebody gets disconnected without the server noticing, that player won't be able to login anymore
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

edwardthefma

lol you dint hear me wen i sayed ill just have a bot fix the acounts wen the server dosent notice som 1 diced
right away
i am the lead dev for the shellium mmorpg project
http://wiki.shellium.org/w/Mmorpg
shellium.org :) free linux shells pm me and i will gladly
help you get 1