Universal Server to server chat

Discussion in 'Plugin Requests' started by [X] Meep, Aug 9, 2015.

  1. I have 2 servers on the same box, 2 different game modes. I would like the chat visible at another server though

    Example

    @Server1 : Hey guys whats up
    -->Chat sent to server 2
    @Server2 : Not much
    -->Chat Sent to server 1
     
  2. Wulf

    Wulf Community Admin

    You'd most likely have to have a website or database in-between both serving as mediator.
     
  3. Needs to be as light as possible. I didnt want to run SQL just to handle this. It cant be written to a file and read by another server? Web request adds unreasonable amount of server load to Rust
     
  4. Wulf

    Wulf Community Admin

    I don't think there is any other way to handle it other than web requests.
     
  5. Fine then...

    *Punches old lady nextdoor* *Goes to court* *blames Wulf*
     
  6. Wulf

    Wulf Community Admin

    :p

    The only other way I can see it MIGHT working, is if you were able to store a file on the server on the same machine, but pretty sure we limit each server to the Oxide directory, aside from what Rust has available for logging.
     
  7. I think it's possible to create another server for messages (via plugin). But you need to open another port for it.
     
  8. Wulf

    Wulf Community Admin

    Pretty sure you'd need an extension in order to do that, as I don't think plugins will be able to access any of that.
     
  9. As Wulf said you need the mediator or direct connection between two plugins. There are many methods of communicating between 2 processes, but most straightforward and supported by oxide is web requests.
     
  10. If you have access to the servers file system and are allowed to create symlinks, you could create a file for both servers that are symlinked to a single file on the server. Thus if all goes well your two servers could read and write to the same file using the symlinked files residing in the server directory. Not sure how Rust handles opening a file which is opened in another Rust instance though.
     
  11. How would I go about doing this. Why kinda load would it put on the servers?
     
  12. Wulf is it possible to use stuff from System.IO.Pipes? Named pipes would be an easy way to implement this without having to use webrequests.
     
  13. Wulf

    Wulf Community Admin

    No, we block System.IO access to prevent malicious use.
     
  14. On UNIX systems a command like `ln -s file1 file2` should make `file1` a link to `file2`. Not sure how Windows handles this. Many UNIX applications by default make use of symlinks (e.g. a global binary `/usr/bin/php` is symlinked to execute a certain version of the PHP binaries that are located elsewhere), but constant writing/reading to symlinked files is something I have no knowledge about. :S
     
  15. I don't think Windows has symlinks........

    That said, if you ask nicely maybe the Oxide team would be nice enough to wrap the Named pipe stuff and allow you to use that :)
     
  16. Wulf

    Wulf Community Admin

    It does, I symlink my plugins to my git repo. ;)

    We can't really grant plugins access to place files anywhere on the system, so I'm not sure how we could allow you to use any of System.IO.
     
  17. That would be bad ass, I would love that but I would have to also have the rest of the stuff done too... I have no idea what I am doing with most of this , I am still lorning.
     
  18. I don't think you get to chose where the named pipe goes and heck I'm not even sure they use a file at all, so I see zero potential for abuse here. Then again this is a very specific use case, the kind of feature that probably would be used by this mod alone.
     
  19. Wulf

    Wulf Community Admin

    I'll ask the others, but I think the concern is allowing something that depends on another.
     
  20. Couldnt you use the IRC system?
    [DOUBLEPOST=1439634261][/DOUBLEPOST]oh and Windows + symlins = junctions (mklink /J Source Target)