From b8719f74aff02b6a696e6baac928418850bf69ef Mon Sep 17 00:00:00 2001 From: IrishDarkshadow Date: Thu, 3 Oct 2019 00:51:48 +0100 Subject: [PATCH] Created How To Run Station Chat (markdown) --- How-To-Run-Station-Chat.md | 474 +++++++++++++++++++++++++++++++++++++ 1 file changed, 474 insertions(+) create mode 100644 How-To-Run-Station-Chat.md diff --git a/How-To-Run-Station-Chat.md b/How-To-Run-Station-Chat.md new file mode 100644 index 0000000..ce95121 --- /dev/null +++ b/How-To-Run-Station-Chat.md @@ -0,0 +1,474 @@ + +![](https://i.imgur.com/VjsR21L.jpg) +![](https://i.imgur.com/2K59dOU.jpg) +![](https://i.imgur.com/jxEBkoW.jpg) +![](https://i.imgur.com/1khqkM0.jpg) +![](https://i.imgur.com/rFiCoBM.jpg) +![](https://i.imgur.com/ZNdE6JT.jpg) +![](https://i.imgur.com/b6KCiTc.jpg) +![](https://i.imgur.com/rFFsXJ1.jpg) +![](https://i.imgur.com/INFui7D.jpg) +![](https://i.imgur.com/4JWJcwB.jpg) +![](https://i.imgur.com/nLBHUri.jpg) +![](https://i.imgur.com/0lPMChT.jpg) +![](https://i.imgur.com/hG64P2G.jpg) + +=============================================================== +Original discussion thread text for search result purposes: + +SWGSOURCE +FORUMS +MARK FORUMS READ +SEARCH FORUMS +SUBSCRIBED FORUMS +SUBSCRIBED THREADS +NEW THREADS +SHOWCASESWG FILESMEMBERSCHAT1 / 26 +/ + + +Forums +SWG Server Resources +Tools and Files +How to run Station-Chat +Discussion in 'Tools and Files' started by Rabiator, Sep 26, 2016. + +Tags: chat email friendlist friendstatus station-chat stationchat +Subscribe to Thread +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#1Rabiator, Sep 26, 2016 Last edited: Oct 23, 2016 +You can use Lights Station-Chat +https://github.com/Light2/StationChat/commits/master +but there is alot missing, it has memory-leaks and swg-internal-chat going crazy with it +Better use mine (see Attachement) +Fixed Mem-leaks and added alot of missing parts! +But it is still under construction and alot of printout-lines still there for debugging in it. +ALL works, only 2 problems left: +-- If a char leaveRoom or logout all left chars in that channel do not see the leave +-- and Failover doesnt work fully, that means if you shut down Station-Chat and switch ON it again +, than swg goes in failovermode, and relogin chars in Chat and recreate Rooms. +THAT in failover works all now, except the automatic "reenter room,automatic RE-set moderator and such things" +That is where i still work on..... + + +Use Eclipse-Software to compile it ! +(Maybe there is still set "advanced Mem-leak-check" in the enviroment) +Export it as runnable JAR +run it "java -jar station-chat.jar" + +####################### How to run the Chat ############################ + +Station-Chat from Light has one problem, +It run on TCP, but SWG run on UDP. + +That problem is easy to solve, it is easier to change swg to talk TCP to the external chat as changing the chat to talk udp, because the udp is encrypted. We do not need that encryption as long as we run the swg-server and the station-chat in the same enviroment. That means as we do not run the chat for different games or on different swg-server as SOE did. + +Now how to change SWG to talk TCP on chat. + +copy the folder "TcpLibrary" from "src/external/3rd/library/soePlatform/CSAssist/utils/" to +"src/external/3rd/library/soePlatform/ChatAPI/utils" +_________________________________________ +Than change in "src/external/3rd/library/soePlatform/ChatAPI/utils/GenericAPI/GenericConnection.cpp" +from: using namespace UdpLibrary; +--- +to: using namespace TcpLibrary; +_________________________________________ +Change "src/external/3rd/library/soePlatform/ChatAPI/utils/GenericAPI/GenericConnection.h" +from: class GenericConnection : public TcpConnectionHandler +--- +to: class GenericConnection : public TcpLibrary::TcpConnectionHandler +_____ +from: virtual void OnRoutePacket(TcpConnection *con, const unsigned char *data, int dataLen); +from: virtual void OnTerminated(TcpConnection *con); +--- +to: virtual void OnRoutePacket(TcpLibrary::TcpConnection *con, const unsigned char *data, int dataLen); +to: virtual void OnTerminated(TcpLibrary::TcpConnection *con); +_____ +from: TcpManager *m_manager; +from: TcpConnection *m_con; +--- +to: TcpLibrary::TcpManager *m_manager; +to: TcpLibrary::TcpConnection *m_con; +___________________________________________ + +the most important change: +"src/external/3rd/library/soePlatform/ChatAPI/projects/ChatMono/CMakeLists.txt" + +add: ../../utils/TcpLibrary/Clock.cpp +add: ../../utils/TcpLibrary/Clock.h +add: ../../utils/TcpLibrary/IPAddress.cpp +add: ../../utils/TcpLibrary/IPAddress.h +add: ../../utils/TcpLibrary/TcpBlockAllocator.cpp +add: ../../utils/TcpLibrary/TcpBlockAllocator.h +add: ../../utils/TcpLibrary/TcpConnection.cpp +add: ../../utils/TcpLibrary/TcpConnection.h +add: ../../utils/TcpLibrary/TcpHandlers.h +add: ../../utils/TcpLibrary/TcpManager.cpp +add: ../../utils/TcpLibrary/TcpManager.h + +from: add_definitions(-DEXTERNAL_DISTRO -DNAMESPACE=ChatSystem -D_REENTRANT) +--- +to: add_definitions(-DEXTERNAL_DISTRO -DNAMESPACE=ChatSystem -D_REENTRANT -DUSE_TCP_LIBRARY) + +####################################################################################### + +Now compile +################################# +than set in your config: +[ChatServer] +registrarPort=5000 +gatewayServerPort=5001 +registrarHost=localhost +gatewayServerIP=localhost +########################### +No problem to change these ports or the "localhost" to any IP if you run the Station-chat on another box. +Be sure that you use that IP/port in the Station-chat-config, the IP and Port in station-config is used (registrar) +to tell swg where to find the chat. + + +######## run Chat, run SWG , have fun !!! ########### + +https://github.com/Rabiator1/SWG-Station-Chat +REPORT BOOKMARKLIKE + QUOTE REPLY +Grend, Scytale and Kosh like this. +Erusman +Erusman +Well-Known Member +Joined:May 9, 2016 +Messages:673 +Likes Received:298 +#2Erusman, Sep 26, 2016 Last edited: Sep 26, 2016 +Awesome work. Was wondering for quite some time how to use light chat repo. Yours looks promising. Cant wait to try it when i get home. Thanks for all your work +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#3Rabiator, Sep 27, 2016 +Got it running? +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#4Rabiator, Sep 28, 2016 +any feedback i would appreciate +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#5Rabiator, Sep 30, 2016 Last edited: Oct 3, 2016 +got the failover now full working :) +after shutdown and switch on the chat all Chatrooms re-created, all Chars are back in Channels and all Chars have back rights again(invite,admin,moderator,ban) +and they can straightaway write in there channels, include groupchat +Have to do some further tests and catch some rare scenarios +than i can upload new version.... +REPORT BOOKMARKLIKE + QUOTE REPLY +Erusman +Erusman +Well-Known Member +Joined:May 9, 2016 +Messages:673 +Likes Received:298 +#6Erusman, Oct 2, 2016 +Rabiator said: ↑ +got the failover now full working :) +after shutdown and switch on the chat all Chatrooms re-created, all Chars are back in Channels and all Chars have back rights again(invite,admin,moderator,ban)(bearbeitet) +and they can straightaway write in there channels, include groupchat +Have to do some further tests and catch some rare scenarios +than i can upload new version.... +Cool don't have time to compile with eclipse. So if you want to update and upload a final version that would be great. +The way I understand it. It would be a separate java executable that you would run. Connect to the swg server and update via its database. +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#7Rabiator, Oct 2, 2016 +Station-chat was allways on SOE a external chatsystem, because you were able to send mails and messages not only from one swg-server to another, you were able to send messages and mails to other games like Everquest. + +If you start swg , swg ask the registrar (included in station-chat here) where to find the external chat. +Than connect to the external chat. If you shutdown than the external chat, swg ask the registrar where to find another chat. +But swg going than in failover-mode and synchronize than with this other chat with temp cached data from swg itself and with the clients (mails,chatrooms, rights) so that the other chat can rebuild all internaly. +This process is the same as if you shutdown the chat and switch on again. + +Become that failover-process working is very important, else you have to restart swg everytime you shut down/switch on the external chat... +The other way is still not working...that means if you run the external chat and restart swg it doesnt resynchronize atm, you have to restart the chat also. +(that is not realy a problem because it need only seconds to restart the external chat) + +Maybe if i have all complete working on station-chat i will try to change it from java to C# ....on that way swg were a complete package....but as i sayed....maybe... +REPORT BOOKMARKLIKE + QUOTE REPLY +Scytale likes this. +Scytale +Scytale +Well-Known Member +Joined:May 9, 2016 +Messages:54 +Likes Received:7 +#8Scytale, Oct 3, 2016 +Nice work man, you really made it work in the end! +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#9Rabiator, Oct 4, 2016 +Now both ways working. +That means i can now shutdown/switch-on station-chat and that works (swg still running) +and i can also shutdown/switch-on swg-server and that works (station-chat still running) +For that I have build a "keepalive" that checks if swg-server is still running and if not it log out the chars... +Still alot to do on that because i have to remove all chars from all rooms also (is only needed at least that after alot of shutdown/switch-on of swg-server the memory not running full because the same chars would be several times in the chatroom ) +But i want to do it right! +REPORT BOOKMARKLIKE + QUOTE REPLY +Scytale likes this. +Erusman +Erusman +Well-Known Member +Joined:May 9, 2016 +Messages:673 +Likes Received:298 +#10Erusman, Oct 5, 2016 +Awesome job man. I believe you are the only one to take the chat src that far. +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#11Rabiator, Oct 5, 2016 +Thx, you may right, i think even cross-server messaging/mails should work (i will test this later and connect a second swg to the chat) +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#12Rabiator, Oct 5, 2016 +see above +"-- If a char leaveRoom or logout all left chars in that channel do not see the leave" + +Fixed both now +REPORT BOOKMARKLIKE + QUOTE REPLY +Erusman +Erusman +Well-Known Member +Joined:May 9, 2016 +Messages:673 +Likes Received:298 +#13Erusman, Oct 6, 2016 +Cool man can you post a complete version when you get a change or PM with it. Would like to add it to the next win32 prebuilt if that is ok with you? +Compiling new version that should clean up a lot of those nonsense warning errors etc. +Thanks! +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#14Rabiator, Oct 6, 2016 +I allready planed to upload it here if ready +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#15Rabiator, Oct 11, 2016 +Fixed the problem that a deleted channel now vanish immediatly after the delete and not as before, after it timed out. +One major-problem still exist...after logout/login char, there is no autojoin channels where the char was in before the logout (except groupchat...maybe guildchat also autojoin but not tested yet) +Than there exist some minor problems to fix like imperial players can join rebel-channels +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#16Rabiator, Oct 11, 2016 +i looked into the code and enter imperial rooms as a rebel and vice versa is a problem that swg itself should solve, but not do atm,. Its not a task the station-chat should do. +The game-server should check this. + +src\engine\server\application\ConnectionServer\src\shared\ClientConnection.cpp +// ChatEnterRoom and ChatEnterRoomById needs to go to the game server to determine +// if the character is not allowed to enter the room because of game rule restrictions; +// only if that test pass do we forward the message on to the chat server to request +// to enter the room +and in src\engine\server\library\serverGame\src\shared\network\Chat.cpp +// player must be of the correct faction to enter the factional chat rooms +static std::string s_imperialChatRoom = getGameCode() + "." + instance().m_serverAvatar->cluster + "." + ChatRoomTypes::ROOM_IMPERIAL; +static std::string s_rebelChatRoom = getGameCode() + "." + instance().m_serverAvatar->cluster + "." + ChatRoomTypes::ROOM_REBEL; +REPORT BOOKMARKLIKE + QUOTE REPLY +Kosh likes this. +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#17Rabiator, Oct 13, 2016 Last edited: Oct 13, 2016 +fixed GroupChat, where chars were able to write even if the group disbanded +GuildChat also +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#18Rabiator, Oct 15, 2016 +ahh cross-server works, need a little bit work to sort it out but...mail is working, tell atm not, but atm both swg-server see chatrooms from the other server + +[​IMG] +REPORT BOOKMARKLIKE + QUOTE REPLY +Grend, Erusman and Scytale like this. +Scytale +Scytale +Well-Known Member +Joined:May 9, 2016 +Messages:54 +Likes Received:7 +#19Scytale, Oct 15, 2016 +As usual,impressive works Rab. Thank you for looking into this +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#20Rabiator, Oct 15, 2016 Last edited: Oct 16, 2016 +Thanks man :) +cross-server tell now working also :) +cross-server addFriend works also :) +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#21Rabiator, Oct 19, 2016 +Cross-server now works fully, that means instant-messaging and tell as well as addFriend between different swg-servers. +Station-chat updated that it can handle now up to 10 swg-server. +I need to rebuild now the keepAlive that it also work for 10 server, that station-chat recognize if a swg-server is down or not reachable. +REPORT BOOKMARKLIKE + QUOTE REPLY +Grend +Grend +Well-Known Member +Joined:May 28, 2016 +Messages:106 +Likes Received:14 +#22Grend, Oct 19, 2016 +wohoo really nice, i can't test now but i love how far is going this whole project. Love this!! +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#23Rabiator, Oct 22, 2016 +KeepAlive now works for 10 server, autologout the users connected to the disconnected cluster and clean the roomMap +Today or tommorow i clean up the chat and uploading it here, maybe also on git. +That should the first "final" + +Maybe after that i build in a cross-station-chat-connection so that different station-chats can connect to other station-chats for cross-server-tells/mails... +And maybe i change the whole system to use UDP so that SWG do not need any change to connect to the Station-chat. +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#24Rabiator, Oct 23, 2016 Last edited: Oct 23, 2016 +Final is ready :) +but i can not upload it here??? +Error occured.... +I also tried to replace it on my first post....so i deleted the old one... + +The following error occurred +There was a problem uploading your file. + +StationChat.rar +use this + +https://github.com/Rabiator1/SWG-Station-Chat +REPORT BOOKMARKLIKE + QUOTE REPLY +Erusman +Erusman +Well-Known Member +Joined:May 9, 2016 +Messages:673 +Likes Received:298 +#25Erusman, Oct 23, 2016 +Rabiator said: ↑ +Final is ready :) +but i can not upload it here??? +Error occured.... +I also tried to replace it on my first post....so i deleted the old one... +Might be a limit on how much you can upload? +You can send it to me and ill upload it to my google drive and post it for you if you want. +REPORT BOOKMARKLIKE + QUOTE REPLY +Rabiator +Rabiator +Well-Known Member +Joined:Sep 25, 2016 +Messages:90 +Likes Received:30 +#26Rabiator, Oct 23, 2016 +allready done on : +https://github.com/Rabiator1/SWG-Station-Chat +REPORT BOOKMARKLIKE + QUOTE REPLY +Scytale likes this. +Write your reply... + +Write your reply... + + +Users Who Are Viewing This Thread (Users: 1, Guests: 0) +Users Who Have Read This Thread (Total: 0) +Share This Page + ABOUT US +Community for sharing and guides on how to get a SWG Server up and running. Our goal is to allow people to share information freely and publicly and to preserve that information. + + QUICK JUMP +Home +About +Forums +Downloads + USEFUL LINKS +Alpha +Delta +Omega + REGULATIONS +Forum software by XenForo™ ©2010-2017 XenForo Ltd. + + + +SWGSource +Home +Help +Terms and Rules + +=============================================================== \ No newline at end of file