ULX

Author Topic: Linking Utime between two different servers  (Read 2683 times)

0 Members and 3 Guests are viewing this topic.

Offline iBurnPuppies

  • Newbie
  • *
  • Posts: 27
  • Karma: 2
Linking Utime between two different servers
« on: September 26, 2009, 04:18:31 PM »
OK, I'm almost certain this has been asked before, but I searched through the FAQ/did a forum search and was unable to find anything about it. I'm wondering if there's a way to link the Utime data between two servers. I know that the data is stored in sv.db, so I'm thinking that this would be done in SQL, not Lua. Is there any way to link the information between the two databases? Or, are there any threads you could point me to that asked the same thing? Thanks!

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Linking Utime between two different servers
« Reply #1 on: September 26, 2009, 05:09:58 PM »
I don't know SQL.
UTime uses the Gmod's sqlite functions to store in sv.db.
UBan, another release, uses an actual SQL database to store bans.
If you know enough of SQL and Lua, you may wish to look at UTime, and look at the way UBan writes/loads/shares bans into an SQL database.
I imagine comparing the two would get you on the right track.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline atomicspark

  • Full Member
  • ***
  • Posts: 196
  • Karma: 12
Re: Linking Utime between two different servers
« Reply #2 on: September 26, 2009, 05:37:50 PM »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Linking Utime between two different servers
« Reply #3 on: September 26, 2009, 09:18:13 PM »
It's pretty much just changing a few function calls. I seem to remember that someone released this modification a while back, but it shouldn't be difficult to do yourself if you know basic MySQL.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Linking Utime between two different servers
« Reply #4 on: September 26, 2009, 10:19:14 PM »
There was a major suggestion discussion where one of the forum members wanted all group/user and ban functions stored through MySQL.
http://forums.ulyssesmod.net/index.php/topic,3241.msg9622.html
Included in the discussion was the post by Megiddo of the code we used to use on our own GMod server to pull admin information from these SMF forums.
You may find it helpful along with UBan for seeing the SQL queries needed.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming