Raised This Month: $32 Target: $400
 8% 

[ANY] Webchat through websocket


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Plugin ID:
5387
Plugin Version:
1.0
Plugin Category:
General Purpose
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Display the chat directly on your website using websocket.
    Old 10-27-2016 , 13:13   [ANY] Webchat through websocket
    Reply With Quote #1

    [ANY] Webchat through websocket



    The title is pretty much enough but I want to add some extra informations. The webscript MAY NOT work on Internet Explorer. Sorry 'bout that. I don't develop the web socket :/.

    Also, If you want to know why I didn't usued database, check the thread below :

    Original idea :
    https://forums.alliedmods.net/showthread.php?t=285246 and https://forums.alliedmods.net/showthread.php?t=289316


    The list of features, feel free to request anything, it's not finished :
    • Quick connection between website <-> server.
    • Using Steam nickname.
    • Easy to configure
    • WEEEEEEEEEEEEEB IIIIIIIIINTERFACE :3
    • Drag'n'drop installation (at least for the plugin.)



    >>> BEFORE INSTALLING ANYTHING UPDATE / INSTALL WEBSOCKET
    [HERE]

    1) Download the SMX file.
    2) Put the smx file in the PLUGINS folder and load it by reloading the map or the server.
    3) Download the ZIP file wich contains the website.
    4) Extract the ZIP file somewhere on your PC.
    5) Find the SteamConfig.php file located in the WEBINTERFACE/libraries/steamauth folder.
    6) Open it with your favorite text editor and change the content of the API key field.
    Code:
    $steamauth['apikey'] = "PUT API KEY HERE"; // Your Steam WebAPI-Key found at http://steamcommunity.com/dev/apikey
    7) Save and close the file
    8) Now, open chat.js, it's in the JS directory. Find line 4. Edit it with your game server IP. For exemple : myawesometf2server.com:1000
    Code:
    //EDIT THIS LIST !
    var servers = ["myawesometf2server.com:7897", "server2.tf:7897", "Ihavenomorenameidea.ch:7897"];
    var EnableChat = true; //true = allow chat | false = disable chat
    9) Save and close the file
    10) Upload the WEBINTERFACE content somewhere in your website. (You can use XAMPP if needed)
    11) You are done !


    No commands D:


    sm_wcr_websocket_port 7897
    Set the websoket port that should be usued for the website connection.


    No bugs :3


    None found yet.


    Demo website :
    http://tf2serverofarkarr.ddns.net/websocket/
    And YES! The website is ugly, and NO I won't update it now.



    See attached files.

    Enjoy !

    Logs :
    Spoiler
    Attached Files
    File Type: sp Get Plugin or Get Source (WebsiteChatRelay.sp - 543 views - 3.5 KB)
    File Type: smx WebsiteChatRelay.smx (6.1 KB, 472 views)
    File Type: zip WEBINTERFACE.zip (822.4 KB, 487 views)
    __________________
    Want to check my plugins ?

    Last edited by Arkarr; 11-08-2016 at 12:54.
    Arkarr is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 10-27-2016 , 13:18   Re: [ANY] Webchat through websocket
    Reply With Quote #2

    2016 - Internet explorer

    Hopefully we don't have to worry about that

    Nice release, can't wait to test it out in a few hours!
    __________________
    sneaK is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 10-27-2016 , 13:20   Re: [ANY] Webchat through websocket
    Reply With Quote #3

    Quote:
    Originally Posted by blackhawk74 View Post
    2016 - Internet explorer

    Hopefully we don't have to worry about that

    Nice release, can't wait to test it out in a few hours!
    I usued to work with Internet Explorer. Am I a bad person D: ?

    Anyway, thanks!
    __________________
    Want to check my plugins ?
    Arkarr is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 10-27-2016 , 17:56   Re: [ANY] Webchat through websocket
    Reply With Quote #4

    What about IE? Is it a problem with the websocket server or your code?
    __________________
    Peace-Maker is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 10-28-2016 , 00:45   Re: [ANY] Webchat through websocket
    Reply With Quote #5

    Quote:
    Originally Posted by Peace-Maker View Post
    What about IE? Is it a problem with the websocket server or your code?
    Internt Explorer doesn't support Web socket I believe. At least I don't think it's implemented yet. Maybe it works on Edge.

    EDIT: I rushed the release of this plugin. It's not that great right now. Web interface is being rebuild, I'm rewriting part of the plugin as well. Also, thanks for your extension !
    __________________
    Want to check my plugins ?

    Last edited by Arkarr; 10-28-2016 at 00:47.
    Arkarr is offline
    juss
    Senior Member
    Join Date: Jan 2016
    Old 10-28-2016 , 03:45   Re: [ANY] Webchat through websocket
    Reply With Quote #6

    What about adding multiple servers? - one chat for multiple servers
    juss is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 10-28-2016 , 05:35   Re: [ANY] Webchat through websocket
    Reply With Quote #7

    Quote:
    Originally Posted by juss View Post
    What about adding multiple servers? - one chat for multiple servers
    Duuuuh. I'm stupid. Of course this should be added. I'm rescripting the website (better design and functionality) so feel free to throw idea before I'm not motivated anymore.
    __________________
    Want to check my plugins ?
    Arkarr is offline
    nguyenbaodanh
    AlliedModders Donor
    Join Date: Jun 2007
    Location: HCMC, Vietnam
    Old 10-28-2016 , 06:28   Re: [ANY] Webchat through websocket
    Reply With Quote #8

    Quote:
    Loading chat...
    <Error> : undefined
    Disconnected - status 3 Code: 1006. Reason:
    have problem on this ... all setup are correct
    __________________
    nguyenbaodanh is offline
    Arkarr
    Veteran Member
    Join Date: Sep 2012
    Location: Just behind my PC screen
    Old 10-28-2016 , 07:27   Re: [ANY] Webchat through websocket
    Reply With Quote #9

    Quote:
    Originally Posted by nguyenbaodanh View Post
    have problem on this ... all setup are correct
    And yet, it doesn't work. Check your ports, 1000 must be opened.

    EDIT:
    You should definitly wait for the new update. I promise lot of things will be easier.
    __________________
    Want to check my plugins ?

    Last edited by Arkarr; 10-28-2016 at 07:42.
    Arkarr is offline
    Maliwolf
    Member
    Join Date: Jul 2015
    Old 10-28-2016 , 08:41   Re: [ANY] Webchat through websocket
    Reply With Quote #10

    It seems to only work in Firefox for me. Chrome and Edge give the error "Disconnected - status 3 Code: 1006. Reason:"
    Maliwolf is online now
    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 04:38.


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