Raised This Month: $12 Target: $400
 3% 

WebLync 0.0.13 - A MOTD redirection service


Post New Thread Reply   
 
Thread Tools Display Modes
dangerlord63
Senior Member
Join Date: Aug 2011
Old 06-24-2017 , 04:37   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #91

here it is
PHP Code:
"!gt" "height=720,width=1024" http://www.gametracker.com/server_info/{SERVER_IP}:{SERVER_PORT}/
"!toptime" "height=720,width=1024" http://www.gametracker.com/server_info/{SERVER_IP}:{SERVER_PORT}/top_players/
"!sureler" "height=720,width=1024" http://www.gametracker.com/server_info/{SERVER_IP}:{SERVER_PORT}/top_players/
"gametracker" "height=720,width=1024" http://www.gametracker.com/server_info/{SERVER_IP}:{SERVER_PORT}/
"ts3center" "height=720,width=1024" https://TS3.Center
"cscenter" "height=720,width=1024" https://CS.Center
"!grup" "height=720,width=1024" http://steamcommunity.com/groups/ultima-strike
"!hediye" "height=600,width=800" https://i.hizliresim.com/vpR0Lm.jpg
"!sarkical" "none" http://youtu.be/uq2JN5O16aE
"!sarkidurdur" "none" about:blank
"google" "full" http://www.google.com
"!tamekran" "full" https://CS.Center 
dangerlord63 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-24-2017 , 21:48   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #92

Advertising

WebLync supports advertising on the redirection page via Google AdSense and has three options.
1. Disabled - No ads are displayed (Default Option)
2. WebLync - Ads are displayed using WebLync's publisher id (Use this option to support WebLync)
3. My Google Ads - Ads are displayed using your Google AdSense publisher id
To use My Google Ads you must have an approved Google AdSense account using your own domain name, once approved, you can obtain your publisher id via the Settings page.
__________________

Last edited by Neuro Toxin; 06-24-2017 at 21:49.
Neuro Toxin is offline
Wulfy
Senior Member
Join Date: Apr 2015
Location: Belgium
Old 06-25-2017 , 01:06   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #93

Quote:
Originally Posted by Neuro Toxin View Post
Add a static global array to store the target client to the client issuing the command
Code:
static int s_ProfileClientTargetIndex[MAXPLAYERS+1];
In your command callback store the target index into this array like so.
Code:
s_ProfileClientTargetIndex[client] = Targ;
Register the URL Parameter with callback OnAllPluginsStarted
Code:
public void OnAllPluginsLoaded()
{
	WebLync_RegisterUrlParam("{TargetSteamID64}", OnReplaceTargetSteamID64);
}
Create the callback and use your code with the static global array to get the target client index. Notice how we store the results in the buffer parameter.
Code:
public bool OnReplaceTargetSteamID64(int client, const char[] paramname, char[] buffer, int maxlength)
{
	int target = s_ProfileClientTargetIndex[client];
	GetClientAuthId(target, AuthId_SteamID64, buffer, maxlength);
	return true;
}
Here is a full working version that I've done up based on your code.

Code:
#include <sourcemod>
#include <weblync>
#pragma newdecls required
#pragma semicolon 1

public Plugin myinfo =
{
	name = "WebLync Steam Profile",
	author = "Wulfy and Neuro Toxin",
	description = "Opens a targets steam profile page using WebLync",
	version = "0.0.1",
	url = "https://forums.alliedmods.net/showthread.php?t=298458"
}

static int s_ProfileClientTargetIndex[MAXPLAYERS+1];

public void OnPluginStart()
{
	RegConsoleCmd("sm_steamprofile", OnProfileCommand);
}

public void OnAllPluginsLoaded()
{
	WebLync_RegisterUrlParam("{TargetSteamID64}", OnReplaceTargetSteamID64);
}

public Action OnProfileCommand(int client, int args)
{
	if (args == 0)
	{
		PrintToChat(client, "Usage: !profile <playername>");
		return Plugin_Handled;
	}
	
	char arg[128];
	GetCmdArgString(arg,128);
	
	int target = FindTarget(client,arg,true,false);
	s_ProfileClientTargetIndex[client] = target;
	
	WebLync_OpenUrl(client, "http://steamcommunity.com/profiles/{TargetSteamID64}/");
	return Plugin_Handled;
}

public bool OnReplaceTargetSteamID64(int client, const char[] paramname, char[] buffer, int maxlength)
{
	int target = s_ProfileClientTargetIndex[client];
	if (target == 0)
		return false;
	
	GetClientAuthId(target, AuthId_SteamID64, buffer, maxlength);
	s_ProfileClientTargetIndex[client] = 0;
	return true;
}
Wow!
Thank you so much! We'll definitely consider using option #2 from your latest update

