Eggdrop Documentation - 4. Dcc commands

30-12-2010 10:35

4. Dcc commands

putdcc <idx> <text>

Description: sends text to the idx specified

Returns: nothing

Module: core

dccbroadcast <message>

Description: sends a message to everyone on the party line across the botnet, in the form of "*** <message>" for local users and "*** (Bot) <message>" for users on other bots

Returns: nothing

Module: core

dccputchan <channel> <message>

Description: sends your message to everyone on a certain channel on the botnet, in a form exactly like dccbroadcast does. Valid channels are 0 through 99999.

Returns: nothing

Module: core

boot <user@bot> [reason]

Description: boots a user from the partyline

Returns: nothing

Module: core

dccsimul <idx> <text>

Description: simulates text typed in by the dcc user specified. Note that in v0.9, this only simulated commands; now a command must be preceded by a '.' to be simulated.

Returns: nothing

Module: core

hand2idx <handle>

Returns: the idx (a number greater than or equal to zero) for the user given if the user is on the party line in chat mode (even if she is currently on a channel or in chat off), the file area, or in the control of a script. -1 is returned if no idx is found. If the user is on multiple times, the oldest idx is returned.

Module: core

idx2hand <idx>

Returns: handle of the user with the given idx

Module: core

valididx <idx>

Returns: 1 if the idx currently exists; 0 otherwise

Module: core

getchan <idx>

Returns: the current party line channel for a user on the party line; "0" indicates he's on the group party line, "-1" means he has chat off, and a value from 1 to 99999 is a private channel

Module: core

setchan <idx> <channel>

Description: sets a party line user's channel. The party line user is not notified that she is now on a new channel. A channel name can be used (provided it exists).

Returns: nothing

Module: core

console <idx> [channel] [console-modes]

Description: changes a dcc user's console mode, either to an absolute mode (like "mpj") or just adding/removing flags (like "+pj" or "-moc" or "+mp-c"). The user's console channel view can be changed also (as long as the new channel is a valid channel).

Returns: a list containing the user's (new) channel view and (new) console modes, or nothing if that user isn't currently on the partyline

Module: core

echo <idx> [status]

Description: turns a user's echo on or off; the status has to be a 1 or 0

Returns: new value of echo for that user (or the current value, if status was omitted)

Module: core

strip <idx> [+/-strip-flags]

Description: modifies the strip-flags for a user. The supported strip-flags are:

b

remove all boldface codes

c

remove all color codes

r

remove all reverse video codes

u

remove all underline codes

a

remove all ANSI codes

g

remove all ctrl-g (bell) codes

Returns: new strip-flags for the specified user (or the current flags, if strip-flags was omitted)

Module: core

putbot <bot-nick> <message>

Description: sends a message across the botnet to another bot. If no script intercepts the message on the other end, the message is ignored.

Returns: nothing

Module: core

putallbots <message>

Description: sends a message across the botnet to all bots. If no script intercepts the message on the other end, the message is ignored.

Returns: nothing

Module: core

killdcc <idx>

Description: kills a partyline or file area connection

Returns: nothing

Module: core

bots

Returns: list of the bots currently connected to the botnet

Module: core

botlist

Returns: a list of bots currently on the botnet. Each item in the list is a sublist with four elements: bot, uplink, version, sharing status:

bot

the bot's botnetnick

uplink

the bot the bot is connected to

version

its current numeric version

sharing

a "+" if the bot is a sharebot; "-" otherwise

Module: core

killdcc <idx>

Description: kills a partyline or file area connection

Returns: nothing

Module: core

islinked <bot>

Returns: 1 if the bot is currently linked; 0 otherwise

Module: core

dccused

Returns: number of dcc connections currently in use

Module: core

dcclist [type]

Returns: a list of active connections, each item in the list is a sublist containing six elements: {<idx> <handle> <hostname> <type> {<other>} <timestamp>}

The types are: chat, bot, files, file_receiving, file_sending, file_send_pending, script, socket (these are connections that have not yet been put under 'control'), telnet, and server. The timestamp is in unixtime format.

Module: core

whom <chan>

Returns: list of people on the botnet who are on that channel. 0 is the default party line. Each item in the list is a sublist with six elements: nickname, bot, hostname, access flag ('-', '@', '+', or '*'), minutes idle, and away message (blank if the user is not away). If you specify * for channel, every user on the botnet is returned with an extra argument indicating the channel the user is on.

Module: core

getdccidle <idx>

Returns: number of seconds the dcc chat/file system/script user has been idle

Module: core

getdccaway <idx>

Returns: away message for a dcc chat user (or "" if the user is not set away)

Module: core

setdccaway <idx> <message>

Description: sets a party line user's away message and marks them away. If set to "", the user is marked as no longer away.

Returns: nothing

Module: core

connect <host> <port>

Description: makes an outgoing connection attempt and creates a dcc entry for it. A 'control' command should be used immediately after a successful 'connect' so no input is lost.

Returns: idx of the new connection

Module: core

listen <port> <type> [options] [flag]

Description: opens a listening port to accept incoming telnets; type must be one of "bots", "all", "users", "script", or "off":

listen <port> bots [mask]

Description: 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 number

listen <port> users [mask]

Description: 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 number

listen <port> all [mask]

Description: 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 number

listen <port> script <proc> [flag]

Description: accepts connections which are immediately routed to a proc. The proc is called with one parameter: the idx of the new connection. Flag may currently only be 'pub', which makes the bot allow anyone to connect.

Returns: port number

listen <port> off

Description: stop listening on a port

Returns: nothing

Module: core

dccdumpfile <idx> <filename>

Description: dumps out a file from the text directory to a dcc chat user. The flag matching that's used everywhere else works here, too.

Returns: nothing

Module: core