+GLOBAL BOOLEAN
+IRC_DISCONNECT(CLIENT *Client, REQUEST *Req )
+{
+ /* Disconnect and disable configured server */
+
+ CONN_ID my_conn;
+
+ assert( Client != NULL );
+ assert( Req != NULL );
+
+ /* Not a local IRC operator? */
+ if(( ! Client_HasMode( Client, 'o' )) || ( ! Client_OperByMe( Client ))) return IRC_WriteStrClient( Client, ERR_NOPRIVILEGES_MSG, Client_ID( Client ));
+
+ /* Bad number of parameters? */
+ if( Req->argc != 1 ) return IRC_WriteStrClient( Client, ERR_NEEDMOREPARAMS_MSG, Client_ID( Client ), Req->command );
+
+ Log( LOG_NOTICE|LOG_snotice, "Got DISCONNECT command from \"%s\" for0 \"%s\".", Client_Mask( Client ), Req->argv[0]);
+
+ /* Save ID of this connection */
+ my_conn = Client_Conn( Client );
+
+ /* Connect configured server */
+ if( ! Conf_DisableServer( Req->argv[0] )) return IRC_WriteStrClient( Client, ERR_NOSUCHSERVER_MSG, Client_ID( Client ), Req->argv[0] );
+
+ /* Are we still connected or were we killed, too? */
+ if( Client_GetFromConn( my_conn )) return CONNECTED;
+ else return DISCONNECTED;
+} /* IRC_CONNECT */
+
+