]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
IRC: clean up on engine shutdown
authorJānis Rūcis <parasti@gmail.com>
Wed, 31 Mar 2010 00:19:51 +0000 (03:19 +0300)
committerJānis Rūcis <parasti@gmail.com>
Sun, 27 Jun 2010 12:23:20 +0000 (15:23 +0300)
host.c
irc.c
irc.h

diff --git a/host.c b/host.c
index 605852b625bf6f3e031aaa90f9259135fe078c80..bb9bf1c450cc6e6d4744cef6e463e63d93d3f55d 100644 (file)
--- a/host.c
+++ b/host.c
@@ -1280,6 +1280,7 @@ void Host_Shutdown(void)
        CDAudio_Shutdown ();
        S_Terminate ();
        Curl_Shutdown ();
+       IRC_Shutdown ();
        NetConn_Shutdown ();
        //PR_Shutdown ();
 
diff --git a/irc.c b/irc.c
index e9050574e080c560a452dca8ff8dd40ce0f80250..088f7ffd6a8880a9ef18cb88fca883d608b3098c 100644 (file)
--- a/irc.c
+++ b/irc.c
@@ -359,3 +359,8 @@ void IRC_Init(void)
        Cmd_AddCommand("ircdisconnect", IRC_Disconnect_f, "disconnect from an IRC server");
        Cmd_AddCommand("irc", IRC_IRC_f, "send raw messages to a connected IRC server");
 }
+
+void IRC_Shutdown(void)
+{
+       IRC_Disconnect();
+}
diff --git a/irc.h b/irc.h
index e49e3f257c9847f502ad1287ce61dfaaa2f3042c..98f9262284015401b2b5decec96aee8cfa034f39 100644 (file)
--- a/irc.h
+++ b/irc.h
@@ -3,5 +3,6 @@
 
 void IRC_Init(void);
 void IRC_Frame(void);
+void IRC_Shutdown(void);
 
 #endif