Git Product home page Git Product logo

chat's Introduction

Important Notice

As of 6/28/2022 this repository is no longer being publicly maintained. Code in it's current state is left for historic preservation, but will no longer be receiving updates, security patches, or support.

Licensing inquiries can be submitted via email to [email protected]

The Destiny Chat Back-End

The chat back-end for destiny.gg, written in Go, based on Golem (http://github.com/trevex/golem)

Licensed under the Apache License, Version 2.0

http://www.apache.org/licenses/LICENSE-2.0.html

This is my (sztanpet's) first not-so-tiny Go project, so if there is anything that could be improved, please do tell.

How to Build & Run

  1. Clone this repo.
$ git clone https://github.com/destinygg/chat.git
  1. Navigate into the project folder.
$ cd chat
  1. Download all dependencies.
$ go mod download
  1. Verify dependency checksums to ensure nothing fishy is going on.
$ go mod verify
  1. Build the binary.
$ go build -o chat
  1. Run the binary.
$ ./chat

If a settings.cfg file doesn't exist, one will be created on first run. Modify it to your liking and run the binary again when done.

chat's People

Contributors

11k avatar cene-co-za avatar hayksaakian avatar iliedaboutcake avatar sztanpet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chat's Issues

refreshuser crashes

probably need to lock the whole hub while updating the user and namescache

Reap/Close old connections when max connection count is hit

Due to firefox tabs continually crashing on me, I quickly hit the 5 connection count cap (https://github.com/destinygg/chat/blob/master/connection.go#L138).

Rather than outright rejecting new connections, would it make sense to close old connections (resetting to 0) and allowing new connections?

I'd be perfectly willing to put in a patch/PR should anyone have any input on this.

ian@home ~ $ netstat | awk '/destiny/'
tcp        0      0 192.168.1.4:53654       destiny.gg:https        ESTABLISHED
tcp        0      0 192.168.1.4:54422       destiny.gg:https        ESTABLISHED
tcp        0      0 192.168.1.4:54232       destiny.gg:https        ESTABLISHED
tcp        0      0 192.168.1.4:54588       destiny.gg:https        ESTABLISHED
tcp        0      0 192.168.1.4:53466       destiny.gg:https        ESTABLISHED

window resizes too far in chat-left view while chat is bottom-docked

I'm getting really bothered by something really small and trying to learn some coding at the same time.

thank you for your patience

Description

The way I position my broswer windows causes the #chat-panel element to place its #chat-panel-resize-bar juuuuust offscreen. This then forces my browser to draw a horizontal scrollbar and I find that simply unacceptable and visually distracting. From what I can tell the placement and width of the resize bar (only while the #chat-panel element is of class 'chat-left') ends up just outside the max-width of the page since its placed all the way to the right and then draws itself outwards(?).

All and all this is not a big deal but its bothering me enough to mention it.

How to reproduce:

  • works in chrome, firefox, edge, and firefox mobile browser emulator
  • go to dgg bigscreen view
  • zoom the page in or resize the window until the chat snaps to the bottom
  • press the 'Swap' chat toolbar button so that the #chat-panel is in its #chat-left state
  • this should procue a horizontal scrollbar that needs to be scrolled to the right in order to touch the resize-bar.

Solutions

  • resize the window until the chat pops back into the left/right spit.
  • if you're in the top/down split view, just press the 'Swap' button
  • I wrote a userscript that removes the entire element. This was truly unneccessary but it was kinda fun to investigate.
    image

Chat stops retrieving new messages after a short period of time

After about 30 seconds new chats on Destiny.gg/Bigscreen stop appearing and require a manual chat reload. When trying to post a chat, it says "Disconnected, retry in 1 seconds ..." and doesn't post. The errors I am seeing on the console are related to content security policy and 1321[Violation] Added non-passive event listener to a scroll-blocking event. Consider marking event handler as 'passive' to make the page more responsive. See

Ability to add highlighting with no authentication

Would appreciate the ability to do a https://www.destiny.gg/embed/chat?highlight=dan without being signed into the chat.

OBS allows me to add a custom dock url and I use this to embed dgg chat. However, It does not enable highlighting on my name.

To clarify, loading https://www.destiny.gg/embed/chat?highlight=dan would simply enable highlighting for that term, even if not logged in.

Stupid feature I know and certainly nor priority, but if its easy to do I would appreciate it.

offline ipbans

store the last N seen ips of the user under a redis set keyed by the userid, ban those ips if the user is offline
maybe make a lua script to make a circular buffer atomically

how to i get it working?

Im pretty noob with programming and shit, but somehow i managed to get the website working with the given instructions, but now how do i setup this chat? can you give me a little help? (im testing it local on Windows).

Im sry its not really an Issue, but i didnt fond another way to contact.

IRC

Can it connect to IRC server?My irc server runs websocket module.

add support for websockets via flash fallback

The WebView of android devices pre 4.4 does not support web sockets.

This prevents chat from working in an android app I'm working on for destinys stream -- for the vast majority of android users.

The solution is to use flash web sockets on the front end.

See

https://github.com/trevex/golem/wiki/Using-flash-as-WebSocket-fallback

This will fix the problem because android devices that are older than v 4.4 DO support flash in their web views.

This has the added benefit of allowing super old desktop browsers to work with the chat.

Unable to connect to Destiny.gg chat from school wifi

The Destiny.gg chat will load previous posts, but fails on connecting and reconnect attempts while I am on my school's wifi.

The wifi here is not super strict, as I can stream Twitch and Youtube at pretty decent quality. Just can not connect to chat :(

Links unclickable when emote overlaps even slightly

When a user posts a link along with an emote, given the link is long enough or there's enough text to space it out and make the message multi-line, if the emote overlaps the link anywhere in the slightest it makes the link unclickable (applies to all links (generic/nsfw/nsfl)).

fdas

OS: Windows 8 Pro 6.2.9200 (x64)
Browser: Chromium 44.0.2379.0 (x64)
Java: 1.8.0_40 & 1.7.0_55 (x86)
Flash: 17.0.0.149 (x86)

Chat does not work in Steam Big Picture web browser

Screenshot:
big picture chat

The navigator.userAgent returns: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; Valve Steam Tenfoot/1373418487; ) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Safari/535.19

The text input field of the chat can be typed in, but submitting it doesn't send the message to chat (checked with another browser open). Also, as you can see, you can't see the rest of chat. Settings and Users also don't have any effect.

Signing in with Twitter

I can't seem to sign-in with Twitter for some reason out of no where. Just today I can't. It redirects me instead. I am subbed with that account.

Can't whisper "0"

if you type "/w CeneZa 0" or type "0" into the one on one whisper chat you get the following error:
"Required field missing message"

Enabling or disabling time-stamping disables messages from being sent

enabling/disabling the "Show time for messages" setting stops me from sending a message. If I want to send a message I must refresh (Windows 7, Chrome 29.0.1547.62m and Firefox 23.0.1 [on a different account]), nothing major but @sztanpet told me to submit bug report so here you go.

I can still type into the message box, but 'Enter' does not send the message and neither does the 'Send' button.

Chat doesnt work on Firefox 35?

Nothing in chat works on firefox 35.0.1. It just a blank screen. Video will load, but you cant press any buttons in chat and nothing is scrolling. You can hover buttons and they will turn white, but nothing pops up. Works in other browsers just fine.

Jump to chat with keyboard combination

When you click on the twitch player for any reason (volume, quality change, etc.) your cursor is no longer in chat to type. Ideally, there would be a keyboard/button combination that lets you jump straight to the chat line so that you can continue typing in chat, similar to Ctrl+L or Command+L in your browser.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.