/[cvs]/eggdrop1.9/doc/SCRIPTING-COMMANDS
ViewVC logotype

Contents of /eggdrop1.9/doc/SCRIPTING-COMMANDS

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download)
Tue Mar 25 19:20:32 2003 UTC (16 years, 6 months ago) by stdarg
Branch: MAIN
Changes since 1.2: +78 -0 lines
* Scripting doc update for network commands

1 Eggdrop Scripting Commands
2 Last revised: March 01, 2003
3 _________________________________________________________________
4
5 This is an exhaustive list of all of the scripting commands added to Eggdrop.
6 All of the normal built-in commands specific to the scripting module you are
7 using are still there, of course, but you can also use these to manipulate
8 features of the bot. They are listed according to category. This list is
9 accurate for Eggdrop v1.7.0.
10
11 *** CORE COMMANDS ***
12
13 putlog <text>
14 Description: sends text to the bot's logfile, marked as 'misc' (o)
15 Returns: nothing
16 Module: core
17
18 putloglev <level(s)> <channel> <text>
19 Description: sends text to the bot's logfile, tagged with all of the
20 valid levels given. Use "*" to indicate all log levels.
21 Returns: nothing
22 Module: core
23
24 <FINISH ME>
25
26 *** BLOWFISH/ENCRYPTION MODULE COMMANDS ***
27
28 <WRITE ME>
29
30
31 *** CHANNELS MODULE COMMANDS ***
32
33 setlaston <handle> <when> [channel]
34 Description: updates a user's laston information with the information
35 provided.
36 Returns: nothing
37 Module: channels
38
39 newban [channel] <ban> <creator> <comment> [lifetime] [options]
40 Description: adds a ban to the global ban list (which takes effect on
41 all channels); creator is given credit for the ban in the ban list.
42 lifetime is specified in minutes. If lifetime is not specified,
43 global-ban-time (usually 60) is used. Setting the lifetime to 0 makes
44 it a permanent ban.
45 Options:
46 sticky: forces the ban to be always active on a channel, even
47 with dynamicbans on
48 none: no effect
49 Returns: nothing
50 Module: channels
51
52 newexempt [channel] <exempt> <creator> <comment> [lifetime] [options]
53 Description: adds a exempt to the global exempt list (which takes effect
54 on all channels); creator is given credit for the exempt in the exempt
55 list. lifetime is specified in minutes. If lifetime is not specified,
56 exempt-time (usually 60) is used. Setting the lifetime to 0 makes it a
57 permanent exempt. The exempt will not be removed until the
58 corresponding ban has been removed.
59 Options:
60 sticky: forces the exempt to be always active on a channel, even
61 with dynamicexempts on
62 none: no effect
63 Returns: nothing
64 Module: channels
65
66 newinvite [channel] <invite> <creator> <comment> [lifetime] [options]
67 Description: adds a invite to the global invite list (which takes effect
68 on all channels); creator is given credit for the invite in the invite
69 list. lifetime is specified in minutes. If lifetime is not specified,
70 invite-time (usually 60) is used. Setting the lifetime to 0 makes it
71 a permanent invite. The invite will not be removed until the channel
72 has gone -i.
73 Options:
74 sticky: forces the invite to be always active on a channel, even
75 with dynamicinvites on
76 none: no effect
77 Returns: nothing
78 Module: channels
79
80 stickban [channel] <banmask>
81 Description: makes a ban sticky, or, if a channel is specified, then it
82 is set sticky on that channel only.
83 Returns: 1 on success; 0 otherwise
84 Module: channels
85
86 unstickban [channel] <banmask>
87 Description: makes a ban no longer sticky, or, if a channel is
88 specified, then it is unstuck on that channel only.
89 Returns: 1 on success; 0 otherwise
90 Module: channels
91
92 stickexempt [channel] <exemptmask>
93 Description: makes an exempt sticky, or, if a channel is specified,
94 then it is set sticky on that channel only.
95 Returns: 1 on success; 0 otherwise
96 Module: channels
97
98 unstickexempt [channel] <exemptmask>
99 Description: makes an exempt no longer sticky, or, if a channel is
100 specified, then it is unstuck on that channel only.
101 Returns: 1 on success; 0 otherwise
102 Module: channels
103
104 stickinvite [channel] <invitemask>
105 Description: makes an invite sticky, or, if a channel is specified,
106 then it is set sticky on that channel only.
107 Returns: 1 on success; 0 otherwise
108 Module: channels
109
110 unstickinvite [channel] <invitemask>
111 Description: makes an invite no longer sticky, or, if a channel is
112 specified, then it is unstuck on that channel only.
113 Returns: 1 on success; 0 otherwise
114 Module: channels
115
116 killban [channel] <ban>
117 Description: removes a ban from the global ban list
118 Returns: 1 on success; 0 otherwise
119 Module: channels
120
121 killexempt [channel] <exempt>
122 Description: removes an exempt from the global exempt list
123 Returns: 1 on success; 0 otherwise
124 Module: channels
125
126 killinvite [channel] <invite>
127 Description: removes an invite from the global invite list
128 Returns: 1 on success; 0 otherwise
129 Module: channels
130
131 ischanjuped [channel]
132 Returns: 1 if the channel is juped, and the bot is unable to join; 0
133 otherwise
134 Module: channels
135
136 isban [channel] <ban>
137 Returns: 1 if the specified ban is in the global ban list; 0 otherwise.
138 If a channel is specified, that channel's ban list is checked as well.
139 Module: channels
140
141 ispermban [channel] <ban>
142 Returns: 1 if the specified ban is in the global ban list AND is marked
143 as permanent; 0 otherwise. If a channel is specified, that channel's
144 ban list is checked as well.
145 Module: channels
146
147 isexempt [channel] <exempt>
148 Returns: 1 if the specified exempt is in the global exempt list; 0
149 otherwise. If a channel is specified, that channel's exempt list is
150 checked as well.
151 Module: channels
152
153 ispermexempt [channel] <exempt>
154 Returns: 1 if the specified exempt is in the global exempt list AND is
155 marked as permanent; 0 otherwise. If a channel is specified, that
156 channel's exempt list is checked as well.
157 Module: channels
158
159 isinvite [channel] <invite>
160 Returns: 1 if the specified invite is in the global invite list; 0
161 otherwise. If a channel is specified, that channel's invite list is
162 checked as well.
163 Module: channels
164
165 isperminvite [channel] <invite>
166 Returns: 1 if the specified invite is in the global invite list AND is
167 marked as permanent; 0 otherwise. If a channel is specified, that
168 channel's invite list is checked as well.
169 Module: channels
170
171 isbansticky [channel] <ban>
172 Returns: 1 if the specified ban is marked as sticky in the global ban
173 list; 0 otherwise. If a channel is specified, that channel's ban list
174 is checked as well.
175 Module: channels
176
177 isexemptsticky [channel] <exempt>
178 Returns: 1 if the specified exempt is marked as sticky in the global
179 exempt list; 0 otherwise. If a channel is specified, that channel's
180 exempt list is checked as well.
181 Module: channels
182
183 isinvitesticky [channel] <invite>
184 Returns: 1 if the specified invite is marked as sticky in the global
185 invite list; 0 otherwise. If a channel is specified, that channel's
186 invite list is checked as well.
187 Module: channels
188
189 matchban [channel] <nick!user@host>
190 Returns: 1 if the specified nick!user@host matches a ban in the global
191 ban list; 0 otherwise. If a channel is specified, that channel's ban
192 list is checked as well.
193 Module: channels
194
195 matchexempt [channel] <nick!user@host>
196 Returns: 1 if the specified nick!user@host matches an exempt in the
197 global exempt list; 0 otherwise. If a channel is specified, that
198 channel's exempt list is checked as well.
199 Module: channels
200
201 matchinvite [channel] <nick!user@host>
202 Returns: 1 if the specified nick!user@host matches an invite in the
203 global invite list; 0 otherwise. If a channel is specified, that
204 channel's invite list is checked as well.
205 Module: channels
206
207 listbans [channel]
208 Returns: a list of global bans, or, if a channel is specified, a
209 list of channel-specific bans. Each entry is a sublist containing:
210 hostmask, comment, expiration timestamp, time added, last time
211 active, and creator. The three timestamps are in unixtime format.
212 Module: channels
213
214 listexempts [channel]
215 Returns: a list of global exempts, or, if a channel is specified, a
216 list of channel-specific exempts. Each entry is a sublist containing:
217 hostmask, comment, expiration timestamp, time added, last time
218 active, and creator. The three timestamps are in unixtime format.
219 Module: channels
220
221 listinvites [channel]
222 Returns: a list of global invites, or, if a channel is specified, a
223 list of channel-specific invites. Each entry is a sublist containing:
224 hostmask, comment, expiration timestamp, time added, last time
225 active, and creator. The three timestamps are in unixtime format.
226 Module: channels
227
228 <FINISH ME>
229
230
231 *** COMPRESS MODULE COMMANDS ***
232
233 <WRITE ME>
234
235
236 *** CONSOLE MODULE COMMANDS ***
237
238 <WRITE ME>
239
240
241 *** FILESYS MODULE COMMANDS ***
242
243 <WRITE ME>
244
245
246 *** IRC MODULE COMMANDS ***
247
248 putkick <channel> <nick,nick,...> [reason]
249 Description: sends kicks to the server and tries to put as many nicks
250 into one kick command as possible.
251 Returns: nothing
252
253 <FINISH ME>
254
255
256 *** NOTES MODULE COMMANDS ***
257
258 <WRITE ME>
259
260
261 *** SCRIPT MODULE COMMANDS ***
262
263 <WRITE ME>
264
265
266 *** SERVER MODULE COMMANDS ***
267
268 putserv [-serv|-help|-quick|-noqueue] [-next] <text>
269 Description: sends text to the server through the specified queue. The
270 default queue is the server queue (-serv). You can specify the -next
271 option even if you are using other options.
272 Options:
273 -serv: use the server queue to send the specified message
274 -help: use the help queue to send the specified message
275 -quick: use the mode queue to send the message
276 -noqueue: use the mode queue to send the message
277 -next: push messages to the front of the queue
278 Returns: nothing
279
280
281 queuesize [queue]
282 Returns: the number of messages in all queues. If a queue is specified,
283 only the size of this queue is returned. Valid queues are: mode,
284 server, help.
285
286 clearqueue <queue>
287 Description: removes all messages from a queue. Valid arguments are:
288 mode, server, help, or all.
289 Returns: the number of deleted lines from the specified queue.
290
291 channel_list
292 Returns: the list of channels that the bot is currently on
293
294 channel_members <chan>
295 Returns: the list of nicks on the given channel
296
297 channel_topic <chan>
298 Returns: the topic, nick that set the topic, time topic was set
299
300 channel_get_uhost <nick>
301 Returns: the uhost for the given nick, or "" if unknown
302
303 <FINISH ME>
304
305
306 *** GLOBAL VARIABLES ***
307
308 botnick
309 Value: the current nickname the bot is using on IRC
310 Module: server
311
312 server
313 Value: the server list index of the current server the bot is using
314 Module: server
315
316 servidx
317 Value: the idx of the server socket
318 Module: server
319
320 <FINISH ME>
321
322
323 *** BINDS ***
324
325 <WRITE ME>
326
327 *** NETWORK COMMANDS ***
328
329 net_open <host> <port> [timeout]
330 Description: Opens an async connection to the given host and port. If
331 'host' is not an ip address, a dns lookup is performed without blocking.
332 The 'timeout' optional parameter lets you specify a connection timeout
333 in milliseconds. If not given, or if the value is 0, then eggdrop's
334 default timeout value is used. If given as -1, no timeout is used.
335 Returns: A valid idx in an unconnected state.
336 Notes: When the connection is established, the "connect" event will
337 execute. If there is a dns error, a connection error, or the timeout
338 elapses, the "eof" event will execute with the appropriate error code.
339 Use the net_handler command to set handlers for these events.
340
341 net_close <idx>
342 Description: Close the given idx.
343 Returns: 0 for success, -1 if the idx is invalid or already closed.
344
345 net_write <idx> <text> [len]
346 Description: Writes data to an idx.
347 Returns: The number of bytes written to the actual network interface, or
348 -1 upon error.
349 Notes: Any unwritten data is buffered and will be written as soon as
350 possible. Use the 'len' parameter if you are writing binary data which
351 contains embedded NULL's, otherwise the C strlen() function is used to
352 determined the number of bytes to write.
353
354 net_handler <idx> <event> [callback]
355 Description: Sets or unsets a callback for a particular event on an idx.
356 The syntax of the callback varies with the event:
357 connect_callback <idx> <peer_ip> <peer_port>
358 Called when the idx establishes an outgoing connection.
359 newclient_callback <idx> <newidx> <peer_ip> <peer_port>
360 Called when an incoming connection is established.
361 eof_callback <idx> <err> <errmsg>
362 Called when eof is detected or there is an error, such as when the
363 connection times out or is refused by the host.
364 read_callback <idx> <data> <len>
365 Called when data is ready on the idx, after any filtering has been
366 performed. (For more information, see net_linemode.)
367 written_callback <idx> <len> <remaining_len>
368 Called when buffered data has been written in the background.
369 delete_callback <idx>
370 Called when the idx is deleted.
371 Returns: 0 for success, -1 for an invalid idx, -2 for an invalid event type.
372 Notes: To unset a handler, leave off the 'callback' parameter.
373
374 net_info <idx> <what>
375 Description: Provides statistics on a given idx. Possible values for 'what'
376 are:
377 bytesleft - number of buffered bytes remaining to be written
378
379 net_linemode <idx> <on-off>
380 Description: Sets line buffering to either on (1) or off (0) for an idx.
381 When linemode is on, data is buffered until a full line is read. If more
382 than one line is read, the "read" event is triggered for each individual
383 line. The line is passed to the read handler with the end-of-line (either
384 CR, LF, or CRLF) stripped from the data.
385 Returns: Nothing.
386
387 net_throttle <idx> <speed-in> <speed-out>
388 Description: Turn on speed throttling. The values given are in bytes per
389 second.
390 Returns: Nothing.
391 Notes: A speed parameter of <= 0 will disable throttling for that direction.
392
393 net_throttle_in <idx> <speed-in>
394 Description: Modify the 'speed-in' parameter of an already-throttled idx.
395 Returns: Nothing.
396 Notes: A 'speed-in' of <= 0 will disable input throttling.
397
398 net_throttle_out <idx> <speed-out>
399 Description: Modify the 'speed-out' parameter of an already-throttled idx.
400 Returns: Nothing.
401 Notes: A 'speed-out' of <= 0 will disable output throttling.
402
403 net_throttle_off <idx>
404 Description: Removes throttling from an idx.

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23