ULX

Poll

Was this module useful, and helpful?

Yes it was :)
114 (95.8%)
No it was not :(
5 (4.2%)

Total Members Voted: 118

Author Topic: Autopromote XGUI Version [4.09v]  (Read 91513 times)

0 Members and 3 Guests are viewing this topic.

Offline H3llGhost

  • Newbie
  • *
  • Posts: 9
  • Karma: 1
Re: Autopromote XGUI Version [4.09v]
« Reply #60 on: June 20, 2015, 01:23:03 PM »
Is there any possibility to see your plugin on github?

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Autopromote XGUI Version [4.09v]
« Reply #61 on: June 20, 2015, 02:33:13 PM »
Is there any possibility to see your plugin on github?

Yes, there is a possibility.
No, it's currently not on github, as there is no reason to put it on github for the most part of this addon never really getting updated again.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline H3llGhost

  • Newbie
  • *
  • Posts: 9
  • Karma: 1
Re: Autopromote XGUI Version [4.09v]
« Reply #62 on: June 20, 2015, 02:45:41 PM »
That is the reason, I want to update it and add some features.
It would be easier to have for all plugins a central location instead of maintaning them via uploads or similar.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Autopromote XGUI Version [4.09v]
« Reply #63 on: June 21, 2015, 03:14:04 AM »
That is the reason, I want to update it and add some features.
It would be easier to have for all plugins a central location instead of maintaning them via uploads or similar.

As said prior, I couldn't imagine what else could be added on to this, though upon your request here -> https://github.com/chaos12135/ulx_auto_promote
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Krogas

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Autopromote XGUI Version [4.09v]
« Reply #64 on: July 02, 2015, 09:06:10 AM »
On my Server the VIP and the staff are getting demoted to normal users because of a Promotion addon ( http://forums.ulyssesmod.net/index.php?topic=6791.0 ) any Ideas how i could fix that?

Edit: Woops I intended to post this in another topic ^^ but I think I got the same problem as Belly136
« Last Edit: July 02, 2015, 03:13:58 PM by Krogas »

Offline Caustic Soda-Senpai

  • Sr. Member
  • ****
  • Posts: 469
  • Karma: 54
  • <Insert something clever here>
    • Steam Page
Re: Autopromote XGUI Version [4.09v]
« Reply #65 on: July 02, 2015, 12:51:52 PM »
Turn off the auto demote and make sure their ranks aren't touched by the AutoPromote.
Once you get to know me, you'll find you'll have never met me at all.

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Autopromote XGUI Version [4.09v]
« Reply #66 on: July 02, 2015, 05:04:15 PM »
If Staff are set to -1 and VIP are also set to -1 then, then it should all work without any issues you are experiencing.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline Krogas

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Autopromote XGUI Version [4.09v]
« Reply #67 on: July 07, 2015, 05:23:20 AM »
Okay first of all this appears only on mysql storing of userranks. We need this because of many ranks which were given to the user.txt (~20k entries), causing huge lags when promoting someone.

The problem is that when we changed to some specific maps we encountered the promotion of our staff and vips to other ranks because they were still declared as user (which will be promoted after some hours) while connecting to the server. This was saved in the database.

I changed checkPlayer() and added an initial spawn hook in sv_apromote.lua to pass some time before the promotion system handles the freshly connected user
Code: [Select]
local function checkPlayer( ply )
if ply.check_time < 6 then
ply.check_time = ply.check_time + 1
else
local plyhours = math.floor( ply:GetUTimeTotalTime() / 3600 )
local usrgrp = ply:GetUserGroup()
local Rank = ""
local Hours = 0

for k, v in pairs( APromote["grp"] ) do
if plyhours >= tonumber( v ) and tonumber( v ) >= Hours then
if tonumber( v ) >= 0 then
Rank = k
Hours = tonumber( v )
end
end
end
if (!ply:IsUserGroup(Rank) and Rank != "") then
if tonumber( APromote["grp"][usrgrp]) != -1 then
if not tobool( GetConVarNumber( "ap_auto_demote" ) ) and APromote["grp"][usrgrp] != nil
and Hours < tonumber( APromote["grp"][usrgrp] ) then
return
else
if ply:IsConnected() then
RunConsoleCommand( "ulx", "adduser", ply:Nick(), Rank )
PlayRankSound( ply )
end
end
end
end
end
end

hook.Add( "PlayerInitialSpawn", "check_time_set", function( ply )
ply.check_time = 0
end)

May not be very professional but its working for us scince 3 days now. Please tell me if I just had luck and I'm writing bullshit right now xD

Offline Bite That Apple

  • Hero Member
  • *****
  • Posts: 858
  • Karma: 416
  • Apple Innovations 2010®
    • Fun 4 Everyone Gaming
Re: Autopromote XGUI Version [4.09v]
« Reply #68 on: July 09, 2015, 11:28:48 PM »
The reason I didn't do the initial spawn thing is because then it wouldn't automatically promote someone when they reach their time. They'd have to leave and join back.
Quote from: John F. Kennedy 1963
A man may die, nations may rise and fall, but an idea lives on.

Offline BetrayingFate

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Re: Autopromote XGUI Version [4.09v]
« Reply #69 on: July 10, 2015, 11:58:49 PM »
One of the larger issues we are having with our server ad this add-on is similar to that of may others, We have All of our staff ranks excluded from the auto promote system, however, when they log into the server, the system "promotes" them to the rank of the hours they had on the server instead of allowing them to stay as a staff member. Secondly, I tried deactivating the add-on and I realized that the staff were not keeping there rank even with the add-on off. Is this a server issue or the add-on issue?

Offline Krogas

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
Re: Autopromote XGUI Version [4.09v]
« Reply #70 on: July 12, 2015, 02:23:51 PM »
The reason I didn't do the initial spawn thing is because then it wouldn't automatically promote someone when they reach their time. They'd have to leave and join back.

well I just let some seconds pass before the promoting begins. Until now everything works fine!  ;D

Offline Aaron113

  • Hero Member
  • *****
  • Posts: 803
  • Karma: 102
Re: Autopromote XGUI Version [4.09v]
« Reply #71 on: July 13, 2015, 10:02:57 AM »
Is this a server issue or the add-on issue?
Sounds like a addon issue... Specially ULX/ULib.  You have to solve what's going on there first.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Autopromote XGUI Version [4.09v]
« Reply #72 on: July 13, 2015, 07:29:41 PM »
Not sure ULib can fix it.
As we've stated in several posts scattered through out the forums, mostly in General help, Gmod uses a flat text file for groups.
We expand on that, very much.
Gmod, and ULib, can only load so much data at a time before the server would give errors on it's own.
We've added queued calls over time to alleviate this.
Gmod was never designed to have hundreds of users in a group other than default "user" (which requires no code lookup like any other group would)
If your going to use an autopromote system for groups,
1) make sure the autopromote waits some time after spawn before checking. (Pretty sure we even have callbacks for this once Ulib group has changed/loaded for a user)
2) even better, don't make it so easy for people to leave "user" and get added to the <whatever group> stored in ULib by your autopromote config.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline William Sublett

  • Newbie
  • *
  • Posts: 1
  • Karma: -1
Re: Autopromote XGUI Version [4.09v]
« Reply #73 on: July 20, 2015, 07:42:54 PM »
yay thanks "__"

Offline M21z

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Autopromote XGUI Version [4.09v]
« Reply #74 on: August 05, 2015, 04:44:53 AM »
Cool! I have been looking for something like this.. Thanks  :'(