Command Extensions | ||||||||||
act | away | bcst | bot | chat | chjn | chof | chon | chpt | ctcp | ctcr |
dcc | disc | fil | filt | flud | join | kick | link | load | mode | msg |
msgm | nick | nkch | notc | note | part | pub | pubm | raw | rcvd | rejn |
sent | sign | splt | time | topc | unld | wall | ||||
You can use the bind command to attach Tcl procedures to certain events. For example, you can write a Tcl procedure that gets called every time a user says "danger" on the channel. The following is a list of the types of bindings, and how they work. Under each binding type is the format of the bind command, the list of arguments sent to the Tcl proc, and an explanation. Some bindings are marked as stackable. That means that you can bind multiple commands to the same trigger. Return Values: Several bindings pay attention to the value you return from the proc (using "return $value"). To remove a binding, use unbind. For example, to remove that binding for the msg-command "stop", |
This is an exhaustive list of all the Tcl commands added to eggdrop. All of the normal Tcl built-in commands are still there, of course. But you can also use these to manipulate features of the bot. They are listed according to category.
NOTICE: This list is accurate for ONLY the v1.3 series of eggdrop!
When someone does an action on the botnet, it invokes this binding. Flags is ignored. The mask is checked against the text of the action (this is very similar to the CHAT binding).
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Assoc Module
Return to Index
Triggers when a user goes away or comes back on the botnet (msg == "" when returning)
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: User Record Ban Commands
Return to Index
When a bot says something on the botnet, it invokes this binding. Flags is ignored. The mask is checked against the text.
See Also: bind, unbind, or Command Extensions
Return to Index
Yes, you can use the new flag binding method here too, and this is where it becomes truely phearfull since you may never need to check attr's inside functions again...imagine: bind pub -o&+o command command_proc to only allow channel-spec ops to use it! No problem! Works fine!
Returns: Name of the command that was added, or (if proc-name was omitted), a list of the current bindings for this command.
See Also: Miscellaneous Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Global Variables
Return to Index
See Also: Global Variables
Return to Index
See Also: DCC Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
When someone says something on the botnet, it invokes this binding. Flags is ignored. Nick could be a user on this bot (ie "DronePup") or on another bot (ie "Eden@Wilde"). The mask is checked against the text.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: User Record Manipulation Commands
Return to Index
n (Botowner) &n (Channel owner) o&m (Global op, Channel master)Now you can use even more complex matching of flags, including +&- flags and & or | (and or or) matching.
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
When someone joins a botnet channel, it invokes this binding. Flags is ignored. The mask is checked against the text.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: User Record Manipulation Commands
Return to Index
Triggered when someone leaves the party line to disconnect from the bot. Mask matches against the handle. Note that the connection may have already been dropped by the user, so don't send output to that idx.
See Also: bind, unbind, or Command Extensions
Return to Index
When someone first enters the "party-line" area of the bot via dcc chat or telnet, this is triggered before they are connected to a chat channel (so yes, you can change the channel in a 'chon' proc). Mask matches against handle. This is NOT triggered when someone returns from the file area, etc.
See Also: bind, unbind, or Command Extensions
Return to Index
When someone parts a botnet channel, it invokes this binding. Flags is ignored. The mask is checked against the channel.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: DCC Commands
Return to Index
The control procedure is called with these parameters: procname <idx> <input-text> This allows you to use the same proc for several connections. The idx will stay the same until the connection is dropped -- after that, it will probably get reused for a later connection.
To indicate that the connection has closed, your control procedure will be called with blank text (the input-text will be ""). This is the only time it will ever be called with "" as the text, and it is the last time your proc will be called for that connection.
If you want to hand control of your connection back to eggdrop, your proc should return 1. Otherwise, return 0 to retain control.
Return to Index
See Also: DCC Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: File System Module
Return to Index
Return Value: | Return 1 to ask the bot not to process the CTCP command on its own. Otherwise it would send its own response to the CTCP (possibly an error message if it doesn't know how to deal with it). |
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
Return Value: | Return 1 to make the command get logged like so: |
#handle# command |
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: DCC Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: File System Module
Return to Index
See Also: DCC Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
Triggered when a bot disconnects from the botnet for whatever reason. Just like the link bind, flags are ignored. Mask is checked against the nickname of the bot that left.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Output Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Notes Module
Return to Index
See Also: File System Module
Return to Index
Return Value: | Return 1 to make the command get logged like so: |
#handle# files: command |
See Also: bind, unbind, or Command Extensions
Return to Index
DCC party line and file system users have their text sent through filt before being processed. If the proc a blank string, the text is considered parsed. Otherwise the bot will use the text returned from the proc and continue parsing that.
Return Value: | Return 1 to indicate the text has been processed, and the bot should just ignore it. Otherwise it will treat the text like any other. |
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Channel Commands
Return to Index
Any floods detected through the flood control settings (like 'flood-ctcp') are sent here before processing. If the proc returns 1, no further action is taken on the flood. If the proc returns 0, the bot will do its normal "punishment" for the flood. The flood type is pub, msg, join, or ctcp (and can be masked to "*" for the bind). Flags is ignored.
Return Value: | Return 1 to ask the bot not to take action on the flood. Otherwise it will do its normal punishment. |
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: DCC Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: File System Module
Return to Index
BOTFL Returns the current bot-specific flags for the user (if it's a bot :) BOTADDR (another bot-only thing :) returns a list containing the bots address, the bots telnet port, and it's relay port. HOSTS Returns a list of the host for the user LASTON Returns a list containing the unixtime last seen, and the last seen place. OR LASTON #channel Returns the time last seen on the channel or 0 if no info INFO Returns the user's global info line XTRA Returns the old xtra info COMMENT Returns the master-visible only comment for the user EMAIL Returns the users email address URL Returns the users url address
See Also: setuser, User Record Manipulation Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: User Record Ban Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: User Record Ban Commands
Return to Index
See Also: Channel Commands
Return to Index
Triggered by someone joining the channel. The <mask> in the bind is matched against #channel nick!user@host and can contain wildcards.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Channel Commands
Return to Index
Triggered when someone is kicked off the channel. The <mask> is matched against #channel nick where the nickname is of the person who got kicked off (can use wildcards). The proc is called with the nick, user@host, and handle of the kicker, plus the channel, the nickname of the person who was kicked, and the reason. <flags> is unused here.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: User Record Ban Commands
Return to Index
See Also: Assoc Module
Return to Index
See Also: User Record Ban Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Global Variables
Return to Index
See Also: Miscellaneous Commands
Return to Index
Triggered when a bot links into the botnet. Botname is the name of the bot that just linked in. Via is the bot it linked through. The mask is checked against the bot that linked. Flags is ignored.
See Also: bind, unbind, or Command Extensions
Return to Index
listen <port> bots [mask]
Accepts connections from bots only. The optional mask is used to identify permitted bot names. If the mask begins with '@' it is interpreted to be a mask of permitted hosts to accept connections from.
Returns: Port #.
listen <port> users [mask]
Accepts connections from users only (no bots). The optional mask is used to identify permitted nicknames. If the mask begins with '@' it is interpreted to be a mask of permitted hosts to accept connections from.
Returns: port #.
listen <port> all [mask]
Accepts connections from anyone. The optional mask is used to identify permitted nicknames/botnames. If the mask begins with '@' it is interpreted to be a mask of permitted hosts to accept connections from.
Returns: port #.
listen <port> script <proc>
Accepts connections which are immediately routed to a proc. The proc is called with one parameter: the idx of the new connection.
Returns: port #.
listen <port> off
Stop listening at a port.
Returns: Nothing.
See Also: DCC Commands
Return to Index
See Also: Notes Module
Return to Index
Triggers when a module is loaded.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Channel Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
Returns: Hostmask for the string given: | "n!u@1.2.3.4" -> "*!u@1.2.3.* |
n!u@lame.com" -> "*!u@lame.com | |
n!u@a.b.edu" -> "*!u@*.b.edu |
See Also: Miscellaneous Commands
Return to Index
See Also: User Record Ban Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
? | matches any single character |
* | matches 0 or more characters of any type |
% | matches 0 or more non-space characters (can be used to match a single word) |
~ | matches 1 or more space characters (can be used for whitespace between words) |
See Also: File System Module
Return to Index
Return Value: | Return 1 to make the command get logged like so: |
(nick!user@host) !handle! command |
See Also: bind, unbind,, or Command Extensions
Return to Index
Matches the entire line of text from a /msg with the mask. This is more useful for binding Tcl procs to words or phrases spoken anywhere within a line of text.
See Also: bind, unbind,, or Command Extensions
Return to Index
Mode changes are broken down into their component parts before being sent here, so the <mode-change> will always be a single mode, like "+m" or "-o" and victim will show the value of the mode change (for o/v/b) otherwise "". Flags are ignored. The bot's automatic response to a mode change will happen AFTER all matching Tcl procs are called. The <mask> will have the channel prefixed (ie, "#turtle +m").
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: File System Module
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: User Record Ban Commands
Return to Index
sticky forces the ban to be always active on a channel, even with dynamic bans on none (no effect)Returns: Nothing
See Also: User Record Ban Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
Triggered when someone changes nicknames. Wildcards are allowed. The mask is matched against #channel newnick.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Channel Commands
Return to Index
Triggered whenever a local users nick is changed (in the userfile).
See Also: bind, unbind, or Command Extensions
Return to Index
Matches the entire line of text from a /notice with the mask. It is considered a breach of protocol to respond to a /notice on IRC, so this is intended for internal use (ie, logging, etc) only.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Notes Module
Return to Index
Numerical version is "MMNNRRPP" where: | MM is the Major release number |
NN is the Minor release number | |
RR is the sub-release number | |
PP is the patch level for that sub-release |
See Also: Global Variables
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
Triggered by someone leaving the channel. As in JOIN, the <mask> is matched against #channel nick!user@host and can contain wildcards.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: User Record Manipulation Commands
Return to Index
Return Value: | Return 1 to make the command get logged like so: |
<nick> !handle! command |
See Also: bind, unbind, or Command Extensions
Return to Index
Just like MSGM, except it's triggered by things said on a channel instead of things /msg'd to the bot. The mask is matched against the channel name followed by the text, ie, #nowhere hello there!, and can contain wildcards.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Channel Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: Output Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: Output Commands
Return to Index
See Also: Output Commands
Return to Index
See Also: Output Commands
Return to Index
See Also: Output Commands
Return to Index
See Also: Output Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
Previous versions of eggdrop required a special compile option to enable this binding, but it's now standard. The mask is checked against the keyword (either a numeric like "368" or a keyword like "PRIVMSG"). <from> will be the server name or the source user (depending on the keyword). flags are ignored. The order of the arguments is identical to the order that the IRC server sends to the bot -- the pre-processing only splits it apart enough to determine the keyword. If the proc returns 1, eggdrop will not process the line any further (THIS COULD CAUSE YOUR BOT TO BEHAVE ODDLY IN SOME CASES).
Return Value: | Return 1 to ask the bot not to process the server text. This can affect the bot's performance (by causing it to miss things that it would normally act on) -- you have been warned. |
See Also: bind, unbind, or Command Extensions
Return to Index
Triggered after a user uploads a file successfully. Mask is matched against the user's handle. Nick is the nickname on IRC that the file transfer originated from. The path is where the file ended up, relative to the dcc directory (usually this is your incoming dir)
(THIS IS ONLY AVALIABLE WHEN THE transfer.so MODULE IS LOADED)
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: DCC Commands
Return to Index
Someone who was split has rejoined. <mask> can contain wildcards, and contains channel and nick!user@host just like join.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: File System Module
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
After a user has successfully downloaded a file from the bot, this binding is triggered. Mask is matched against the handle of the user that initiated the transfer. Nick is the actual recipient (on IRC) of the file. The path is relative to the dcc directory (unless the file transfer was started by a script call to dccsend, in which case the path is the exact path given in the call to dccsend). (This IS ONLY Avaliable When The transfer.so Module Is Loaded).
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Global Variables
Return to Index
See Also: DCC Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
See Also: File System Module
Return to Index
PASS - use this to set a users password (no 3rd arg will clear it) HOSTS - for setting hosts, no extra info = clear, otherwise *1* hostmask is added :P LASTON - 2 forms: setuserSee Also: getuser, User Record Manipulation Commandslaston sets global laston time setuser laston * will set a users laston time in a channel record (if it already exists)
Triggered by a signoff, or possibly by someone who got netsplit and never returned. The signoff message is the last argument to the proc. Wildcards can be used in <mask>, which contains the channel name.
See Also: bind, unbind, or Command Extensions
Return to Index
Triggered when someone gets netsplit on the channel. Be aware that this may be a false alarm (it's easy to fake a netsplit signoff message). <mask> may contain wildcards, and is matched against the channel and nick!user@host just like join. Anyone who is SPLT will trigger a REJN or SIGN within the next 15 minutes.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Notes Module
Return to Index
See Also: Miscellaneous Commands
Return to Index
All of the connections are *event driven*. This means that the bot will trigger your procs when something happens on the connection, and your proc is expected to return as soon as possible. Waiting in a proc for more input is a no-no.
To initiate an outgoing connection, use: set idx [connect "hostname.goes.here" 3333] (as an example). $idx now contains a new DCC entry for the outgoing connection.
All connections use non-blocking (commonly called "asynchronous",which is a misnomer) I/O. Without going into a big song and dance about asynchronous I/O, what this means to you is:
The only time a connect call will return an error is if you gave a hostname and it couldn't find the IP for that hostname (this is considered a "DNS error"). Otherwise it will appear to have succeeded, and if the connection failed, you will immediately get an EOF.
Right after doing a connect call, you should set up a control for the new idx (see the section above). From then on, the connection will act just like a normal DCC connection that has been put under the control of a script. If you ever return "1" from the control proc (indicating that you want control to return to eggdrop), the bot will just close the connection and dispose of it. Other commands that work on normal DCC connections, like killdcc and putdcc, will work on this idx too.
To create a listening port, use: listen 6667 script grabproc which will create a new listening port at 6667, and assign it to the script 'grabproc'.
When a new connection arrives, eggdrop will connect it up and create a new idx for the connection. That idx is sent to 'grabproc'. The proc will generally want to immediately put this idx under control:
proc grabproc {newidx} { control $newidx my_control }
Once your grabproc has been called, the idx behaves exactly like an outgoing connection would.
The best way to learn how to use these commands is to find a script that uses them and follow it carefully. Hopefully this has given you a good start though.
Return to Index
See Also: Miscellaneous Commands
Return to Index
Allows you to schedule procedure calls at certain times, mask matches 5 space seperated integers of the form: "min hour day month year".
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
Triggered by a topic change. Can use wildcards in <mask>, which is matched against the channel name and new topic.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Channel Commands
Return to Index
See Also: Miscellaneous Commands, bind
Return to Index
Triggers when a module is unloaded.
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Global Variables
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Miscellaneous Commands
Return to Index
See Also: Channel Commands
Return to Index
See Also: DCC Commands
Return to Index
See Also: User Record Manipulation Commands
Return to Index
See Also: Global Variables
Return to Index
When the bot receives a wallops, it invokes this binding. Flags is ignored. The mask is checked against the text of the wallops msg.
Return Value: | Return 1 to make the command get logged liked so: |
!nick! msg |
See Also: bind, unbind, or Command Extensions
Return to Index
See Also: DCC Commands
Return to Index