.TH "CTCP requests and replies." 3 "10 Jan 2009" "Version 1.3" "libircclient" \" -*- nroff -*-
.ad l
.nh
.SH NAME
CTCP requests and replies. \- 
.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBirc_cmd_ctcp_request\fP (\fBirc_session_t\fP *session, const char *nick, const char *request)"
.br
.RI "\fIGenerates a CTCP request. \fP"
.ti -1c
.RI "int \fBirc_cmd_ctcp_reply\fP (\fBirc_session_t\fP *session, const char *nick, const char *reply)"
.br
.RI "\fIGenerates a reply to the CTCP request. \fP"
.in -1c
.SH "Function Documentation"
.PP 
.SS "int irc_cmd_ctcp_reply (\fBirc_session_t\fP * session, const char * nick, const char * reply)"
.PP
Generates a reply to the CTCP request. 
.PP
\fBParameters:\fP
.RS 4
\fIsession\fP An initiated and connected session. 
.br
\fInick\fP A target nick to send request to. Must not be NULL. 
.br
\fIreply\fP A reply string. Must not be NULL.
.RE
.PP
\fBReturns:\fP
.RS 4
Return code 0 means success. Other value means error, the error code may be obtained through \fBirc_errno()\fP. Any error, generated by the IRC server, is available through \fBirc_callbacks_t::event_numeric\fP.
.RE
.PP
This function is used to send a reply to the CTCP request, generated by \fBirc_callbacks_t::event_ctcp_req\fP. Note that you will not receive this event unless you specify your own handler as \fCevent_ctcp_req\fP callback during the IRC session initialization.
.PP
Possible error responces for this command from the RFC1459:
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NORECIPIENT\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTEXTTOSEND\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_CANNOTSENDTOCHAN\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTONCHANNEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_WILDTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_TOOMANYTARGETS\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOSUCHNICK\fP 
.PP

.SS "int irc_cmd_ctcp_request (\fBirc_session_t\fP * session, const char * nick, const char * request)"
.PP
Generates a CTCP request. 
.PP
\fBParameters:\fP
.RS 4
\fIsession\fP An initiated and connected session. 
.br
\fInick\fP A target nick to send request to. Must not be NULL. 
.br
\fIrequest\fP A request string. Must not be NULL.
.RE
.PP
\fBReturns:\fP
.RS 4
Return code 0 means success. Other value means error, the error code may be obtained through \fBirc_errno()\fP. Any error, generated by the IRC server, is available through \fBirc_callbacks_t::event_numeric\fP.
.RE
.PP
This function is used to send a CTCP request. There are four CTCP requests supported by Mirc: VERSION - get the client software name and version FINGER - get the client username, host and real name. PING - get the client delay. TIME - get the client local time.
.PP
A reply to the CTCP request will be sent by the \fBirc_callbacks_t::event_ctcp_rep\fP callback; be sure to define it.
.PP
Possible error responces for this command from the RFC1459:
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NORECIPIENT\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTEXTTOSEND\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_CANNOTSENDTOCHAN\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTONCHANNEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_WILDTOPLEVEL\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_TOOMANYTARGETS\fP
.IP "\(bu" 2
\fBLIBIRC_RFC_ERR_NOSUCHNICK\fP
.PP
.PP
\fBSee also:\fP
.RS 4
\fBirc_callbacks_t::event_ctcp_rep\fP \fBirc_callbacks_t::event_numeric\fP 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for libircclient from the source code.
