Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to enter TS3 UiD? #22

Closed
MNCritter opened this issue Oct 1, 2016 · 9 comments
Closed

No way to enter TS3 UiD? #22

MNCritter opened this issue Oct 1, 2016 · 9 comments

Comments

@MNCritter
Copy link

I have everything installed however I have no way of entering a UiD in the User Cp?

@Fonta
Copy link
Owner

Fonta commented Oct 1, 2016

Hi killkeeblerelves, that's indeed not possible.
The way the plugin works is that it automatically finds your UIDs.
(And will succeed when you're visiting the forum and connecting to the TS server from the same computer.)
Simply go to your UserCP -> TeamSpeak Link and press the button.
If you really want to do it manually, you can add them directly in the database (mybb_tslink_uids table).

@MNCritter
Copy link
Author

I've tried the "teamspeak link button" it doesnt work. Check www.AwakenRP.com
I can send you the config file to verify

@Fonta
Copy link
Owner

Fonta commented Oct 2, 2016

Please try the version attached. I added logging to the plugin which can be enabled/disable in the config file. Also upload the log folder and make sure it's writable for the webserver (chmod 777 or something).
After clicking on the button in the UserCP it should write a log file in the log folder.
You could sent me this file together with your config file to gianni@fonta.nl

tslink1.3.5.zip

@Fonta
Copy link
Owner

Fonta commented Oct 15, 2016

Hi killkeeblerelves,

did you solve the ip's being different? If so, could you tell us how?
Also I added a little tweak to the config.sample.php file to get the right ip when the board is behind cloudflare.

@MNCritter
Copy link
Author

I had to remove http proxy on cloud flare.

On Oct 15, 2016 1:41 PM, "Gianni Fontanini" notifications@github.com
wrote:

Hi killkeeblerelves,

did you solve the ip's being different? If so, could you tell us how?
Also I added a little tweak to the config.sample.php file to get the right
ip when the board is behind cloudflare.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#22 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AVhZ4rtyUlVwf--_cS7ncj2mzskceGKqks5q0R5wgaJpZM4KL4gN
.

@MNCritter
Copy link
Author

Would be interesting to make the plugin reference a user entered ts3 UID.
As I still do not get requests upon sign up. Only on "update groups"

On Oct 15, 2016 1:42 PM, "Ken W" ken.gfra.mn@gmail.com wrote:

I had to remove http proxy on cloud flare.

On Oct 15, 2016 1:41 PM, "Gianni Fontanini" notifications@github.com
wrote:

Hi killkeeblerelves,

did you solve the ip's being different? If so, could you tell us how?
Also I added a little tweak to the config.sample.php file to get the
right ip when the board is behind cloudflare.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#22 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AVhZ4rtyUlVwf--_cS7ncj2mzskceGKqks5q0R5wgaJpZM4KL4gN
.

@Fonta
Copy link
Owner

Fonta commented Oct 15, 2016

Ah ok! Well if you want it back, you could try to replace the following in your config:

if ($givenip == '')
{
    $givenip = $_SERVER['REMOTE_ADDR'];
    $mybb_ip = bin2hex(inet_pton($givenip));
}
else {
    $mybb_ip = bin2hex(inet_pton($givenip));    
}

To:

if ($givenip == '') {
    if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
        $givenip = $_SERVER['HTTP_CF_CONNECTING_IP'];
    } else {
        $givenip = $_SERVER['REMOTE_ADDR'];
    }
    $mybb_ip = bin2hex(inet_pton($givenip));
} else {
    $mybb_ip = bin2hex(inet_pton($givenip));
}

I'm not a big fan of letting users add their UID themselves, because if they would be a vip member, they could add someone else's UID to the database making them a VIP too.
After activation of someone's account the plugin should be triggered.
I don't know if you work with activation emails, but when users click the link, magic should start happening.
If you take a look in tslink.php you can see the hooks at the bottom.

In the future I'll probably check how MyBB is configured and build the hooks upon that.

@MNCritter
Copy link
Author

I've tried cf_connecting with no luck actually

On Oct 15, 2016 1:52 PM, "Gianni Fontanini" notifications@github.com
wrote:

Ah ok! Well if you want it back, you could try to replace the following in
your config:

if ($givenip == '')
{
$givenip = $_SERVER['REMOTE_ADDR'];
$mybb_ip = bin2hex(inet_pton($givenip));
}
else {
$mybb_ip = bin2hex(inet_pton($givenip));
}

To:

if ($givenip == '') {
if (isset($_SERVER['HTTP_CF_CONNECTING_IP'])) {
$givenip = $_SERVER['HTTP_CF_CONNECTING_IP'];
} else {
$givenip = $_SERVER['REMOTE_ADDR'];
}
$mybb_ip = bin2hex(inet_pton($givenip));
} else {
$mybb_ip = bin2hex(inet_pton($givenip));
}

I'm not a big fan of letting users add their UID themselves, because if
they would be a vip member, they could add someone else's UID to the
database making them a VIP too.
After activation of someone's account the plugin should be triggered.
I don't know if you work with activation emails, but when users click the
link, magic should start happening.
If you take a look in tslink.php you can see the hooks at the bottom.

In the future I'll probably check how MyBB is configured and build the
hooks upon that.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#22 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AVhZ4tGVDhbWu2AT1dYTuUV1hrmaQk-Hks5q0SDlgaJpZM4KL4gN
.

@Fonta
Copy link
Owner

Fonta commented Oct 15, 2016

Hmm, too bad. According to the CF support pages, this is the only way.

@Fonta Fonta closed this as completed Oct 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants