Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Client/TeamTalkClassic/TeamTalk.rc
Original file line number Diff line number Diff line change
Expand Up @@ -1540,8 +1540,8 @@ IDR_MAINFRAME ICON "res\\TeamTalk.ico"
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,22,0,5194
PRODUCTVERSION 5,22,0,5194
FILEVERSION 5,22,0,5195
PRODUCTVERSION 5,22,0,5195
FILEFLAGSMASK 0x1fL
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -1558,12 +1558,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "BearWare.dk"
VALUE "FileDescription", "TeamTalk voice conferencing client"
VALUE "FileVersion", "5, 22, 0, 5194"
VALUE "FileVersion", "5, 22, 0, 5195"
VALUE "InternalName", "TeamTalk5.exe"
VALUE "LegalCopyright", "Copyright (c) 2005-2020, BearWare.dk. All rights reserved."
VALUE "OriginalFilename", "TeamTalk5.exe"
VALUE "ProductName", "BearWare.dk TeamTalk"
VALUE "ProductVersion", "5, 22, 0, 5194"
VALUE "ProductVersion", "5, 22, 0, 5195"
END
END
BLOCK "VarFileInfo"
Expand Down
8 changes: 4 additions & 4 deletions Client/qtTeamTalk/mainwindow.rc
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,22,0,5194
PRODUCTVERSION 5,22,0,5194
FILEVERSION 5,22,0,5195
PRODUCTVERSION 5,22,0,5195
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -71,12 +71,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "BearWare.dk"
VALUE "FileDescription", "TeamTalk Conferencing Client"
VALUE "FileVersion", "5, 22, 0, 5194"
VALUE "FileVersion", "5, 22, 0, 5195"
VALUE "InternalName", "TeamTalk 5"
VALUE "LegalCopyright", "Copyright (c) 2005-2020, BearWare.dk. All rights reserved."
VALUE "OriginalFilename", "TeamTalk5.exe"
VALUE "ProductName", "BearWare.dk TeamTalk 5"
VALUE "ProductVersion", "5, 22, 0, 5194"
VALUE "ProductVersion", "5, 22, 0, 5195"
END
END
BLOCK "VarFileInfo"
Expand Down
2 changes: 1 addition & 1 deletion Documentation/TeamTalk/TeamTalk5.dox
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = "TeamTalk Help"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Version 5.22.0.5194"
PROJECT_NUMBER = "Version 5.22.0.5195"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion Documentation/TeamTalkSDK/TeamTalk.Java.dox
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = "TeamTalk 5 Java DLL"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Version 5.22.0.5194 - Unreleased"
PROJECT_NUMBER = "Version 5.22.0.5195 - Unreleased"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion Documentation/TeamTalkSDK/TeamTalk.NET.dox
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = "TeamTalk 5 .NET DLL"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Version 5.22.0.5194 - Unreleased"
PROJECT_NUMBER = "Version 5.22.0.5195 - Unreleased"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion Documentation/TeamTalkSDK/TeamTalk.dox
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ PROJECT_NAME = "TeamTalk 5 C-API DLL"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "Version 5.22.0.5194 - Unreleased"
PROJECT_NUMBER = "Version 5.22.0.5195 - Unreleased"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion Library/TeamTalk.NET/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("5.22.0.5194")]
[assembly: AssemblyVersion("5.22.0.5195")]

9 changes: 6 additions & 3 deletions Library/TeamTalkLib/TeamTalkDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
#if !defined(TEAMTALKDEFS_H)
#define TEAMTALKDEFS_H

#define TEAMTALK_VERSION "5.22.0.5194"
#define TEAMTALK_RC_VERSION 5,22,0,5194
#define TEAMTALK_RC_FILEVERSION "5, 22, 0, 5194"
#define TEAMTALK_VERSION "5.22.0.5195"
#define TEAMTALK_RC_VERSION 5,22,0,5195
#define TEAMTALK_RC_FILEVERSION "5, 22, 0, 5195"
#define TEAMTALK_VERSION_POSTFIX " - Unreleased"

#if defined(ENABLE_TEAMTALKPRO)
Expand All @@ -35,6 +35,9 @@
#define WEBLOGIN_BEARWARE_USERNAME "bearware"
#define WEBLOGIN_BEARWARE_POSTFIX "@bearware.dk"
#define WEBLOGIN_URL "https://login.bearware.dk/teamtalk/weblogin.php?"
constexpr auto WEBLOGIN_SPAMBOT_USERNAME = "spambot" WEBLOGIN_BEARWARE_POSTFIX;
constexpr auto SPAMBOT_SUBMIT_URL = "https://www.bearware.dk/teamtalk/tt5servers.php";
constexpr auto WEBLOGIN_PING_URL = "https://login.bearware.dk/teamtalk/weblogin.php?ping=1";
#else
#define TEAMTALK_LIB_NAME "TeamTalk5"
#endif
Expand Down
167 changes: 165 additions & 2 deletions Library/TeamTalkLib/bin/ttsrv/ServerConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@

#include "AppInfo.h"
#include "ServerXML.h"
#include "mystd/MyStd.h"
#include "TeamTalkDefs.h"
#include "myace/MyACE.h"
#include "myace/MyINet.h"
#include "TeamTalkDefs.h"
#include "mystd/MyStd.h"
#include "teamtalk/Commands.h"
#include "teamtalk/Common.h"
#include "teamtalk/Log.h"
Expand All @@ -48,6 +48,7 @@
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <regex>
#include <sstream>
Expand Down Expand Up @@ -287,6 +288,164 @@ void ConfigureUserAccount(UserAccount user, teamtalk::ServerXML& xmlSettings)
}

#if defined(ENABLE_TEAMTALKPRO)

static std::string GetMyIPAddress()
{
std::string xml;
switch (HttpGetRequest(WEBLOGIN_PING_URL, xml))
{
case 1 :
{
teamtalk::XMLDocument xmldoc("teamtalk", "1.0");
if (xmldoc.Parse(xml))
{
return xmldoc.GetValue(false, "teamtalk/ipaddress", "");
}
}
}
return {};
}

static bool SubmitSpamBotServer(teamtalk::ServerXML& xmlSettings)
{
cout << "Do you wish to submit your TeamTalk Pro server for SpamBot monitoring? ";
if (!PrintGetBool(true))
return true;

while (!LoginBearWare(xmlSettings))
{
cout << "Try again? ";
if (!PrintGetBool(true))
break;
}

auto myipaddr = GetMyIPAddress();
std::cout << "What is the public IP-address of your server? ";
myipaddr = PrintGetString(myipaddr);
std::cout << "What is the TCP port of your server? ";
int const tcpport = PrintGetInt(xmlSettings.GetHostTcpPort(DEFAULT_TCPPORT));
std::cout << "What is the UDP port of your server? ";
int const udpport = PrintGetInt(xmlSettings.GetHostUdpPort(DEFAULT_UDPPORT));
std::cout << "Is the server encrypted? ";
bool const encrypted = PrintGetBool(!xmlSettings.GetCertificateFile().empty());

std::string bearwareid;
std::string token;
xmlSettings.GetBearWareWebLogin(bearwareid, token);
std::map<std::string, std::string> formdata;
formdata["client"] = TEAMTALK_LIB_NAME;
formdata["version"] = TEAMTALK_VERSION;
formdata["action"] = "spambotsubmit"; // TODO: make endpoint
formdata["username"] = bearwareid;
formdata["token"] = token;
// TODO: query user for input
formdata["ipaddress"] = myipaddr;
formdata["tcpport"] = std::to_string(tcpport);
formdata["udpport"] = std::to_string(udpport);
formdata["encrypted"] = encrypted ? "true" : "false";

std::string xml;
switch (HttpPostRequest(SPAMBOT_SUBMIT_URL, formdata, xml))
{
default :
case -1 :
case 0 :
return false;
case 1 :
return true;
}
}

static bool RemoveSpamBotServer(teamtalk::ServerXML& xmlSettings)
{
cout << "Do you wish to remove your TeamTalk Pro server from SpamBot monitoring? ";
if (!PrintGetBool(true))
return true;

while (!LoginBearWare(xmlSettings))
{
cout << "Try again? ";
if (!PrintGetBool(true))
break;
}

auto myipaddr = GetMyIPAddress();
std::cout << "What is the registered IP-address of your server? ";
myipaddr = PrintGetString(myipaddr);
std::cout << "What is the TCP port of your server? ";
int const tcpport = PrintGetInt(xmlSettings.GetHostTcpPort(DEFAULT_TCPPORT));

std::string bearwareid;
std::string token;
xmlSettings.GetBearWareWebLogin(bearwareid, token);
std::map<std::string, std::string> formdata;
formdata["client"] = TEAMTALK_LIB_NAME;
formdata["version"] = TEAMTALK_VERSION;
formdata["action"] = "spambotremove"; // TODO: make endpoint
formdata["username"] = bearwareid;
formdata["token"] = token;
formdata["ipaddress"] = myipaddr;
formdata["tcpport"] = std::to_string(tcpport);

std::string xml;
switch (HttpPostRequest(SPAMBOT_SUBMIT_URL, formdata, xml))
{
default :
case -1 :
case 0 :
return false;
case 1 :
return true;
}
}

