Author Topic: Register Command  (Read 5203 times)

0 Members and 1 Guest are viewing this topic.

Offline Color

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Register Command
« on: September 28, 2013, 11:21:37 AM »
I have a register command that opens a Steam Wepbage to the website. What i want to do is once they type !register and they register with their name on the website, it autopromotes them. Is there any possible way i may do that. Here is my register.lua

Code: [Select]
function registerCommand( pl, text, teamonly )
    if (string.lower(text) == "!register") then
    pl:SendLua([[gui.OpenURL("http://iphgaming.com/member.php?action=register")]]) -- Change ADDRESS to your chosen page.
    for k, v in pairs(player.GetAll()) do v:ChatPrint( "Player " .. pl:Nick() .. " has viewed our register page!" )
end
end
end
hook.Add( "PlayerSay", "rcommand", registerCommand )

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: Register Command
« Reply #1 on: September 28, 2013, 11:26:06 AM »
I think it would somehow have to connect through Steam authentication, so they register with their Steam ID (basically), then that Steam ID gets added to whatever group you set it to through RCON or something.

Although, how you would do that is out of my knowledge.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Register Command
« Reply #2 on: September 28, 2013, 02:23:20 PM »
To have a secure system that does this would be tricky. I would recommend asking users to insert their SteamID into their forum profile directly, instead.
Experiencing God's grace one day at a time.

Offline Decicus

  • Hero Member
  • *****
  • Posts: 552
  • Karma: 81
    • Alex Thomassen
Re: Register Command
« Reply #3 on: September 28, 2013, 02:27:04 PM »
To have a secure system that does this would be tricky. I would recommend asking users to insert their SteamID into their forum profile directly, instead.

I'm a moron, that is A LOT easier.
Contact information:
E-mail: alex@thomassen.xyz.
You can also send a PM.

Offline Color

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Register Command
« Reply #4 on: September 29, 2013, 06:34:14 PM »
I'm a moron, that is A LOT easier.

Could i have a piece of code to where when they register, They must have to enter their SteamID or steam profile link and that SteamID or Steam profile link will showup on their profile?

Also i use MyBB for my forums

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Register Command
« Reply #5 on: September 29, 2013, 08:23:14 PM »
Color, if you're asking someone else to do it for you, you're likely not going to find someone.
There have been TONS of 'sql' discussions here, several of them dealing with 'how do I load admins from <some SQL database x>'.
You'll need to search for them from the main page.
Now, SMF used to have a plugin that allowed for custom input for peoples profiles.
That was many versions ago.
Gmod(10?) had <some working SQL module> at the time.
At that same time, Megiddo had a Gmod Sandbox server, which, he used to pull from the SMF database to determine admins on the Gmod server.
He used this (now, pay attention, thde code is 5+ years old...IT WON'T WORK AS IS) code to pull the database info.
http://forums.ulyssesmod.net/index.php/topic,3241.msg9622.html#msg9622

You'll need to convert/upgrade it for 1) Gmod 13, 2) some newer SQL module (too many come and go) and 3) convert it to myBB database query format and 4) find a way for myBB to store steam userids for that code to work.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming