diff --git a/Library/TeamTalkLib/teamtalk/Channel.h b/Library/TeamTalkLib/teamtalk/Channel.h index c43ca956f8..ccf606b041 100644 --- a/Library/TeamTalkLib/teamtalk/Channel.h +++ b/Library/TeamTalkLib/teamtalk/Channel.h @@ -24,12 +24,13 @@ #if !defined(CHANNEL_H) #define CHANNEL_H -#include - -#include -#include "ttassert.h" #include "Common.h" #include "PacketLayout.h" +#include "ttassert.h" + +#include + +#include #include #include diff --git a/Library/TeamTalkLib/teamtalk/CodecCommon.cpp b/Library/TeamTalkLib/teamtalk/CodecCommon.cpp index 1e8e9072bc..c344e2f528 100644 --- a/Library/TeamTalkLib/teamtalk/CodecCommon.cpp +++ b/Library/TeamTalkLib/teamtalk/CodecCommon.cpp @@ -22,6 +22,8 @@ */ #include "CodecCommon.h" +#include "PacketLayout.h" + #include #define SPEEX_NB_MODE 0 diff --git a/Library/TeamTalkLib/teamtalk/Commands.h b/Library/TeamTalkLib/teamtalk/Commands.h index 71d1b022d3..7822770359 100644 --- a/Library/TeamTalkLib/teamtalk/Commands.h +++ b/Library/TeamTalkLib/teamtalk/Commands.h @@ -24,13 +24,14 @@ #if !defined(COMMANDS_H) #define COMMANDS_H -#include -#include -#include +#include "Common.h" #include #include -#include "Common.h" + +#include +#include +#include #define TEAMTALK_PROTOCOL_VERSION ACE_TEXT("5.13") diff --git a/Library/TeamTalkLib/teamtalk/Common.cpp b/Library/TeamTalkLib/teamtalk/Common.cpp index 8525587b84..ee45475702 100644 --- a/Library/TeamTalkLib/teamtalk/Common.cpp +++ b/Library/TeamTalkLib/teamtalk/Common.cpp @@ -23,6 +23,7 @@ #include "Common.h" #include "Commands.h" +#include "Channel.h" #include #include @@ -71,8 +72,9 @@ namespace teamtalk bool BannedUser::Match(const BannedUser& user) const { - bool match = true; - if((bantype & BANTYPE_IPADDR) && ipaddr.length()) + bool match = bantype != BANTYPE_NONE; + + if ((bantype & BANTYPE_IPADDR) && ipaddr.length()) { const ACE_TString rgxsubnet = ACE_TEXT("^") ACE_TEXT("(.*)/(\\d+)") ACE_TEXT("$"); #if defined(UNICODE) @@ -97,11 +99,13 @@ namespace teamtalk match &= std::regex_search(user.ipaddr.c_str(), buildregex(rgx.c_str())); } } - if((bantype & BANTYPE_USERNAME)) + + if ((bantype & BANTYPE_USERNAME)) match &= username == user.username; - if((bantype & BANTYPE_CHANNEL)) - match &= chanpath == user.chanpath; - match &= bantype != BANTYPE_NONE; + + if ((bantype & BANTYPE_CHANNEL)) + match &= ChannelsEquals(chanpath, user.chanpath); + return match; } diff --git a/Library/TeamTalkLib/teamtalk/Common.h b/Library/TeamTalkLib/teamtalk/Common.h index 937c5a3676..287abd7bb7 100644 --- a/Library/TeamTalkLib/teamtalk/Common.h +++ b/Library/TeamTalkLib/teamtalk/Common.h @@ -24,7 +24,6 @@ #ifndef COMMON_H #define COMMON_H -#include "PacketLayout.h" #include #include diff --git a/Library/TeamTalkLib/teamtalk/DesktopSession.h b/Library/TeamTalkLib/teamtalk/DesktopSession.h index 201afc7dd4..8bfb3947a1 100644 --- a/Library/TeamTalkLib/teamtalk/DesktopSession.h +++ b/Library/TeamTalkLib/teamtalk/DesktopSession.h @@ -25,7 +25,6 @@ #define DESKTOPSESSION_H #include "Common.h" -#include "PacketLayout.h" #include #define RGB8_BLOCK_PIXEL_W 120 diff --git a/Library/TeamTalkLib/teamtalk/PacketLayout.cpp b/Library/TeamTalkLib/teamtalk/PacketLayout.cpp index 1e36b48271..740aca8173 100644 --- a/Library/TeamTalkLib/teamtalk/PacketLayout.cpp +++ b/Library/TeamTalkLib/teamtalk/PacketLayout.cpp @@ -22,6 +22,7 @@ */ #include "PacketLayout.h" +#include "Common.h" using namespace std; diff --git a/Library/TeamTalkLib/teamtalk/PacketLayout.h b/Library/TeamTalkLib/teamtalk/PacketLayout.h index fd4bc464e7..0ebcfc3123 100644 --- a/Library/TeamTalkLib/teamtalk/PacketLayout.h +++ b/Library/TeamTalkLib/teamtalk/PacketLayout.h @@ -24,10 +24,8 @@ #if !defined(PACKETLAYOUT_H) #define PACKETLAYOUT_H -#include "Common.h" #include -#include #include #include #include diff --git a/Library/TeamTalkLib/teamtalk/User.h b/Library/TeamTalkLib/teamtalk/User.h index ef65428f33..d3aff5606f 100644 --- a/Library/TeamTalkLib/teamtalk/User.h +++ b/Library/TeamTalkLib/teamtalk/User.h @@ -24,12 +24,13 @@ #if !defined(USER_H) #define USER_H -#include +#include "Common.h" +#include "PacketLayout.h" #include #include -#include "PacketLayout.h" +#include namespace teamtalk { diff --git a/Library/TeamTalkLib/teamtalk/client/AudioThread.cpp b/Library/TeamTalkLib/teamtalk/client/AudioThread.cpp index ec9d13e734..12e02b1737 100644 --- a/Library/TeamTalkLib/teamtalk/client/AudioThread.cpp +++ b/Library/TeamTalkLib/teamtalk/client/AudioThread.cpp @@ -23,10 +23,11 @@ #include "AudioThread.h" -#include #include #include +#include #include +#include using namespace std; using namespace teamtalk; diff --git a/Library/TeamTalkLib/teamtalk/client/DesktopShare.h b/Library/TeamTalkLib/teamtalk/client/DesktopShare.h index 2a6595b3ab..6526316197 100644 --- a/Library/TeamTalkLib/teamtalk/client/DesktopShare.h +++ b/Library/TeamTalkLib/teamtalk/client/DesktopShare.h @@ -24,18 +24,18 @@ #ifndef DESKTOPSHARE_H #define DESKTOPSHARE_H -#include -#include -#include -#include +#include +#include +#include #include #include #include -#include -#include -#include +#include +#include +#include +#include namespace teamtalk { diff --git a/Library/TeamTalkLib/teamtalk/client/VideoThread.h b/Library/TeamTalkLib/teamtalk/client/VideoThread.h index d1d6625d61..c4c99de1d4 100644 --- a/Library/TeamTalkLib/teamtalk/client/VideoThread.h +++ b/Library/TeamTalkLib/teamtalk/client/VideoThread.h @@ -24,9 +24,6 @@ #ifndef VIDEOTHREAD_H #define VIDEOTHREAD_H -#include -#include - #if defined(ENABLE_VPX) #include #endif @@ -34,6 +31,9 @@ #include #include +#include +#include + #include //Get VideoFrame from ACE_Message_Block diff --git a/Library/TeamTalkLib/teamtalk/server/AcceptHandler.h b/Library/TeamTalkLib/teamtalk/server/AcceptHandler.h index 46d96104ba..8e75080bc5 100644 --- a/Library/TeamTalkLib/teamtalk/server/AcceptHandler.h +++ b/Library/TeamTalkLib/teamtalk/server/AcceptHandler.h @@ -24,12 +24,12 @@ #if !defined(ACCEPTHANDLER_H) #define ACCEPTHANDLER_H +#include + #include #include #include -#include - #if defined(ENABLE_ENCRYPTION) #include #include diff --git a/Library/TeamTalkLib/teamtalk/server/ServerNode.h b/Library/TeamTalkLib/teamtalk/server/ServerNode.h index f8d62dd114..1545574818 100644 --- a/Library/TeamTalkLib/teamtalk/server/ServerNode.h +++ b/Library/TeamTalkLib/teamtalk/server/ServerNode.h @@ -24,22 +24,21 @@ #if !defined(SERVERNODE_H) #define SERVERNODE_H +#include "AcceptHandler.h" +#include "ServerChannel.h" +#include "ServerUser.h" #include "Server.h" -// ACE -#include -#include -#include - #include #include #include #include -#include "AcceptHandler.h" -#include "ServerChannel.h" -#include "ServerUser.h" +// ACE +#include +#include +#include // STL #include diff --git a/Library/TeamTalkLib/teamtalk/ttassert.h b/Library/TeamTalkLib/teamtalk/ttassert.h index a0f1731d44..5549811def 100644 --- a/Library/TeamTalkLib/teamtalk/ttassert.h +++ b/Library/TeamTalkLib/teamtalk/ttassert.h @@ -24,6 +24,8 @@ #ifndef _TTASSERT_H #define _TTASSERT_H +#include + void tt_assert(const char* assertion, const char* file, int line); #if defined(NDEBUG) @@ -32,8 +34,6 @@ void tt_assert(const char* assertion, const char* file, int line); #else // !NDEBUG -#include - #define TTASSERT(_EX) do { (_EX)? (void)0 : tt_assert(#_EX, __FILE__, __LINE__); assert(_EX); } while(0) #endif