Raised This Month: $32 Target: $400
 8% 

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!
__________________
Stopped hosting servers as of November 2018, no longer active around here.
pcmaster is offline
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
Veteran 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.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

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
Veteran 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.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

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
Veteran 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.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)
nosoop is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 04-19-2017 , 16:48   Re: SourceTV Manager
Reply With Quote #38

Did any gamedata update (I'm using the latest)? Simply testing FakeClientCommand(SourceTV_GetBotIndex(), "status") will crash my Linux server.

Quote:
0 sourcetvmanager.ext.2.csgo.so!HLTVServerWrapp er::OnHLTVBotExecuteStringCommand(char const*) [hltvserverwrapper.cpp:233 + 0x0]
1 sourcetvmanager.ext.2.csgo.so!__SourceHook_FH Cls_IClientExecuteStringCommand0::Func(char const*) [commonhooks.cpp:41 + 0x14]
2 sourcemod.2.csgo.so!VEngineServer_Logic::Fake ClientCommand [logic_bridge.cpp:121 + 0x16]
3 sourcemod.logic.so!FakeClientCommand [smn_console.cpp:256 + 0xd]
4 sourcepawn.jit.x86.so!sp:oolScope::~PoolSco pe [pool-allocator.cpp:82 + 0xc]
5 0x88c43d89
6 sourcepawn.jit.x86.so!sp::ScriptedInvoker::In voke [scripted-invoker.cpp:296 + 0x1f]
7 0x8
8 0xecdf3908
9 sourcemod.logic.so + 0x558d0
10 sourcemod.2.csgo.so!ConsoleDetours::InternalD ispatch [ConsoleDetours.cpp66 + 0x10]

Last edited by hlstriker; 04-19-2017 at 16:50.
hlstriker is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 04-19-2017 , 19:23   Re: SourceTV Manager
Reply With Quote #39

Quote:
Originally Posted by hlstriker View Post
Did any gamedata update (I'm using the latest)? Simply testing FakeClientCommand(SourceTV_GetBotIndex(), "status") will crash my Linux server.
That's quite possible, but I don't have access to a windows machine right now to check the gamedata
__________________
Peace-Maker is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 04-19-2017 , 21:36   Re: SourceTV Manager
Reply With Quote #40

Quote:
Originally Posted by Peace-Maker View Post
That's quite possible, but I don't have access to a windows machine right now to check the gamedata
It works fine on Windows. It's only Linux that's crashing for me.
hlstriker 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 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode