File: group__ircmd__msg.html

package info (click to toggle)
libircclient 1.3%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 2,492 kB
  • ctags: 691
  • sloc: ansic: 2,706; cpp: 313; makefile: 132; sh: 120
file content (191 lines) | stat: -rw-r--r-- 15,762 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libircclient: IRC commands: sending messages/notices.</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>IRC commands: sending messages/notices.</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ircmd__msg.html#g8c2ec03f1a9ce7c739e11b64fd088ae5">irc_cmd_msg</a> (<a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> *session, const char *nch, const char *text)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends the message to the nick or to the channel.  <a href="#g8c2ec03f1a9ce7c739e11b64fd088ae5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ircmd__msg.html#g09c7e471bf4062b57df10d31ee275fc5">irc_cmd_me</a> (<a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> *session, const char *nch, const char *text)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends the /me (CTCP ACTION) message to the nick or to the channel.  <a href="#g09c7e471bf4062b57df10d31ee275fc5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ircmd__msg.html#gf537698d7ec582701fa3473a2dd6775f">irc_cmd_notice</a> (<a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> *session, const char *nch, const char *text)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends the notice to the nick or to the channel.  <a href="#gf537698d7ec582701fa3473a2dd6775f"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="g09c7e471bf4062b57df10d31ee275fc5"></a><!-- doxytag: member="libircclient.h::irc_cmd_me" ref="g09c7e471bf4062b57df10d31ee275fc5" args="(irc_session_t *session, const char *nch, const char *text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int irc_cmd_me           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> *&nbsp;</td>
          <td class="paramname"> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>nch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>text</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sends the /me (CTCP ACTION) message to the nick or to the channel. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nch</em>&nbsp;</td><td>A target nick or channel. Must not be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>Action message text. Must not be NULL.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return code 0 means success. Other value means error, the error code may be obtained through <a class="el" href="group__errors.html#g3a18336093ee74751244d996bc32247d" title="Returns the last error code.">irc_errno()</a>. Any error, generated by the IRC server, is available through <a class="el" href="structirc__callbacks__t.html#85951d45acff22aea37a822bb9c7aef7">irc_callbacks_t::event_numeric</a>.</dd></dl>
This function is used to send the /me message to channel or private. As for irc_cmd_msg, the target is determined by <em>nch</em> argument.<p>
Possible error responces for this command from the RFC1459:<ul>
<li><a class="el" href="group__rfcnumbers.html#g73d5c17577fddd176f2d89e15b657c1a" title="411 :No recipient given (&lt;command&gt;)">LIBIRC_RFC_ERR_NORECIPIENT</a></li><li><a class="el" href="group__rfcnumbers.html#gc9851022435108cc6074c8cab2311b58" title="412 :No text to send">LIBIRC_RFC_ERR_NOTEXTTOSEND</a></li><li><a class="el" href="group__rfcnumbers.html#g3624990fe128d867c11b213228e62df8" title="404 &lt;channel name&gt; :Cannot send to channel">LIBIRC_RFC_ERR_CANNOTSENDTOCHAN</a></li><li><a class="el" href="group__rfcnumbers.html#gb20af2b80994d5c9d7c1e96d88f2e577" title="442 &lt;channel&gt; :You&#39;re not on that channel">LIBIRC_RFC_ERR_NOTONCHANNEL</a></li><li><a class="el" href="group__rfcnumbers.html#gfcad763cc97b268aa585311350989dca" title="413 &lt;mask&gt; :No toplevel domain specified">LIBIRC_RFC_ERR_NOTOPLEVEL</a></li><li><a class="el" href="group__rfcnumbers.html#g4cf5ceeec3305180731860436650c955" title="414 &lt;mask&gt; :Wildcard in toplevel domain">LIBIRC_RFC_ERR_WILDTOPLEVEL</a></li><li><a class="el" href="group__rfcnumbers.html#g807eab621113410281fd574de71236ea" title="407 &lt;target&gt; :&lt;error code&gt; recipients. &lt;abort message&gt;">LIBIRC_RFC_ERR_TOOMANYTARGETS</a></li><li><a class="el" href="group__rfcnumbers.html#g28f90d5f34a3056127516c0edc7c511f" title="401 &lt;nickname&gt; :No such nick/channel">LIBIRC_RFC_ERR_NOSUCHNICK</a></li></ul>
<p>
On success there is NOTHING generated. However, a <a class="el" href="group__rfcnumbers.html#g54aa2b97df3fc570572e68fc88647143" title="301 &lt;nick&gt; :&lt;away message&gt;">LIBIRC_RFC_RPL_AWAY</a> reply can be also generated.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__ircmd__msg.html#g8c2ec03f1a9ce7c739e11b64fd088ae5" title="Sends the message to the nick or to the channel.">irc_cmd_msg</a> </dd></dl>

