Ulysses

General => Developers Corner => Topic started by: Proendreeper on February 06, 2013, 07:15:37 PM

Title: I've made my first addon for gmod
Post by: Proendreeper on February 06, 2013, 07:15:37 PM
I was a bit bored so I decided to try making so UCL uses a MySQL backend instead of a KeyValues backend.

Let me just say it turned out well.

I would attach more photos but I am too tired at the moment to do so.
Title: Re: I've made my first addon for gmod
Post by: Zevoxa on February 06, 2013, 10:22:10 PM
Could you explain for me what a ULC is? o:
Title: Re: I've made my first addon for gmod
Post by: Proendreeper on February 07, 2013, 06:49:02 AM
It's ULib's user management system
Title: Re: I've made my first addon for gmod
Post by: JamminR on February 07, 2013, 02:20:26 PM
ULC? No idea? :P
UCL - Ulysses Control List. (aka User Control List)
Table of groups and users, with allow/deny permissions, and any other flag as set using ULib library group/user control code.
Title: Re: I've made my first addon for gmod
Post by: Bite That Apple on February 07, 2013, 10:02:43 PM
I was a bit bored so I decided to try making so UCL uses a MySQL backend instead of a KeyValues backend.

Let me just say it turned out well.

I would attach more photos but I am too tired at the moment to do so.

Really, neat and interesting script you have here. You thinking of releasing it to the world of ulx, or is it just a private little script you've been making?


Also, does your script just do the groups so far, or does it do users as well?
Title: Re: I've made my first addon for gmod
Post by: Proendreeper on February 09, 2013, 03:45:17 PM
ULC? No idea? :P
UCL - Ulysses Control List. (aka User Control List)
Table of groups and users, with allow/deny permissions, and any other flag as set using ULib library group/user control code.

That would make sense, I just always misinterpret it as ulc not ucl
Title: Re: I've made my first addon for gmod
Post by: Proendreeper on February 09, 2013, 03:46:51 PM
Really, neat and interesting script you have here. You thinking of releasing it to the world of ulx, or is it just a private little script you've been making?


Also, does your script just do the groups so far, or does it do users as well?

It has a ton of bugs and isn't very optimized, and yes it does both, I just was keeping the users steamids private more.
Title: Re: I've made my first addon for gmod
Post by: Bite That Apple on February 09, 2013, 07:27:55 PM
You think maybe I can see a little of it :) ?
Title: Re: I've made my first addon for gmod
Post by: Proendreeper on February 10, 2013, 12:03:02 PM
You think maybe I can see a little of it :) ?
Sure, but you won't be getting much:P
Code: [Select]
local function Msg(text)
  _G.Msg("[Global UCL] "..text)
end
Code: [Select]
local function getQuery(q,...)
  if querys[q]~=nil then
    return string.format(querys[q],...)
  end
end
Code: [Select]
db = mysqloo.connect(MYSQL_HOST,MYSQL_USERNAME,MYSQL_PASSWORD,MYSQL_DATABASE,MYSQL_PORT)
local connected = false -- No idea why I am not using this.

function db:onConnected()
  connected=true
end
 
function db:onConnectionFailed( err )
  Msg( "Connection to database failed!\n" )
  Msg( "Error:"..err.."\n" )
end
 
db:connect()
db:wait()
if db:status()==mysqloo.DATABASE_CONNECTED or db:status()==mysqloo.DATABASE_CONNECTING then
  Msg("Connected successfully!\n")
else
  Msg("Connected unsucessfully!\n")
end
Title: Re: I've made my first addon for gmod
Post by: Bite That Apple on February 12, 2013, 08:09:35 AM
Yeah looks like some pretty basic MySQL, it's nice. You should develop this into a addon that others can download because I would sure like this.
Title: Re: I've made my first addon for gmod
Post by: Proendreeper on February 12, 2013, 07:07:43 PM
Yeah looks like some pretty basic MySQL, it's nice. You should develop this into a addon that others can download because I would sure like this.

I still need to fix a few things, such as it having to be loaded manually atm, I haven't gotten around to it yet but anyways in other news I've made a pointshop leaderboard

You can find it here (http://sv.proendreeperclan.com/pointshop.php)