You are not logged in.

Blacksilver

Intermediate

  • "Blacksilver" started this thread

Posts: 298

Location: 127.0.0.1

Occupation: FISI

wcf.user.option.userOption53: Nein

  • Send private message

1

Wednesday, March 20th 2013, 4:58pm

Admincall to Teamspeak

Zu einem wollte ich euch das zeigen zum andern Fragen, ob das bei jemaden klappt? :D

https://forums.alliedmods.net/showpost.p…37&postcount=42

In-Game Plugin klappt(Zeigt Menu und Chatnachricht) aber es kommt keine Meldung auf dem Teamspeak an :o

Spoiler Spoiler


PHP Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sm exts list
[SMDisplaying 13 extensions:
[01Automatic Updater (1.5.0-dev+3785): Updates SourceMod gamedata files
[02Webternet (1.5.0-dev+3785): Extension for interacting with URLs
[03SteamTools (0.8.3): SteamWorks for SourceMod.
[04CS Tools (1.5.0-dev+3785): CS extended functionality
[05BinTools (1.5.0-dev+3785): Low-level C/C++ Calling API
[06SDK Tools (1.5.0-dev+3785): Source SDK Tools
[07Top Menus (1.5.0-dev+3785): Creates sorted nested menus
[08GeoIP (1.5.0-dev+3785): Geographical IP information
[09Socket (3.0.1): Socket extension for SourceMod
[10Client Preferences (1.5.0-dev+3785): Saves client preference settings
[11SQLite (1.5.0-dev+3785): SQLite Driver
[12System2 (1.4): System Commands and Informations
[13MySQL-DBI (1.5.0-dev+3785): MySQL driver implementation for DBI


Source code

1
2
3
sm plugins list
[SM] Listing 73 plugins:
72 "TSAdmin" (1.0) by Jannik "Peace-Maker" Hartung / Freigeist




Edit:
- Secret Codes sind gleich
- ServerIP vom Gameserver ist eingetragen
Come to the dark side,
we have cookies ;)

Bara

Professional

Posts: 834

wcf.user.option.userOption53: Ja

  • Send private message

2

Wednesday, March 20th 2013, 5:42pm

Quoted

[Wed Mar 20 17:41:34 2013] [error] [client ...] PHP Fatal error: Cannot redeclare class TeamSpeak3 in /var/www/ts/libraries/TeamSpeak3/TeamSpeak3.php on line 32


Versuch mal die Webdateien im Anhang die funktionieren bei mir.

Hier runterladen

This post has been edited 1 times, last edit by "Bara" (Mar 20th 2013, 5:49pm)


Blacksilver

Intermediate

  • "Blacksilver" started this thread

Posts: 298

Location: 127.0.0.1

Occupation: FISI

wcf.user.option.userOption53: Nein

  • Send private message

3

Wednesday, March 20th 2013, 6:02pm

Es funktioniert jetzt :D

Source code

1
2
3
4
5
6
<18:01:01> "serveradmin from 78.46.1.70:46953": #############################################################
<18:01:01> "serveradmin from 78.46.1.70:46953": Der Spieler .:Blacksilver:. | <3 Rici | (STEAM_0:0:39272230) hat am 20.03.2013 18:01:03
<18:01:01> "serveradmin from 78.46.1.70:46953": auf Minigame [connect] nach einem Admin gerufen. Grund: 
<18:01:01> "serveradmin from 78.46.1.70:46953": Es wird gebeten, dass ein Admin mit Rechten auf den Server
<18:01:01> "serveradmin from 78.46.1.70:46953": sich um den Spieler/das Problem zu kümmern
<18:01:01> "serveradmin from 78.46.1.70:46953": #############################################################
Come to the dark side,
we have cookies ;)

sliqz

Intermediate

Posts: 409

Occupation: Kaufman im Einzelhandel

wcf.user.option.userOption53: Ja

  • Send private message

4

Thursday, March 28th 2013, 3:33pm

Hört sich interessant an :) gibt das auch für Sourcemod ?

MfG
sliqz

fluxX

Super Moderator

Posts: 1,056

Location: Österreich

Occupation: IT Systemadministrator

wcf.user.option.userOption53: Ja

  • Send private message

5

Thursday, March 28th 2013, 3:40pm

das ist für Sourcemod....

Greetz

sliqz

Intermediate

Posts: 409

Occupation: Kaufman im Einzelhandel

wcf.user.option.userOption53: Ja

  • Send private message

6

Thursday, March 28th 2013, 4:39pm

ich werde wenn ich auf dem link klicke weitergeleitet komme auf die seite "https://forums.alliedmods.net/showpost.php?s=2da824805c4d362138ab91c3415abfd4&p=1907537&postcount=42" wenn ich dann auf smx klicke steht bei mir " Invalid Attachment specified. If you followed a valid link, please notify the administrator "

....

MfG
sliqz

fluxX

Super Moderator

Posts: 1,056

Location: Österreich

Occupation: IT Systemadministrator

wcf.user.option.userOption53: Ja

  • Send private message

7

Thursday, March 28th 2013, 4:55pm

Hier findest du diese Sachen.. scheint wohl am Link zu liegen.

Greetz

sliqz

Intermediate

Posts: 409

Occupation: Kaufman im Einzelhandel

wcf.user.option.userOption53: Ja

  • Send private message

8

Thursday, March 28th 2013, 6:16pm

Danke fluxX :)

sliqz

Intermediate

Posts: 409

Occupation: Kaufman im Einzelhandel

wcf.user.option.userOption53: Ja

  • Send private message

9

Thursday, March 28th 2013, 7:00pm

Entweder klappt das nicht :D oder ich mach was falsch :D kann mir jemand helfen :D

L 03/28/2013 - 18:57:52: [SM] Native "PushArrayCell" reported: Invalid Handle 37b032b (error: 2)
L 03/28/2013 - 18:57:52: [SM] Displaying call stack trace for plugin "tsadmin.smx":
L 03/28/2013 - 18:57:52: [SM] [0] Line 127, C:\Users\Jannik\Desktop\Plugins2\Requested\tsadmin.sp::Panel_SelectReason()

Peace-Maker

Beginner

Posts: 45

wcf.user.option.userOption53: Nein

  • Send private message

10

Thursday, March 28th 2013, 10:32pm

Entweder klappt das nicht :D oder ich mach was falsch :D kann mir jemand helfen :D

L 03/28/2013 - 18:57:52: [SM] Native "PushArrayCell" reported: Invalid Handle 37b032b (error: 2)
L 03/28/2013 - 18:57:52: [SM] Displaying call stack trace for plugin "tsadmin.smx":
L 03/28/2013 - 18:57:52: [SM] [0] Line 127, C:\Users\Jannik\Desktop\Plugins2\Requested\tsadmin.sp::Panel_SelectReason()

Whops, man sollte die API nicht durcheinander schmeißen :) Muss WritePackCell heißen.

sliqz

Intermediate

Posts: 409

Occupation: Kaufman im Einzelhandel

wcf.user.option.userOption53: Ja

  • Send private message

11

Thursday, March 28th 2013, 11:05pm

Also ich habe nicht verstanden was du meinst -.-. API durcheinander schmeißen :S wie soll ich das gemacht haben ich habe nichts am API gemacht :D weiß nicht mal wie das geht :D .

hier die SP Datei wenn du es für mich machen kannst würde ich mich freuen. ^^

Spoiler Spoiler

#pragma semicolon 1
#include <sourcemod>
#include <socket>

#define PLUGIN_VERSION "1.0"

new Handle:g_hCVSecret;
new Handle:g_hCVURL;
new Handle:g_hCVPath;

new String:g_sServerIP[20];
new g_iServerPort;

public Plugin:myinfo =
{
name = "TSAdmin",
author = "Jannik \"Peace-Maker\" Hartung / Freigeist",
description = "Call admins on a teamspeak3.",
version = PLUGIN_VERSION,
url = "http://www.wcfan.de/"
}

public OnPluginStart()
{
new Handle:hVersion = CreateConVar("sm_tsadmin_version", PLUGIN_VERSION, "", FCVAR_PLUGIN|FCVAR_NOTIFY|FCVAR_REPLICATED|FCVAR_DONTRECORD);
if(hVersion != INVALID_HANDLE)
SetConVarString(hVersion, PLUGIN_VERSION);

LoadTranslations("tsadmin.phrases");
LoadTranslations("common.phrases");
LoadTranslations("core.phrases");

g_hCVSecret = CreateConVar("sm_tsadmin_secret", "93rzfoqenfh98qz3", "TSAdmin php script secret.", FCVAR_PLUGIN);
g_hCVURL = CreateConVar("sm_tsadmin_domain", "DOMAIN.TLD", "The domain the php script is hosted on.", FCVAR_PLUGIN);
g_hCVPath = CreateConVar("sm_tsadmin_path", "ts/", "The folder path the script is located in.", FCVAR_PLUGIN);

RegConsoleCmd("sm_tsadmin", Cmd_TSAdmin, "Call an admin on TS3.");

g_iServerPort = GetConVarInt(FindConVar("hostport"));
new iIP = GetConVarInt(FindConVar("hostip"));
FormatEx(g_sServerIP, sizeof(g_sServerIP), "%d.%d.%d.%d", (iIP >> 24) & 0x000000FF, (iIP >> 16) & 0x000000FF, (iIP >> 8) & 0x000000FF, iIP & 0x000000FF);

AutoExecConfig(true);
}

public Action:Cmd_TSAdmin(client, args)
{
if(!client)
{
ReplyToCommand(client, "TSAdmin: This command is ingame only.");
return Plugin_Handled;
}

new Handle:hPanel = CreatePanel();
SetPanelTitle(hPanel, "TS Admin Call");

DrawPanelText(hPanel, "============");
decl String:sBuffer[256];
Format(sBuffer, sizeof(sBuffer), "%T", "abuse", client);
DrawPanelText(hPanel, sBuffer);
Format(sBuffer, sizeof(sBuffer), "%T", "really_call", client);
DrawPanelText(hPanel, sBuffer);
DrawPanelText(hPanel, "\n============");
SetPanelCurrentKey(hPanel, 0);
Format(sBuffer, sizeof(sBuffer), "%T", "Yes", client);
DrawPanelItem(hPanel, sBuffer);
Format(sBuffer, sizeof(sBuffer), "%T", "No", client);
DrawPanelItem(hPanel, sBuffer);

SendPanelToClient(hPanel, client, Panel_TSAdmin, MENU_TIME_FOREVER);
CloseHandle(hPanel);

return Plugin_Handled;
}

ShowReasonMenu(client)
{
new Handle:hPanel = CreatePanel();
SetPanelTitle(hPanel, "TS Admin Call");

DrawPanelText(hPanel, "============");
decl String:sBuffer[256];
Format(sBuffer, sizeof(sBuffer), "%T", "reason", client);
DrawPanelText(hPanel, sBuffer);
DrawPanelText(hPanel, "\n============");
SetPanelCurrentKey(hPanel, 0);
Format(sBuffer, sizeof(sBuffer), "%T", "reason_swearing", client);
DrawPanelItem(hPanel, sBuffer);
Format(sBuffer, sizeof(sBuffer), "%T", "reason_cheating_player", client);
DrawPanelItem(hPanel, sBuffer);
Format(sBuffer, sizeof(sBuffer), "%T", "reason_punkt_player", client);
DrawPanelItem(hPanel, sBuffer);
Format(sBuffer, sizeof(sBuffer), "%T", "reason_buguse_player", client);
DrawPanelItem(hPanel, sBuffer);
Format(sBuffer, sizeof(sBuffer), "%T", "reason_other", client);
DrawPanelItem(hPanel, sBuffer);
DrawPanelText(hPanel, "");
SetPanelCurrentKey(hPanel, 10);
Format(sBuffer, sizeof(sBuffer), "%T", "Exit", client);
DrawPanelItem(hPanel, sBuffer);

SendPanelToClient(hPanel, client, Panel_SelectReason, MENU_TIME_FOREVER);
CloseHandle(hPanel);
}

public Panel_TSAdmin(Handle:menu, MenuAction:action, param1, param2)
{
if(action == MenuAction_Select)
{
if(param2 == 1)
{
ShowReasonMenu(param1);
}
}
}

public Panel_SelectReason(Handle:menu, MenuAction:action, param1, param2)
{
if(action == MenuAction_Select)
{
if(param2 != 10)
{
decl String:sURL[64];
GetConVarString(g_hCVURL, sURL, sizeof(sURL));

new Handle:hPack = CreateDataPack();
PushArrayCell(hPack, GetClientUserId(param1));
PushArrayCell(hPack, param2); // reason
ResetPack(hPack);

new Handle:hSocket = SocketCreate(SOCKET_TCP, Socket_OnError);
SocketSetArg(hSocket, hPack);
SocketConnect(hSocket, Socket_OnConnected, Socket_OnReceive, Socket_OnDisconnected, sURL, 80);

LogMessage("[TSAdmin] %L has called an admin!", param1);
}
}
}

public Socket_OnConnected(Handle:socket, any:pack)
{
new userid = ReadPackCell(pack);
new reason = ReadPackCell(pack);
ResetPack(pack);

new client = GetClientOfUserId(userid);
// Player left already?
if(!client)
{
CloseHandle(pack);
CloseHandle(socket);
return;
}

decl String:sRequestStr[512], String:sURL[64], String:sPath[256], String:sSecret[64], String:sAuth[64], String:sName[MAX_NAME_LENGTH*4+1];
GetConVarString(g_hCVURL, sURL, sizeof(sURL));
GetConVarString(g_hCVPath, sPath, sizeof(sPath));
GetConVarString(g_hCVSecret, sSecret, sizeof(sSecret));

GetClientName(client, sName, sizeof(sName));
GetClientAuthString(client, sAuth, sizeof(sAuth));

URLEncode(sSecret, sizeof(sSecret));
URLEncode(sName, sizeof(sName));
URLEncode(sAuth, sizeof(sAuth));

Format(sRequestStr, sizeof(sRequestStr), "GET /%sindex.php?secret=%s&name=%s&id=%s&serverip=%s&serverport=%d&rid=%d HTTP/1.1\r\nHost: %s\r\nConnection: close\r\n\r\n", sPath, sSecret, sName, sAuth, g_sServerIP, g_iServerPort, reason, sURL);
SocketSend(socket, sRequestStr);
}

public Socket_OnReceive(Handle:socket, String:receiveData[], const dataSize, any:pack)
{
}

public Socket_OnDisconnected(Handle:socket, any:pack)
{
new userid = ReadPackCell(pack);
CloseHandle(pack);
CloseHandle(socket);
new client = GetClientOfUserId(userid);
if(client)
{
PrintToChat(client, "\x04[TSAdmin] %t", "sent");
}
}

public Socket_OnError(Handle:socket, const errorType, const errorNum, any:pack)
{
LogError("[TSAdmin] Socket error %d (errno %d)", errorType, errorNum);

new userid = ReadPackCell(pack);
CloseHandle(pack);
CloseHandle(socket);

new client = GetClientOfUserId(userid);
if(client)
{
PrintToChat(client, "\x04[TSAdmin] %t", "error");
}
}

// RFC 2396 conform
stock URLEncode(String:sString[], maxlen, String:safe[] = "/", bool:bFormat = false)
{
decl String:sAlwaysSafe[256];
Format(sAlwaysSafe, sizeof(sAlwaysSafe), "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-%s", safe);

// Need 2 '%' since sp's Format parses one as a parameter to replace
// http://wiki.alliedmods.net/Format_Class_…od_Scripting%29
if(bFormat)
ReplaceString(sString, maxlen, "%", "%%25");
else
ReplaceString(sString, maxlen, "%", "%25");
new String:sChar[8], String:sReplaceChar[8];
for(new i=1;i<256;i++)
{
// Skip the '%' double replace ftw..
if(i==37)
continue;

Format(sChar, sizeof(sChar), "%c", i);
if(StrContains(sAlwaysSafe, sChar) == -1 && StrContains(sString, sChar) != -1)
{
if(bFormat)
Format(sReplaceChar, sizeof(sReplaceChar), "%%%%%02X", i);
else
Format(sReplaceChar, sizeof(sReplaceChar), "%%%02X", i);
ReplaceString(sString, maxlen, sChar, sReplaceChar);
}
}
}



MfG
sliqz

Peace-Maker

Beginner

Posts: 45

wcf.user.option.userOption53: Nein

  • Send private message

12

Friday, March 29th 2013, 1:43pm

Ich hab den Anhang im gelinkten Post aktualisiert. Einfach neu laden.

sliqz

Intermediate

Posts: 409

Occupation: Kaufman im Einzelhandel

wcf.user.option.userOption53: Ja

  • Send private message

13

Friday, March 29th 2013, 2:07pm

Okay das Plugin klappt jetzt :D

aber jetzt steht im Chat "[TSAdmin] Error. Unable to send the message."

im log steht

Source code

1
L 03/29/2013 - 14:00:23: [tsadmin.smx] [TSAdmin] Socket error 3 (errno 1)


und ich habe socket 3.0.1 drauf.

Bild 1 vom server : http://s14.directupload.net/images/130329/5o33txwm.png

und habe die PHP vom Eventscript genommen finde die von Sourcemod nicht -.- ob das die gleichen sind weiß ich leider nicht ^^ aber sie geht auch nicht.

Bild 2 PHP:[url]http://s7.directupload.net/images/130329/jursmiwo.png[/url]

MfG
sliqz

This post has been edited 1 times, last edit by "sliqz" (Mar 29th 2013, 9:22pm)


sliqz

Intermediate

Posts: 409

Occupation: Kaufman im Einzelhandel

wcf.user.option.userOption53: Ja

  • Send private message

14

Saturday, March 30th 2013, 9:41pm

kann keiner helfen :(

MfG
sliqz

Blacksilver

Intermediate

  • "Blacksilver" started this thread

Posts: 298

Location: 127.0.0.1

Occupation: FISI

wcf.user.option.userOption53: Nein

  • Send private message

15

Saturday, March 30th 2013, 9:51pm

und habe die PHP vom Eventscript genommen finde die von Sourcemod nicht -.- ob das die gleichen sind weiß ich leider nicht ^^ aber sie geht auch nicht.


*hust*
http://sourceserver.info/board102-main/b…peak/#post45829
Post 2
Come to the dark side,
we have cookies ;)

Bara

Professional

Posts: 834

wcf.user.option.userOption53: Ja

  • Send private message

16

Saturday, March 30th 2013, 11:37pm

und habe die PHP vom Eventscript genommen finde die von Sourcemod nicht -.- ob das die gleichen sind weiß ich leider nicht ^^ aber sie geht auch nicht.


*hust*
http://sourceserver.info/board102-main/b…peak/#post45829
Post 2

Wenn er es mit Grund haben will, dann muss er die Webdateien von der Eventscripts Version nehmen. Habe ich bei meiner Version entfernt.

sliqz

Intermediate

Posts: 409

Occupation: Kaufman im Einzelhandel

wcf.user.option.userOption53: Ja

  • Send private message

17

Sunday, March 31st 2013, 11:35am

Damit geht es auch nicht. Immer noch das gleiche Problem

error.log

Source code

1
[tsadmin.smx] [TSAdmin] Socket error 3 (errno 1)


PHP: www.justesports.eu/CallAdmin/

Der Sicherheitscode stimmt nicht!

kann aber nicht sein da beide das gleiche ist ...

und das kommt auf dem Server wenn ich !tsadmin eingebe und dann ein Admin rufen will "Error. Unable to send the massage"

Wie auf dem Bild : Bild

Blacksilver

Intermediate

  • "Blacksilver" started this thread

Posts: 298

Location: 127.0.0.1

Occupation: FISI

wcf.user.option.userOption53: Nein

  • Send private message

18

Sunday, March 31st 2013, 12:09pm

direkt auf die php Seite kann man ja auch nicht gehen xD
wenn dann nur mit index.php?secret=CODE oder ähnlicher parameter/variablen ^^


Socket error 3 (errno 1)
Hast du vlt bei:
$cfg['host'] = "000.000.000.000";
den port mit eingefügt?

$cfg['host'] = "000.000.000.000:0000";
Come to the dark side,
we have cookies ;)

sliqz

Intermediate

Posts: 409

Occupation: Kaufman im Einzelhandel

wcf.user.option.userOption53: Ja

  • Send private message

19

Sunday, March 31st 2013, 12:46pm

$cfg['host'] = "84.200.5.146";

$cfg['serverport'] = 1337;

nein das port ist extra :)

Jetzt steht da nicht mehr

"Der Sicherheitscode stimmt nicht! "

sondern das steht da :D

"Es fehlen Parameter"

phpcode

Beginner

Posts: 10

Location: Bonn

wcf.user.option.userOption53: Ja

  • Send private message

20

Monday, April 1st 2013, 11:40pm

geht das ganze auch für CSGO? Kann jemand das komplette paket hochladen?

Similar threads