IRC commands: sending messages/notices.


Functions

int irc_cmd_msg (irc_session_t *session, const char *nch, const char *text)
 Sends the message to the nick or to the channel.
int irc_cmd_me (irc_session_t *session, const char *nch, const char *text)
 Sends the /me (CTCP ACTION) message to the nick or to the channel.
int irc_cmd_notice (irc_session_t *session, const char *nch, const char *text)
 Sends the notice to the nick or to the channel.

Function Documentation

int irc_cmd_me ( irc_session_t session,
const char *  nch,
const char *  text 
)

Sends the /me (CTCP ACTION) message to the nick or to the channel.

Parameters:
session An initiated and connected session.
nch A target nick or channel. Must not be NULL.
text Action message text. Must not be NULL.
Returns:
Return code 0 means success. Other value means error, the error code may be obtained through irc_errno(). Any error, generated by the IRC server, is available through irc_callbacks_t::event_numeric.
This function is used to send the /me message to channel or private. As for irc_cmd_msg, the target is determined by nch argument.

Possible error responces for this command from the RFC1459:

On success there is NOTHING generated. However, a LIBIRC_RFC_RPL_AWAY reply can be also generated.

See also:
irc_cmd_msg

irc_cmd_msg ( irc_session_t session,
const char *  nch,
const char *  text 
)

Sends the message to the nick or to the channel.

Parameters:
session An initiated and connected session.
nch A target nick or channel. Must not be NULL.
text Message text. Must not be NULL.
Returns:
Return code 0 means success. Other value means error, the error code may be obtained through irc_errno(). Any error, generated by the IRC server, is available through irc_callbacks_t::event_numeric.
This function is used to send the channel or private messages. The target is determined by nch argument: if it describes nick, this will be a private message, if a channel name - public (channel) message. Note that depending on channel modes, you may be required to join the channel to send the channel messages.

Possible error responces for this command from the RFC1459:

On success there is NOTHING generated.

int irc_cmd_notice ( irc_session_t session,
const char *  nch,
const char *  text 
)

Sends the notice to the nick or to the channel.

Parameters:
session An initiated and connected session.
nch A target nick or channel. Must not be NULL.
text Notice text. Must not be NULL.
Returns:
Return code 0 means success. Other value means error, the error code may be obtained through irc_errno(). Any error, generated by the IRC server, is available through irc_callbacks_t::event_numeric.
This function is used to send the channel or private notices. The target is determined by nch argument: if it describes nick, this will be a private message, if a channel name - public (channel) message. Note that depending on channel modes, you may be required to join the channel to send the channel notices.

The only difference between message and notice is that, according to RFC 1459, you must not automatically reply to NOTICE messages.

Possible error responces for this command from the RFC1459:

On success there is NOTHING generated. On notices sent to target nick, a LIBIRC_RFC_RPL_AWAY reply may be generated.

See also:
irc_cmd_msg


Generated on Sat Jan 10 18:19:35 2009 for libircclient by  doxygen 1.5.7.1