ULX

Author Topic: Utime - Ultimate Edition [Who needs other versions now?]  (Read 34194 times)

0 Members and 1 Guest are viewing this topic.

Offline Beast

  • Newbie
  • *
  • Posts: 18
  • Karma: 8
    • My Gaming Community
Utime - Ultimate Edition [Who needs other versions now?]
« on: February 11, 2016, 07:30:52 PM »
As if my last implementation wasn't enough, here comes the crown of the Utime modules.

This is meant to put down the need for any other Utime module, whether it be MySQL or just the default!  This addon trumps them both with it's additions and ability for future expansion.

What's So "Ultimate"?
- Well, with the help of FPjte's MySQLite module, there is now support for MySQL via tmysql4 and mysqloo as well as local SQLite storage.
- Adapted from my previous iteration, uploading of current data to a MySQL database.
- Ability to add two new columns if using SQLite - Allows for people to make addons that can use the Utime data.
- Fixed joining message.
- Addition of two columns (SteamID and Playername) - Players are still traced by UniqueID to make use of previous data, however it now can be expanded with the SteamID implementation.

Installation:
- Drag and drop into addons
- Configure sh_utime_config.lua

Notes:
- Using this will clear your server entirely as well as place a password on it.  A [MAINTENANCE] tag will be placed in front of of your hostname to inform players of what is going on.
- Use the readme.txt for full instructions!

Support:
This addon comes as is!  I will not be providing direct support to any of the users, however, I will still be fixing bugs and taking community input for the addon.

Make sure that you read the readme.txt before posting for any sort of help on here!

https://github.com/xbeastguyx/Utime-Ultimate
« Last Edit: February 11, 2016, 08:04:01 PM by Beast »

Offline monkeymacman

  • Newbie
  • *
  • Posts: 44
  • Karma: 13
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #1 on: February 13, 2016, 06:56:55 AM »
Wait... So on UTime MySQL at some point you said "removed pointless Steam ID and playername columns" but in here you say "added steamid and playername columns" as a good thing? I'm confused, also, I'm not understanding, what's the difference?

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 476
  • Karma: 84
  • I write code
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #2 on: February 13, 2016, 08:15:07 AM »
Not sure why he would remove SteamID's, but the reason to have them is because A) uniqueids can only be found for online players and B) uniqueids sometimes collide (two players with the same uniqueid), steamids never collide
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline Beast

  • Newbie
  • *
  • Posts: 18
  • Karma: 8
    • My Gaming Community
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #3 on: February 16, 2016, 12:59:09 PM »
Originally I thought those columns weren't needed, as I was thinking for strictly having data storage, not displaying the data.

UniqueID is only good for data storage, however you cannot trace people's names from it nor their Steam ID.

I added them back for the ability to expand and use this with other addons.  This means that anyone with some knowledge can query from the UTime database and figure out which player they're grabbing data from versus just some numbers.

Offline Angrypygmy

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #4 on: February 18, 2016, 02:04:53 AM »
I'm not sure if this was intended for a specific reason, but all of the database information is in a shared file. This seems like quite a scary exploitable security issue, since clients can get a hold of shared files rather easily if they know what they're doing. Please do correct me if i'm wrong here. Just figured i'd point this out to anyone who decides to use this.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #5 on: February 18, 2016, 04:20:56 AM »
Great attention to potential problems angrypygmy. That would be a security problem if it was shared with the clients. However, reviewing the code, it doesn't seem like it's actually shared, regardless of the 'sh_' prefix which is just convention.
Experiencing God's grace one day at a time.

Offline Luk | twitch.tv/doctorluk

  • Newbie
  • *
  • Posts: 40
  • Karma: 12
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #6 on: February 20, 2016, 01:47:09 PM »
Does this allow UTF-8 encoded names within the MySQL table?
Host of Spielwiese der Erwachsenen, a German TTT Server for adults only.

Offline ?????? ?????

  • Newbie
  • *
  • Posts: 1
  • Karma: -1
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #7 on: February 21, 2016, 02:41:07 PM »
Not working, completely. Easier to use the standard utime and your mysql module, you screwed up, specifically

Offline Beast

  • Newbie
  • *
  • Posts: 18
  • Karma: 8
    • My Gaming Community
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #8 on: February 22, 2016, 02:16:27 PM »
Not working, completely. Easier to use the standard utime and your mysql module, you screwed up, specifically

How doesn't it work?

Offline Beast

  • Newbie
  • *
  • Posts: 18
  • Karma: 8
    • My Gaming Community
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #9 on: February 22, 2016, 02:17:29 PM »
Great attention to potential problems angrypygmy. That would be a security problem if it was shared with the clients. However, reviewing the code, it doesn't seem like it's actually shared, regardless of the 'sh_' prefix which is just convention.

I'll rename it and do a little check to ensure safety.


Offline Buzzkill

  • Respected Community Member
  • Full Member
  • *****
  • Posts: 176
  • Karma: 59
    • The Hundred Acre Bloodbath
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #10 on: February 24, 2016, 04:54:34 AM »
Does it support the notion of a "global" time?  (ie, individual times for multiple servers plus a global time across all servers).  Since it's the "ultimate", I would hope so.   ;)

Offline seabeds

  • Newbie
  • *
  • Posts: 35
  • Karma: 0
    • Seaside TTT
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #11 on: March 03, 2016, 09:22:55 AM »
Silly question, it wouldn't be possible to migrate time for players from the previous version, would it?

Offline wafflecopta

  • Newbie
  • *
  • Posts: 2
  • Karma: 2
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #12 on: March 09, 2016, 12:27:05 AM »
Whilst MySQLite is reall quite good for database manipulations, the issue is that it is already included by default into DarkRP, and since MySQLite uses a global table (MySQLite) it will clash with the currently pre-existing MySQLite. Of course Falco negated this by doing:
Code: [Select]
if moduleLoaded or not MySQLite_config or not MySQLite_config.EnableMySQL then return end
But at best this means that this addon will use the DarkRP database, or DarkRP will use this database.
« Last Edit: March 09, 2016, 01:21:52 AM by wafflecopta »

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #13 on: March 10, 2016, 03:00:28 AM »
Silly question, it wouldn't be possible to migrate time for players from the previous version, would it?

According to what I read, this does that.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Marz

  • Newbie
  • *
  • Posts: 10
  • Karma: 0
Re: Utime - Ultimate Edition [Who needs other versions now?]
« Reply #14 on: March 13, 2016, 06:00:02 AM »
[ERROR] addons/utime-ultimate-master/lua/autorun/sv_utime.lua:26: attempt to call method 'Query' (a nil value)
  1. fn - addons/utime-ultimate-master/lua/autorun/sv_utime.lua:26
   2. unknown - addons/ulib-master/lua/ulib/shared/hook.lua:110

I've tried everything at 12am, I can't be stuffed trying to fix it. Just asking for a little help?

EDIT: I have tried mysqloo and tmysql. Nothing is working at this point.
« Last Edit: March 14, 2016, 04:08:50 PM by Marz »