]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/conf.c
Fix return code of Conf_EnableServer()
[ngircd-alex.git] / src / ngircd / conf.c
index 71f5760bd59dede7c58903f6bd98a41c8a262c06..eccf13cc3edec2a78d533287c2d92a18ce2345ce 100644 (file)
@@ -387,7 +387,7 @@ Conf_GetServer( CONN_ID Idx )
 
 
 GLOBAL bool
-Conf_EnableServer( char *Name, UINT16 Port )
+Conf_EnableServer( const char *Name, UINT16 Port )
 {
        /* Enable specified server and adjust port */
 
@@ -400,7 +400,7 @@ Conf_EnableServer( char *Name, UINT16 Port )
                        /* Gotcha! Set port and enable server: */
                        Conf_Server[i].port = Port;
                        Conf_Server[i].flags &= ~CONF_SFLAG_DISABLED;
-                       return true;
+                       return (Conf_Server[i].port && Conf_Server[i].host[0]);
                }
        }
        return false;
@@ -426,7 +426,7 @@ Conf_EnablePassiveServer(const char *Name)
 
 
 GLOBAL bool
-Conf_DisableServer( char *Name )
+Conf_DisableServer( const char *Name )
 {
        /* Enable specified server and adjust port */
 
@@ -447,7 +447,7 @@ Conf_DisableServer( char *Name )
 
 
 GLOBAL bool
-Conf_AddServer( char *Name, UINT16 Port, char *Host, char *MyPwd, char *PeerPwd )
+Conf_AddServer( const char *Name, UINT16 Port, const char *Host, const char *MyPwd, const char *PeerPwd )
 {
        /* Add new server to configuration */
 
@@ -481,7 +481,7 @@ Conf_AddServer( char *Name, UINT16 Port, char *Host, char *MyPwd, char *PeerPwd
  * Check if the given nick name is an service
  */
 GLOBAL bool
-Conf_IsService(int ConfServer, char *Nick)
+Conf_IsService(int ConfServer, const char *Nick)
 {
        return MatchCaseInsensitive(Conf_Server[ConfServer].svs_mask, Nick);
 } /* Conf_IsService */