Monthly Target: $400 Donations: $228
 56% 

SourceTV Manager


Post New Thread Reply   
 
Thread Tools Display Modes
pcmaster
AlliedModders Donor
Join Date: Sep 2009
Old 10-19-2016 , 12:17   Re: SourceTV Manager
Reply With Quote #31

Thanks, works fine now!
__________________
pcmaster is online now
Send a message via Skype™ to pcmaster
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 11-16-2016 , 00:52   Re: SourceTV Manager
Reply With Quote #32

Updated to Version 1.1
Adds spectator chat interaction!

Changelog:
  • Add SourceTV_OnSpectatorChatMessage[_Post] forwards to catch or block spectator chat
  • Add SourceTV_PrintToChat native to print to one spectator's chat only
  • Add SourceTV_PrintToConsole native to print to one spectator's console only
  • Add SourceTV_SetClientTVTitle to set the stream title (tv_title) for one spectator individually
  • Fix sending messages to locally connected players only in SourceTV_Broadcast*Message
  • Change magic bLocalOnly boolean argument to a more readable SourceTVBroadcastTarget enum
__________________
Peace-Maker is offline
nosoop
Senior Member
Join Date: Aug 2014
Old 02-15-2017 , 01:53   Re: SourceTV Manager
Reply With Quote #33

Code:
[SM] Unable to load extension "sourcetvmanager.ext": /home/server/tf/addons/sourcemod/extensions/sourcetvmanager.ext.2.tf2.so: undefined symbol: Warning
Occurs on SourceMod 1.8.0.5967 and 1.9.0.6039 in TF2; Linux.
Might need to be built with Clang? Had the same symbol message when I was testing out a modified SDKTools extension built on GCC.

Edit: Looks like building with Clang did the trick.

Edit 2:
It's been a while since I worked with the extension, but since someone was trying to join a game from a relay, I decided to look into it again.

A multi-forward bug appears to actually still be present; client appears to be forcing a reconnect (internet:27005:reconnect in the output below), but only when the extension is loaded. Increases by one connection between map changes.

Here's sample output from sourcetv_test after a few map changes.

Spoiler


After reconnecting, the number of times the event is forwarded is reset.
__________________
I do TF2, TF2 servers, and TF2 plugins.
AlliedModders Releases / Github / TF2 Server / Donate (BTC)

Last edited by nosoop; 02-15-2017 at 03:25.
nosoop is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 02-15-2017 , 18:54   Re: SourceTV Manager
Reply With Quote #34

Oh, I used the older gcc-4.8 to avoid that, but there seem to be problems still.
The server forces the client to reconnect? Can you elaborate? Do you have tv_force_steamauth set to 1?
I don't think I tested during mapchanges, so the extension might not catch the "disconnect" and keep hooking the client?
__________________
Peace-Maker is offline
nosoop
Senior Member
Join Date: Aug 2014
Old 02-15-2017 , 20:07   Re: SourceTV Manager
Reply With Quote #35

Built it with clang-3.4 here.

I'm not sure which side is forcing the reconnection; all I know is that <ip>:<port>:reconnect shows up in the server console after reconnecting. No disconnect message before the map change, so it may be possible that the spectator disconnect on map change isn't being processed.

Further testing; the forward count actually isn't being reset on reconnect, and the <ip>:<port>:reconnect message shows up whether I use retry or connect <serverip>:<tvport>.

SourceTV_OnServerStart is also fired at some point after the map change, though I don't see SourceTV_OnServerShutdown being called.

Haven't modified tv_force_steamauth; it's unchanged from 0.
__________________
I do TF2, TF2 servers, and TF2 plugins.
AlliedModders Releases / Github / TF2 Server / Donate (BTC)

Last edited by nosoop; 02-15-2017 at 20:16.
nosoop is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 02-16-2017 , 18:06   Re: SourceTV Manager
Reply With Quote #36

I've fixed part of it here. OnDisconnect isn't called for sourcetv spectators during mapchanges, but OnClientPutInServer is after they loaded the new map. Should I mimic the core forwards and always call the disconnect forwards on mapchange and the onconnect ones after mapchange? There is no "player_disconnect" event to catch actual disconnects for sourcetv clients though.
__________________
Peace-Maker is offline
nosoop
Senior Member
Join Date: Aug 2014
Old 02-16-2017 , 22:30   Re: SourceTV Manager
Reply With Quote #37

I don't think it'd matter too much if the extension forwards differ from the SourceMod core forwards.

Compiled and installed the latest source and seems to work as expected in testing (no multiple forward calls and client reconnections). I'll drop it into my normal server and see if I run into any issues there.

Thanks!
__________________
I do TF2, TF2 servers, and TF2 plugins.
AlliedModders Releases / Github / TF2 Server / Donate (BTC)
nosoop is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:30.


Powered by vBulletin®
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Theme made by Freecode