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

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

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


Revision 1.9 - (hide annotations) (download)
Sun Jun 20 21:33:28 2004 UTC (15 years, 8 months ago) by wingman
Branch: MAIN
Changes since 1.8: +1 -1 lines
* 1.7 => 1.9 change (though not all occurrances replaced. Old modules,
  ChangeLogs, etc were kept.)

1 wcc 1.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 wingman 1.9 accurate for Eggdrop v1.9.0.
10 wcc 1.1
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 stdarg 1.7 irccmp <str1> <str2>
269     Description: Compare str1 and str2 case independently, as specified by
270     the current server. Typical uses are comparing nicks and channel names.
271     Returns: < 0 if str1 < str2
272     = 0 if str1 = str2
273     > 0 if str1 > str2
274    
275     get_uhost <nick>
276     Returns: the uhost for the given nick, or "" if unknown
277 stdarg 1.6
278 stdarg 1.5 putserv [noqueue|quick|normal|slow] [next] <text>
279 wcc 1.1 Description: sends text to the server through the specified queue. The
280 stdarg 1.5 default queue is the normal queue. You can specify the "next"
281 wcc 1.1 option even if you are using other options.
282     Options:
283 stdarg 1.5 noqueue: send the message without waiting
284     quick: high priority queue
285     normal: default queue
286     slow: low priority queue
287 wcc 1.1 Returns: nothing
288    
289 stdarg 1.5 server_fake_input <text>
290     Description: Causes the server module to interpret the given text as if
291     the server had sent it.
292     Returns: Nothing
293    
294     server_support <field>
295     Description: Provides an interface to the 005 numeric.
296     Returns: The value of the field (parsed from fieldname=fieldvalue) or
297     the string "true" for items with no value.
298 wcc 1.1
299 stdarg 1.2 channel_list
300     Returns: the list of channels that the bot is currently on
301    
302     channel_members <chan>
303     Returns: the list of nicks on the given channel
304 stdarg 1.5
305 stdarg 1.2 channel_topic <chan>
306     Returns: the topic, nick that set the topic, time topic was set
307    
308 stdarg 1.5 channel_mode <chan> [nick]
309     Returns: Either the mode of the channel, with no arguments (such as key),
310     or the mode of the nick on that channel (if given).
311    
312     channel_key <chan>
313     Returns: The key of the given channel.
314    
315     channel_limit <chan>
316     Returns: The limit of the given channel.
317    
318     channel_bans <chan>
319     Returns: The list of bans in the channel. Each item of the list is itself
320     a list of the form {banmask, who_set_it, when_it_was_set}
321    
322     server_queue_len <queue> [next]
323     Returns: Number of messages in the given queue
324    
325     server_queue_get [queue] [next] <msgnum>
326     Description: Allows scripts to read the server's output queues. Messages
327     start at number 0. If [queue] isn't given, the normal queue is assumed.
328     Returns: The text of the desired message
329    
330     server_queue_set [queue] [next] <msgnum> <msg>
331     Description: Allows scripts to overwrite messages in the server's output
332     queues. If [queue] isn't given, the normal queue is assumed.
333     Returns: Nothing
334    
335     server_queue_insert [queue] [next] <msgnum> <msg>
336     Description: Inserts messages into the given output queue. To add a message
337     to the end, make <msgnum> larger than the current queue length. Or use
338     putserv :)
339     Returns: Nothing
340    
341     dcc_chat <nick> [timeout]
342     Description: Starts a dcc chat with the given nick.
343     Returns: An unconnected idx.
344    
345     dcc_send <nick> <filename> [timeout]
346     Description: Starts a dcc send with the given nick. Resumes are handled
347     automatically.
348     Returns: An unconnected idx.
349    
350     dcc_send_info <idx> <stat-type>
351     Description: Returns information about a dcc send.
352     Options for stat-type:
353     bytes_left: number of bytes remaining to be sent
354     bytes_sent: number of bytes already sent
355     total_cps: average cps since the send began
356     snapshot_cps: average cps over the last several seconds
357     Returns: The requested information
358    
359     dcc_accept_send <nick> <localfile> <remotefile> <size> <resume> <ip> <port> [timeout]
360     Description: Accepts a dcc send, as triggered by the dcc_recv bind.
361     Returns: An unconnected idx
362 stdarg 1.2
363 wcc 1.1 <FINISH ME>
364    
365    
366     *** GLOBAL VARIABLES ***
367    
368     botnick
369     Value: the current nickname the bot is using on IRC
370     Module: server
371    
372     server
373     Value: the server list index of the current server the bot is using
374     Module: server
375    
376     servidx
377     Value: the idx of the server socket
378     Module: server
379    
380     <FINISH ME>
381    
382    
383     *** BINDS ***
384    
385     <WRITE ME>
386    
387 stdarg 1.3 *** NETWORK COMMANDS ***
388    
389 stdarg 1.4 net_listen <port>
390     Description: Opens a listening port. If <port> is in use, it will try up to
391     20 higher ports until a free one is found.
392     Returns: A list of 2 items: The new idx, and the real port being used.
393     Notes: When an incoming connection is accepted, the "newclient" event will
394     execute.
395    
396 stdarg 1.3 net_open <host> <port> [timeout]
397     Description: Opens an async connection to the given host and port. If
398     'host' is not an ip address, a dns lookup is performed without blocking.
399     The 'timeout' optional parameter lets you specify a connection timeout
400     in milliseconds. If not given, or if the value is 0, then eggdrop's
401     default timeout value is used. If given as -1, no timeout is used.
402     Returns: A valid idx in an unconnected state.
403     Notes: When the connection is established, the "connect" event will
404     execute. If there is a dns error, a connection error, or the timeout
405     elapses, the "eof" event will execute with the appropriate error code.
406     Use the net_handler command to set handlers for these events.
407    
408     net_close <idx>
409     Description: Close the given idx.
410     Returns: 0 for success, -1 if the idx is invalid or already closed.
411    
412     net_write <idx> <text> [len]
413     Description: Writes data to an idx.
414     Returns: The number of bytes written to the actual network interface, or
415     -1 upon error.
416     Notes: Any unwritten data is buffered and will be written as soon as
417     possible. Use the 'len' parameter if you are writing binary data which
418     contains embedded NULL's, otherwise the C strlen() function is used to
419     determined the number of bytes to write.
420    
421     net_handler <idx> <event> [callback]
422     Description: Sets or unsets a callback for a particular event on an idx.
423     The syntax of the callback varies with the event:
424     connect_callback <idx> <peer_ip> <peer_port>
425     Called when the idx establishes an outgoing connection.
426     newclient_callback <idx> <newidx> <peer_ip> <peer_port>
427     Called when an incoming connection is established.
428     eof_callback <idx> <err> <errmsg>
429     Called when eof is detected or there is an error, such as when the
430     connection times out or is refused by the host.
431     read_callback <idx> <data> <len>
432     Called when data is ready on the idx, after any filtering has been
433     performed. (For more information, see net_linemode.)
434     written_callback <idx> <len> <remaining_len>
435     Called when buffered data has been written in the background.
436     delete_callback <idx>
437     Called when the idx is deleted.
438     Returns: 0 for success, -1 for an invalid idx, -2 for an invalid event type.
439     Notes: To unset a handler, leave off the 'callback' parameter.
440    
441     net_info <idx> <what>
442     Description: Provides statistics on a given idx. Possible values for 'what'
443     are:
444     bytesleft - number of buffered bytes remaining to be written
445    
446     net_linemode <idx> <on-off>
447     Description: Sets line buffering to either on (1) or off (0) for an idx.
448     When linemode is on, data is buffered until a full line is read. If more
449     than one line is read, the "read" event is triggered for each individual
450     line. The line is passed to the read handler with the end-of-line (either
451     CR, LF, or CRLF) stripped from the data.
452     Returns: Nothing.
453    
454     net_throttle <idx> <speed-in> <speed-out>
455     Description: Turn on speed throttling. The values given are in bytes per
456     second.
457     Returns: Nothing.
458     Notes: A speed parameter of <= 0 will disable throttling for that direction.
459    
460     net_throttle_in <idx> <speed-in>
461     Description: Modify the 'speed-in' parameter of an already-throttled idx.
462     Returns: Nothing.
463     Notes: A 'speed-in' of <= 0 will disable input throttling.
464    
465     net_throttle_out <idx> <speed-out>
466     Description: Modify the 'speed-out' parameter of an already-throttled idx.
467     Returns: Nothing.
468     Notes: A 'speed-out' of <= 0 will disable output throttling.
469    
470     net_throttle_off <idx>
471     Description: Removes throttling from an idx.
472 stdarg 1.8
473     *** TCL ONLY ***
474    
475     net_add_tcl <channel>
476     Description: Adds a tcl channel to eggdrop's event loop so that its events
477     can be serviced quickly.
478     Returns: Nothing.
479    
480     net_rem_tcl <channel>
481     Description: Removes a previously added tcl channel from eggdrop's event
482     loop.
483     Returns: Nothing.

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23