DisconnectAlert shows connection status and plays a sound when the server stops answering - usually in < 0.5 s, but no longer than ~3s.
The addon was mainly intended for Hardcore servers. The main purpose was to detect "silent" disconnects where your game client may not know that you have been disconnected for a minute of two. In the case of a "normal" disconnect where you just lose the internet connection, this addon can still warn you a few seconds before your game client kicks you out to the login screen.
/dcalert for list of commands
Alt+Left Click to drag
--------------------------------------------------------------------------------------------------
This addon detects disconnects and displays the connection status.
It does so by sending two requests:
1. RequestRaidInfo() - sent ~2 times a second.
2. NotifyInspect("player") - sent 1 time every 3 seconds.
Both of these requests are supposed to get a reply from the server. If reply doesn't arrive within a certain time period, the status is changed to "Disconnected". If a reply comes back after 300ms, it shows a warning of "High ping".
So, in the "usual" disconnect you would get a warning in ~0.5 seconds, and in the worst case you should get a warning in ~3 seconds (such as when you can run around for a minute or two without suspecting that you've been disconnected). Unfortunately, NotifyInspect is throttled after ~6 requests per 10 seconds, so 1 request every 3 seconds was chosen to be extra safe.
--------------------------------------------------------------------------------------------------
The idea behind utilizing 2 different requests instead of just one is the following:
There are essentially 2 connections within the game server, Home and World.
Home refers to your connection to your realm server. This connection sends chat data, auction house stuff, guild chat and info, some addon data, and various other data.
World is a reference to the connection to our servers that transmits all the other data... combat, data from the people around you (specs, gear, enchants, etc.), NPCs, mobs, casting, professions, etc.
(source)
This leads to 2 types of disconnects possible. First, during which chat doesn't work, but you can move around, cast spells and see other players move around (this has happened on Soulseeker EU during DDoS attack on 29.07.2025).
And second, during which you can see and use chat, but everybody else but you is running in place.
As per early addon users feedback, just using RequestRaidInfo() did not result in a Disconnected status in the case of Type 2 disconnect, which led me to believe that RequestRaidInfo() uses Home connection.
So to take this into account, NotifyInspect("player") is used to detect Type 2. I am not 100% certain that this uses the World connection, but I guess you wouldn't be able to inspect other players when disconnected from the World. Unfortunately I am not able to emulate disconnects, so this will have to be tested in the field.
--------------------------------------------------------------------------------------------------
If you can make the addon look prettier, improve it or suggest a replacement for NotifyInspect("player"), please feel free to do so.
--------------------------------------------------------------------------------------------------
If you have any feedback, please feel free to share it with me and I will do my best to improve the code.