summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-06-28 13:16:55 -0400
committerAdam <Adam@anope.org>2010-06-28 13:16:55 -0400
commit147c58bd321b6361ccda5c51fe9c3664a8450a12 (patch)
tree74536ab1a63cb739906c24bf0373a7c7db627da3 /src/main.c
parent77ec1f2fa774ac213638d2e317c3d731b42f12ef (diff)
Delete all of our known users when we lose connection to the uplink
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 8ffc8df13..32896282d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -557,6 +557,15 @@ int main(int ac, char **av, char **envp)
{
FOREACH_MOD(I_OnServerDisconnect, OnServerDisconnect());
+ /* Clear all of our users */
+ User *u = firstuser();
+ while (u)
+ {
+ User *unext = nextuser();
+ delete u;
+ u = unext;
+ }
+
unsigned j = 0;
for (; j < (Config.MaxRetries ? Config.MaxRetries : j + 1); ++j)
{