/[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.5 - (hide annotations) (download)
Fri Apr 4 20:30:03 2003 UTC (16 years, 10 months ago) by stdarg
Branch: MAIN
Changes since 1.4: +72 -19 lines
* Doc updates for server mod

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23