Awesome work man.
__________________
be happy
Wulfy is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-25-2017 , 01:47   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #94

Quote:
Originally Posted by Wulfy View Post
Wow!
Thank you so much! We'll definitely consider using option #2 from your latest update

Awesome work man.
I appreciate that!
__________________
Neuro Toxin is offline
dangerlord63
Senior Member
Join Date: Aug 2011
Old 06-26-2017 , 04:48   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #95

Quote:
Originally Posted by dangerlord63 View Post
here it is
PHP Code:
"!gt" "height=720,width=1024" http://www.gametracker.com/server_info/{SERVER_IP}:{SERVER_PORT}/
"!toptime" "height=720,width=1024" http://www.gametracker.com/server_info/{SERVER_IP}:{SERVER_PORT}/top_players/
"!sureler" "height=720,width=1024" http://www.gametracker.com/server_info/{SERVER_IP}:{SERVER_PORT}/top_players/
"gametracker" "height=720,width=1024" http://www.gametracker.com/server_info/{SERVER_IP}:{SERVER_PORT}/
"ts3center" "height=720,width=1024" https://TS3.Center
"cscenter" "height=720,width=1024" https://CS.Center
"!grup" "height=720,width=1024" http://steamcommunity.com/groups/ultima-strike
"!hediye" "height=600,width=800" https://i.hizliresim.com/vpR0Lm.jpg
"!sarkical" "none" http://youtu.be/uq2JN5O16aE
"!sarkidurdur" "none" about:blank
"google" "full" http://www.google.com
"!tamekran" "full" https://CS.Center 
is there any fix for my problem?
dangerlord63 is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-26-2017 , 05:14   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #96

It's a bit more complicated for a quick fix to occur.

Can you confirm your issue related to the sarkical command?

Edit: I've already patched about:blank to be accepted on the website.
__________________

Last edited by Neuro Toxin; 06-26-2017 at 05:15.
Neuro Toxin is offline
mlov420
Senior Member
Join Date: May 2013
Old 06-26-2017 , 09:19   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #97

Quote:
Originally Posted by TrappaTroopa View Post
I have an issue however on my Surf Server. The motd does not show when you first load into the server like my other servers.

You also have to do !motd to activate weblync after each song plays to be able to hear the next song.

Is there a fix for this? Thanks.
I was having basically the same issue on only my surf servers, none of my others were having this. No matter where I put "sm_cvar sv_disable_motd 0" it would never change it unless I manually did it on the server then it would change back to "1" after each map.

Compile this snippet here and put it on your server, it should resolve your issue, it did for me.

Code:
#include <sourcemod>

public OnConfigsExecuted() {
	ServerCommand("sm_cvar sv_disable_motd 0");
}
mlov420 is offline
TrappaTroopa
Senior Member
Join Date: Feb 2016
Old 06-26-2017 , 11:18   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #98

Quote:
Originally Posted by mlov420 View Post
I was having basically the same issue on only my surf servers, none of my others were having this. No matter where I put "sm_cvar sv_disable_motd 0" it would never change it unless I manually did it on the server then it would change back to "1" after each map.

Compile this snippet here and put it on your server, it should resolve your issue, it did for me.

Code:
#include <sourcemod>

public OnConfigsExecuted() {
	ServerCommand("sm_cvar sv_disable_motd 0");
}
It fixed my MOTD on server load. Thank you! You should post in the plugins forum. You wouldn't believe how many ppl are having this issue. You would make so many ppl happy. I still have the issue with my music plugin. I guess that is a deeper issue.

Last edited by TrappaTroopa; 06-26-2017 at 11:19.
TrappaTroopa is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 06-26-2017 , 19:39   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #99

Quote:
Originally Posted by TrappaTroopa View Post
It fixed my MOTD on server load. Thank you! You should post in the plugins forum. You wouldn't believe how many ppl are having this issue. You would make so many ppl happy. I still have the issue with my music plugin. I guess that is a deeper issue.
I'll add this into the WebLync plugin.
__________________
Neuro Toxin is offline
dangerlord63
Senior Member
Join Date: Aug 2011
Old 06-28-2017 , 05:29   Re: WebLync 0.0.8 - A MOTD redirection service
Reply With Quote #100

Quote:
Originally Posted by Neuro Toxin View Post
It's a bit more complicated for a quick fix to occur.

Can you confirm your issue related to the sarkical command?

Edit: I've already patched about:blank to be accepted on the website.
no there is no problem with sarkical command but it depends on the web site, if i change de youtube.com to hizliresim.com than it doesn't work.
dangerlord63 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 16:32.


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