File: group__sendcmds.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 (415 lines) | stat: -rw-r--r-- 20,341 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>libirc: Sending IRC commands.</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.8 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<h1>Sending IRC commands.</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__sendcmds.html#ga0">irc_send_raw</a> (<a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *session, const char *format,...)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends raw data to the IRC server.  <a href="#ga0"></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__sendcmds.html#ga1">irc_cmd_quit</a> (<a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *session, const char *reason)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sends QUIT command to the IRC server.  <a href="#ga1"></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__sendcmds.html#ga2">irc_cmd_join</a> (<a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *session, const char *channel, const char *key)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Joins the new IRC channel.  <a href="#ga2"></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__sendcmds.html#ga3">irc_cmd_msg</a> (<a class="el" href="libircclient_8h.html#a1">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="#ga3"></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__sendcmds.html#ga4">irc_cmd_me</a> (<a class="el" href="libircclient_8h.html#a1">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="#ga4"></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__sendcmds.html#ga5">irc_cmd_notice</a> (<a class="el" href="libircclient_8h.html#a1">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="#ga5"></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__sendcmds.html#ga6">irc_cmd_kick</a> (<a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *session, const char *nick, const char *channel, const char *reason)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Kick some lazy ass out of channel.  <a href="#ga6"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga2" doxytag="libircclient.h::irc_cmd_join" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int irc_cmd_join           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>channel</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>key</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Joins the new IRC channel. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td></td><td valign=top><em>channel</em>&nbsp;</td><td>A channel name to join to. Must not be NULL. </td></tr>
    <tr><td></td><td valign=top><em>key</em>&nbsp;</td><td>Channel password. May be NULL.</td></tr>
  </table>
</dl>
<dl 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#ga0">irc_errno()</a>. Any error, generated by the IRC server, is available through event_numeric.</dd></dl>
This function is used to JOIN the IRC channel. If the channel is not exist, it will be automatically created by the IRC server. Note that to JOIN the password-protected channel, you must know the password, and specify it in the <em>key</em> argument.     </td>
  </tr>
</table>
<a class="anchor" name="ga6" doxytag="libircclient.h::irc_cmd_kick" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int irc_cmd_kick           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>nick</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>channel</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>reason</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Kick some lazy ass out of channel. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td></td><td valign=top><em>nick</em>&nbsp;</td><td>A nick to kick. Must not be NULL. </td></tr>
    <tr><td></td><td valign=top><em>channel</em>&nbsp;</td><td>A channel to kick this nick out of. Must not be NULL. </td></tr>
    <tr><td></td><td valign=top><em>reason</em>&nbsp;</td><td>A reason to kick. May be NULL.</td></tr>
  </table>
</dl>
<dl 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#ga0">irc_errno()</a>. Any error, generated by the IRC server, is available through ::event_numeric.</dd></dl>
This function is used to kick a person out of channel. Note that you must be a channel operator to kick anyone.<p>
<dl compact><dt><b>See also:</b></dt><dd>event_numeric </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga4" doxytag="libircclient.h::irc_cmd_me" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int irc_cmd_me           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>nch</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>text</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<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></td><td valign=top><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td></td><td valign=top><em>nch</em>&nbsp;</td><td>A target nick or channel. Must not be NULL. </td></tr>
    <tr><td></td><td valign=top><em>text</em>&nbsp;</td><td>Action message text. Must not be NULL.</td></tr>
  </table>
</dl>
<dl 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#ga0">irc_errno()</a>. Any error, generated by the IRC server, is available through event_numeric.</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>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__sendcmds.html#ga3">irc_cmd_msg</a> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga3" doxytag="libircclient.h::irc_cmd_msg" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> irc_cmd_msg           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>nch</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>text</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<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></td><td valign=top><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td></td><td valign=top><em>nch</em>&nbsp;</td><td>A target nick or channel. Must not be NULL. </td></tr>
    <tr><td></td><td valign=top><em>text</em>&nbsp;</td><td>Message text. Must not be NULL.</td></tr>
  </table>
</dl>
<dl 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#ga0">irc_errno()</a>. Any error, generated by the IRC server, is available through event_numeric.</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.     </td>
  </tr>
</table>
<a class="anchor" name="ga5" doxytag="libircclient.h::irc_cmd_notice" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int irc_cmd_notice           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>nch</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>text</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<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></td><td valign=top><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td></td><td valign=top><em>nch</em>&nbsp;</td><td>A target nick or channel. Must not be NULL. </td></tr>
    <tr><td></td><td valign=top><em>text</em>&nbsp;</td><td>Notice text. Must not be NULL.</td></tr>
  </table>
</dl>
<dl 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#ga0">irc_errno()</a>. Any error, generated by the IRC server, is available through event_numeric.</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>
<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__sendcmds.html#ga3">irc_cmd_msg</a> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga1" doxytag="libircclient.h::irc_cmd_quit" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int irc_cmd_quit           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>reason</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sends QUIT command to the IRC server. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td></td><td valign=top><em>reason</em>&nbsp;</td><td>A reason to quit. May be NULL.</td></tr>
  </table>
</dl>
<dl 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#ga0">irc_errno()</a>. Any error, generated by the IRC server, is available through event_numeric.</dd></dl>
This function sends the QUIT command to the IRC server. This command forces the IRC server to close the IRC connection, and terminate the session.     </td>
  </tr>
</table>
<a class="anchor" name="ga0" doxytag="libircclient.h::irc_send_raw" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int irc_send_raw           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="libircclient_8h.html#a1">irc_session_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>session</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>&nbsp;</td>
          <td class="mdname" nowrap> <em>...</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Sends raw data to the IRC server. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>session</em>&nbsp;</td><td>An initiated and connected session. </td></tr>
    <tr><td></td><td valign=top><em>format</em>&nbsp;</td><td>A printf-formatted string, followed by function args.</td></tr>
  </table>
</dl>
<dl 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#ga0">irc_errno()</a>. Any error, generated by the IRC server, is available through event_numeric.</dd></dl>
This function sends the raw data as-is to the IRC server. Use it to generate a server command, which is not (yet) provided by libirc directly.     </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Thu Sep 30 02:18:10 2004 for libirc by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border=0 ></a> 1.3.8 </small></address>
</body>
</html>