static void ConfigureSpamBotUserAccount(UserAccount user, teamtalk::ServerXML& xmlSettings)
{
cout << "Creating SpamBot web-login account." << endl;
user.username = ACE_TEXT( WEBLOGIN_SPAMBOT_USERNAME );
user.passwd = ACE_TEXT("");

cout << "Available user types:" << endl;
cout << "\t1. Default user." << endl;
cout << "\t2. Administrator." << endl;
cout << "Select user type:";
switch(PrintGetInt(1))
{
case 2 :
user.usertype = USERTYPE_ADMIN;
break;
case 1 :
default :
{
user.usertype = USERTYPE_DEFAULT;
int userrights = USERRIGHT_NONE;

cout << "User can see all other users on server: ";
userrights = PrintGetBool((USERRIGHT_DEFAULT & USERRIGHT_VIEW_ALL_USERS) != 0)?
(userrights | USERRIGHT_VIEW_ALL_USERS) : (userrights & ~USERRIGHT_VIEW_ALL_USERS);

cout << "User can kick users off the server: ";
userrights = PrintGetBool((USERRIGHT_DEFAULT & USERRIGHT_KICK_USERS) != 0)?
(userrights | USERRIGHT_KICK_USERS) : (userrights & ~USERRIGHT_KICK_USERS);

cout << "User can ban users from the server: ";
userrights = PrintGetBool((USERRIGHT_DEFAULT & USERRIGHT_BAN_USERS) != 0)?
(userrights | USERRIGHT_BAN_USERS) : (userrights & ~USERRIGHT_BAN_USERS);

user.userrights = userrights;
}
break;
}

xmlSettings.RemoveUser(UnicodeToUtf8(user.username).c_str());
xmlSettings.AddNewUser(user);

if (!SubmitSpamBotServer(xmlSettings))
{
cout << "Failed to submit SpamBot." << endl;
}
}

void ConfigureEncryption(bool& certverifyonce, int& certdepth,
ACE_TString& cadir, ACE_TString& keyfile,
ACE_TString& certfile, ACE_TString& cafile,
Expand Down Expand Up @@ -531,6 +690,7 @@ void RunWizard(teamtalk::ServerXML& xmlSettings)
CREATE_USERACCOUNT,
#if defined(ENABLE_TEAMTALKPRO)
CREATE_USERACCOUNT_BEARWARE,
CREATE_USERACCOUNT_SPAMBOT,
#endif
DELETE_USERACCOUNT,
QUIT_USERACCOUNTS
Expand Down Expand Up @@ -626,6 +786,9 @@ void RunWizard(teamtalk::ServerXML& xmlSettings)
user.passwd = ACE_TEXT("");
ConfigureUserAccount(user, xmlSettings);
break;
case CREATE_USERACCOUNT_SPAMBOT :
ConfigureSpamBotUserAccount(user, xmlSettings);
break;
#endif /* ENABLE_TEAMTALKPRO */
case DELETE_USERACCOUNT :
{
Expand Down
8 changes: 4 additions & 4 deletions Library/TeamTalkLib/bin/ttsrv/ttsrv.rc
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 5,22,0,5194
PRODUCTVERSION 5,22,0,5194
FILEVERSION 5,22,0,5195
PRODUCTVERSION 5,22,0,5195
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -93,7 +93,7 @@ BEGIN
#else
VALUE "FileDescription", "TeamTalk Conferencing Server"
#endif
VALUE "FileVersion", "5, 22, 0, 5194"
VALUE "FileVersion", "5, 22, 0, 5195"
VALUE "InternalName", "tt5srv.exe"
VALUE "LegalCopyright", "Copyright (c) 2002-2020, BearWare.dk. All rights reserved."
VALUE "OriginalFilename", "tt5srv.exe"
Expand All @@ -102,7 +102,7 @@ BEGIN
#else
VALUE "ProductName", "TeamTalk Conferencing Server"
#endif
VALUE "ProductVersion", "5, 22, 0, 5194"
VALUE "ProductVersion", "5, 22, 0, 5195"
END
END
BLOCK "VarFileInfo"
Expand Down
2 changes: 1 addition & 1 deletion Library/TeamTalk_DLL/TeamTalk.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* client's version can be seen in the @a szVersion member of the
* #User struct. */

#define TEAMTALK_VERSION "5.22.0.5194"
#define TEAMTALK_VERSION "5.22.0.5195"


#if defined(WIN32)
Expand Down
2 changes: 1 addition & 1 deletion Library/TeamTalk_DLL/TeamTalkSrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* client's version can be seen in the @a szVersion member of the
* #User struct. */

#define TEAMTALK_SERVER_VERSION "5.22.0.5194"
#define TEAMTALK_SERVER_VERSION "5.22.0.5195"

#ifdef __cplusplus
extern "C" {
Expand Down
2 changes: 1 addition & 1 deletion Setup/Portable/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION="v5.22.0.5194"
VERSION="v5.22.0.5195"

OUTPUT_DEST=./
INSTALLDIR?=$(TEAMTALK_INSTALLDIR)
Expand Down
Loading