</div>
</div><p>
<a class="anchor" name="g8c2ec03f1a9ce7c739e11b64fd088ae5"></a><!-- doxytag: member="libircclient.h::irc_cmd_msg" ref="g8c2ec03f1a9ce7c739e11b64fd088ae5" args="(irc_session_t *session, const char *nch, const char *text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">irc_cmd_msg           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> *&nbsp;</td>
          <td class="paramname"> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>nch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>text</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sends the message to the nick or to the channel. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nch</em>&nbsp;</td><td>A target nick or channel. Must not be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>Message text. Must not be NULL.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return code 0 means success. Other value means error, the error code may be obtained through <a class="el" href="group__errors.html#g3a18336093ee74751244d996bc32247d" title="Returns the last error code.">irc_errno()</a>. Any error, generated by the IRC server, is available through <a class="el" href="structirc__callbacks__t.html#85951d45acff22aea37a822bb9c7aef7">irc_callbacks_t::event_numeric</a>.</dd></dl>
This function is used to send the channel or private messages. The target is determined by <em>nch</em> 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.<p>
Possible error responces for this command from the RFC1459:<ul>
<li><a class="el" href="group__rfcnumbers.html#g73d5c17577fddd176f2d89e15b657c1a" title="411 :No recipient given (&lt;command&gt;)">LIBIRC_RFC_ERR_NORECIPIENT</a></li><li><a class="el" href="group__rfcnumbers.html#gc9851022435108cc6074c8cab2311b58" title="412 :No text to send">LIBIRC_RFC_ERR_NOTEXTTOSEND</a></li><li><a class="el" href="group__rfcnumbers.html#g3624990fe128d867c11b213228e62df8" title="404 &lt;channel name&gt; :Cannot send to channel">LIBIRC_RFC_ERR_CANNOTSENDTOCHAN</a></li><li><a class="el" href="group__rfcnumbers.html#gb20af2b80994d5c9d7c1e96d88f2e577" title="442 &lt;channel&gt; :You&#39;re not on that channel">LIBIRC_RFC_ERR_NOTONCHANNEL</a></li><li><a class="el" href="group__rfcnumbers.html#gfcad763cc97b268aa585311350989dca" title="413 &lt;mask&gt; :No toplevel domain specified">LIBIRC_RFC_ERR_NOTOPLEVEL</a></li><li><a class="el" href="group__rfcnumbers.html#g4cf5ceeec3305180731860436650c955" title="414 &lt;mask&gt; :Wildcard in toplevel domain">LIBIRC_RFC_ERR_WILDTOPLEVEL</a></li><li><a class="el" href="group__rfcnumbers.html#g807eab621113410281fd574de71236ea" title="407 &lt;target&gt; :&lt;error code&gt; recipients. &lt;abort message&gt;">LIBIRC_RFC_ERR_TOOMANYTARGETS</a></li><li><a class="el" href="group__rfcnumbers.html#g28f90d5f34a3056127516c0edc7c511f" title="401 &lt;nickname&gt; :No such nick/channel">LIBIRC_RFC_ERR_NOSUCHNICK</a></li></ul>
<p>
On success there is NOTHING generated. 
</div>
</div><p>
<a class="anchor" name="gf537698d7ec582701fa3473a2dd6775f"></a><!-- doxytag: member="libircclient.h::irc_cmd_notice" ref="gf537698d7ec582701fa3473a2dd6775f" args="(irc_session_t *session, const char *nch, const char *text)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int irc_cmd_notice           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="libircclient_8h.html#0030a976ab3e6a247d57e30fd5979cd5">irc_session_t</a> *&nbsp;</td>
          <td class="paramname"> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>nch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>text</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sends the notice to the nick or to the channel. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>nch</em>&nbsp;</td><td>A target nick or channel. Must not be NULL. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>text</em>&nbsp;</td><td>Notice text. Must not be NULL.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>Return code 0 means success. Other value means error, the error code may be obtained through <a class="el" href="group__errors.html#g3a18336093ee74751244d996bc32247d" title="Returns the last error code.">irc_errno()</a>. Any error, generated by the IRC server, is available through <a class="el" href="structirc__callbacks__t.html#85951d45acff22aea37a822bb9c7aef7">irc_callbacks_t::event_numeric</a>.</dd></dl>
