Add missing comments, streamline wording, and remove references to the
RFCs: this will be added to ./doc/Commands.txt with an other patch and
we want to avoid redundancy ...
+/**
+ * Handler for the IRC command "ADMIN".
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
+ */
GLOBAL bool
IRC_ADMIN(CLIENT *Client, REQUEST *Req )
{
GLOBAL bool
IRC_ADMIN(CLIENT *Client, REQUEST *Req )
{
return CONNECTED;
} /* IRC_ADMIN */
return CONNECTED;
} /* IRC_ADMIN */
/**
* Handler for the IRC command "INFO".
/**
* Handler for the IRC command "INFO".
- * See RFC 2812 section 3.4.10.
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
*/
GLOBAL bool
IRC_INFO(CLIENT * Client, REQUEST * Req)
*/
GLOBAL bool
IRC_INFO(CLIENT * Client, REQUEST * Req)
return CONNECTED;
} /* IRC_INFO */
return CONNECTED;
} /* IRC_INFO */
/**
* Handler for the IRC "ISON" command.
*
/**
* Handler for the IRC "ISON" command.
*
- * See RFC 2812, 4.9 "Ison message".
- *
* @param Client The client from which this command has been received.
* @param Req Request structure with prefix and all parameters.
* @return CONNECTED or DISCONNECTED.
* @param Client The client from which this command has been received.
* @param Req Request structure with prefix and all parameters.
* @return CONNECTED or DISCONNECTED.
return IRC_WriteStrClient(Client, rpl, Client_ID(Client));
} /* IRC_ISON */
return IRC_WriteStrClient(Client, rpl, Client_ID(Client));
} /* IRC_ISON */
/**
* Handler for the IRC "LINKS" command.
*
/**
* Handler for the IRC "LINKS" command.
*
- * See RFC 2812, 3.4.5 "Links message".
- *
* @param Client The client from which this command has been received.
* @param Req Request structure with prefix and all parameters.
* @return CONNECTED or DISCONNECTED.
* @param Client The client from which this command has been received.
* @param Req Request structure with prefix and all parameters.
* @return CONNECTED or DISCONNECTED.
Client_ID(from), mask);
} /* IRC_LINKS */
Client_ID(from), mask);
} /* IRC_LINKS */
+/**
+ * Handler for the IRC "LUSERS" command.
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
+ */
GLOBAL bool
IRC_LUSERS( CLIENT *Client, REQUEST *Req )
{
GLOBAL bool
IRC_LUSERS( CLIENT *Client, REQUEST *Req )
{
return CONNECTED;
} /* IRC_LUSERS */
return CONNECTED;
} /* IRC_LUSERS */
/**
* Handler for the IRC command "SERVLIST".
/**
* Handler for the IRC command "SERVLIST".
- * List registered services, see RFC 2811, section 3.5.1: the syntax is
- * "SERVLIST [<mask> [<type>]]".
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
*/
GLOBAL bool
IRC_SERVLIST(CLIENT *Client, REQUEST *Req)
*/
GLOBAL bool
IRC_SERVLIST(CLIENT *Client, REQUEST *Req)
Req->argc > 1 ? Req->argv[1] : "0");
} /* IRC_SERVLIST */
Req->argc > 1 ? Req->argv[1] : "0");
} /* IRC_SERVLIST */
+/**
+ * Handler for the IRC command "MOTD".
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
+ */
GLOBAL bool
IRC_MOTD( CLIENT *Client, REQUEST *Req )
{
GLOBAL bool
IRC_MOTD( CLIENT *Client, REQUEST *Req )
{
return IRC_Show_MOTD( from );
} /* IRC_MOTD */
return IRC_Show_MOTD( from );
} /* IRC_MOTD */
+/**
+ * Handler for the IRC command "NAMES".
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
+ */
GLOBAL bool
IRC_NAMES( CLIENT *Client, REQUEST *Req )
{
GLOBAL bool
IRC_NAMES( CLIENT *Client, REQUEST *Req )
{
return IRC_WriteStrClient( from, RPL_ENDOFNAMES_MSG, Client_ID( from ), "*" );
} /* IRC_NAMES */
return IRC_WriteStrClient( from, RPL_ENDOFNAMES_MSG, Client_ID( from ), "*" );
} /* IRC_NAMES */
/**
* Handler for the IRC command "STATS".
/**
* Handler for the IRC command "STATS".
- * See RFC 2812 section 3.4.4.
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
*/
GLOBAL bool
IRC_STATS( CLIENT *Client, REQUEST *Req )
*/
GLOBAL bool
IRC_STATS( CLIENT *Client, REQUEST *Req )
Client_ID(from), query);
} /* IRC_STATS */
Client_ID(from), query);
} /* IRC_STATS */
/**
* Handler for the IRC command "SUMMON".
/**
* Handler for the IRC command "SUMMON".
- * See RFC 2812 section 4.5. ngIRCd doesn't implement this functionality and
- * therefore answers with ERR_SUMMONDISABLED.
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
*/
GLOBAL bool
IRC_SUMMON(CLIENT * Client, UNUSED REQUEST * Req)
*/
GLOBAL bool
IRC_SUMMON(CLIENT * Client, UNUSED REQUEST * Req)
Client_ID(Client));
} /* IRC_SUMMON */
Client_ID(Client));
} /* IRC_SUMMON */
+/**
+ * Handler for the IRC command "TIME".
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
+ */
GLOBAL bool
IRC_TIME( CLIENT *Client, REQUEST *Req )
{
GLOBAL bool
IRC_TIME( CLIENT *Client, REQUEST *Req )
{
return IRC_WriteStrClient( from, RPL_TIME_MSG, Client_ID( from ), Client_ID( Client_ThisServer( )), t_str );
} /* IRC_TIME */
return IRC_WriteStrClient( from, RPL_TIME_MSG, Client_ID( from ), Client_ID( Client_ThisServer( )), t_str );
} /* IRC_TIME */
/**
* Handler for the IRC command "USERHOST".
/**
* Handler for the IRC command "USERHOST".
- * See RFC 2812 section 4.8.
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
*/
GLOBAL bool
IRC_USERHOST(CLIENT *Client, REQUEST *Req)
*/
GLOBAL bool
IRC_USERHOST(CLIENT *Client, REQUEST *Req)
return IRC_WriteStrClient(Client, rpl, Client_ID(Client));
} /* IRC_USERHOST */
return IRC_WriteStrClient(Client, rpl, Client_ID(Client));
} /* IRC_USERHOST */
/**
* Handler for the IRC command "USERS".
/**
* Handler for the IRC command "USERS".
- * See RFC 2812 section 4.6. As suggested there the command is disabled.
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
*/
GLOBAL bool
IRC_USERS(CLIENT * Client, UNUSED REQUEST * Req)
*/
GLOBAL bool
IRC_USERS(CLIENT * Client, UNUSED REQUEST * Req)
Client_ID(Client));
} /* IRC_USERS */
Client_ID(Client));
} /* IRC_USERS */
+/**
+ * Handler for the IRC command "VERSION".
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
+ */
GLOBAL bool
IRC_VERSION( CLIENT *Client, REQUEST *Req )
{
GLOBAL bool
IRC_VERSION( CLIENT *Client, REQUEST *Req )
{
NGIRCd_VersionAddition);
} /* IRC_VERSION */
NGIRCd_VersionAddition);
} /* IRC_VERSION */
/**
* Handler for the IRC "WHO" command.
*
/**
* Handler for the IRC "WHO" command.
*
- * See RFC 2812, 3.6.1 "Who query".
- *
* @param Client The client from which this command has been received.
* @param Req Request structure with prefix and all parameters.
* @return CONNECTED or DISCONNECTED.
* @param Client The client from which this command has been received.
* @param Req Request structure with prefix and all parameters.
* @return CONNECTED or DISCONNECTED.
return IRC_WHO_Mask(Client, NULL, only_ops);
} /* IRC_WHO */
return IRC_WHO_Mask(Client, NULL, only_ops);
} /* IRC_WHO */
/**
* Handler for the IRC "WHOIS" command.
*
/**
* Handler for the IRC "WHOIS" command.
*
- * See RFC 2812, 3.6.2 "Whois query".
- *
- * @param Client The client from which this command has been received.
- * @param Req Request structure with prefix and all parameters.
- * @return CONNECTED or DISCONNECTED.
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
*/
GLOBAL bool
IRC_WHOIS( CLIENT *Client, REQUEST *Req )
*/
GLOBAL bool
IRC_WHOIS( CLIENT *Client, REQUEST *Req )
Client_ID(from), Req->argv[Req->argc - 1]);
} /* IRC_WHOIS */
Client_ID(from), Req->argv[Req->argc - 1]);
} /* IRC_WHOIS */
- * IRC "WHOWAS" function.
- * This function implements the IRC command "WHOWHAS". It handles local
- * requests and request that should be forwarded to other servers.
+ * Handler for the IRC "WHOWAS" command.
+ *
+ * @param Client The client from which this command has been received.
+ * @param Req Request structure with prefix and all parameters.
+ * @return CONNECTED or DISCONNECTED.
*/
GLOBAL bool
IRC_WHOWAS( CLIENT *Client, REQUEST *Req )
*/
GLOBAL bool
IRC_WHOWAS( CLIENT *Client, REQUEST *Req )
return IRC_WriteStrClient(prefix, RPL_ENDOFWHOWAS_MSG, Client_ID(prefix), Req->argv[0]);
} /* IRC_WHOWAS */
return IRC_WriteStrClient(prefix, RPL_ENDOFWHOWAS_MSG, Client_ID(prefix), Req->argv[0]);
} /* IRC_WHOWAS */
/**
* Send LUSERS reply to a client.
*
/**
* Send LUSERS reply to a client.
*
return CONNECTED;
} /* IRC_Send_LUSERS */
return CONNECTED;
} /* IRC_Send_LUSERS */
GLOBAL bool
IRC_Show_MOTD( CLIENT *Client )
{
GLOBAL bool
IRC_Show_MOTD( CLIENT *Client )
{
return Show_MOTD_End(Client);
} /* IRC_Show_MOTD */
return Show_MOTD_End(Client);
} /* IRC_Show_MOTD */
/**
* Send NAMES reply for a specific client and channel.
*
/**
* Send NAMES reply for a specific client and channel.
*
return CONNECTED;
} /* IRC_Send_NAMES */
return CONNECTED;
} /* IRC_Send_NAMES */
/**
* Send the ISUPPORT numeric (005).
* This numeric indicates the features that are supported by this server.
/**
* Send the ISUPPORT numeric (005).
* This numeric indicates the features that are supported by this server.
MAX_HNDL_CHANNEL_LISTS);
} /* IRC_Send_ISUPPORT */
MAX_HNDL_CHANNEL_LISTS);
} /* IRC_Send_ISUPPORT */