This function is used to send the channel or private notices. The target is determined by <em>nch</em> 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.<p>
The only difference between message and notice is that, according to RFC 1459, you must not automatically reply to NOTICE messages.<p>
Possible error responces for this command from the RFC1459:<ul>
<li><a class="el" href="group__rfcnumbers.html#g73d5c17577fddd176f2d89e15b657c1a" title="411 :No recipient given (&lt;command&gt;)">LIBIRC_RFC_ERR_NORECIPIENT</a></li><li><a class="el" href="group__rfcnumbers.html#gc9851022435108cc6074c8cab2311b58" title="412 :No text to send">LIBIRC_RFC_ERR_NOTEXTTOSEND</a></li><li><a class="el" href="group__rfcnumbers.html#g3624990fe128d867c11b213228e62df8" title="404 &lt;channel name&gt; :Cannot send to channel">LIBIRC_RFC_ERR_CANNOTSENDTOCHAN</a></li><li><a class="el" href="group__rfcnumbers.html#gb20af2b80994d5c9d7c1e96d88f2e577" title="442 &lt;channel&gt; :You&#39;re not on that channel">LIBIRC_RFC_ERR_NOTONCHANNEL</a></li><li><a class="el" href="group__rfcnumbers.html#gfcad763cc97b268aa585311350989dca" title="413 &lt;mask&gt; :No toplevel domain specified">LIBIRC_RFC_ERR_NOTOPLEVEL</a></li><li><a class="el" href="group__rfcnumbers.html#g4cf5ceeec3305180731860436650c955" title="414 &lt;mask&gt; :Wildcard in toplevel domain">LIBIRC_RFC_ERR_WILDTOPLEVEL</a></li><li><a class="el" href="group__rfcnumbers.html#g807eab621113410281fd574de71236ea" title="407 &lt;target&gt; :&lt;error code&gt; recipients. &lt;abort message&gt;">LIBIRC_RFC_ERR_TOOMANYTARGETS</a></li><li><a class="el" href="group__rfcnumbers.html#g28f90d5f34a3056127516c0edc7c511f" title="401 &lt;nickname&gt; :No such nick/channel">LIBIRC_RFC_ERR_NOSUCHNICK</a></li></ul>
<p>
On success there is NOTHING generated. On notices sent to target nick, a <a class="el" href="group__rfcnumbers.html#g54aa2b97df3fc570572e68fc88647143" title="301 &lt;nick&gt; :&lt;away message&gt;">LIBIRC_RFC_RPL_AWAY</a> reply may be generated.<p>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__ircmd__msg.html#g8c2ec03f1a9ce7c739e11b64fd088ae5" title="Sends the message to the nick or to the channel.">irc_cmd_msg</a> </dd></dl>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sat Jan 3 15:01:06 2009 for libircclient by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>