shroudBNC Tcl Commands Version: 1.3 ------------------------------------- Commands and variables which have been implemented as part of the eggdrop emulation are not listed in this file. For a list of such commands you should read "tcl-commands.doc" (which is part of the eggdrop package) instead. *** User management *** bncuserlist Description: Returns a list of all bouncer accounts. Returns: A tcl list. getbncuser [Parameter] Description: Returns: setbncuser [] [] Description: Returns: addbncuser Description: Creates a new bouncer user. If the user already exists his password is modified. Returns: Nothing. delbncuser Description: Deletes a bouncer user. Returns: Nothing. bnccheckpassword Description: Checks whether a given password matches a specific user's password. Returns: 1 if the is correct, 0 otherwise. trafficstats [] [] Description: Returns traffic statistics for the specified user. ConnectionType can be either server or client. Type can be in or out. Returns: The traffic (in bytes). *** User interaction *** putclient Description: Sends to the client connection that is attached to a bouncer user. Returns: 1 if successful, 0 otherwise, e.g. when the current context is not valid or when the user is not logged in. simul Description: Simulates in the context of . shroudBNC performs the as if the user has typed /. Returns: 1 if successful, 0 otherwise, e.g. when is not a valid user. floodcontrol Description: Enables or disables the flood-protection for a user or returns status information about it. Valid values for : bytes - returns the number of bytes in the user's queue. items - just like 'bytes', however it returns the number of items. on - enables the flood protection off - disables the flood protection Returns: 0 if the function failed, 1 if the function succeeded (for on / off) or the number of bytes / items. getusermodes Description: Returns the user's usermodes. Returns: A string. hijacksocket Description: Converts a client object into a tcl socket idx. The socket is then owned by the tcl script. This function can only be used in a "client" internalbind. The line which the "client" bind was triggered for will be copied to the new socket buffer. Returns: A socket idx. ** Context management *** setctx Description: Sets the context which is used for executing commands. Returns: Nothing. getctx Description: Returns the current context. Returns: A context. *** Internal commands *** internalchanlist Description: Do not use this. Use chanlist instead. See tcl-commands.doc for more details. Returns: A tcl list. internalchannels Description: Do not use this. Use channels instead. See tcl-commands.doc for more details. Returns: A tcl list. internalgetchanidle Description: Do not use this. Use getchanidle instead. See tcl-commands.doc for more details. Returns: The nick's idletime in seconds. internallisten Description: Do not use this. Use listen instead. See tcl-commands.doc for more details. Returns: A 'dcc' idx. internalsocketwriteln Description: Do not use this. Use putdcc instead. See tcl-commands.doc for more details. Returns: Nothing. internalconnect Description: Do not use this. Use connect instead. See tcl-commands.doc for more details. Returns: A 'dcc' idx. internalclosesocket Description: Do not use this. Use killdcc instead. See tcl-commands.doc for more details. Returns: Nothing. internalbind [] [] Description: Returns: internalunbind [] [] Description: Returns: impulse Description: Returns: *** Misc commands *** bncversion Description: Returns the version of shroudBNC, e.g. 0.9 0090000. Returns: A string identifying the current version. bncnumversion Description: Returns the version of shroudBNC, e.g. 0090000 Returns: A string identifying the current version. bncuptime Description: Returns the timestamp of the time when shroudBNC was started. Returns: A UNIX timestamp. bnccommand Description: Executes a module-specific command. This is used to communicate with other shroudBNC modules. Returns: The return value is module specific. If no module processed the command an empty string is returned. bncmodules Description: Returns: bncjoinchans Description: Returns: md5 Description: Calculates an MD5 hash for . Returns: An MD5 hash. debugout Description: Echos in the debug console. This command is Win32-specific. Returns: Nothing. haltoutput Description: Returns: bncsettag Description: Returns: bncgettag Description: Returns: getisupport Description: Returns a specific feature's value from the server's 005 replies. Returns: The value of the feature. requiresparam Description: Returns whether a channel-mode requires a parameter. Returns: 3 if the mode is a list (e.g. the banlist) and requires a parameter for setting and unsetting, 2 if the mode needs a parameter for setting and unsetting. 1 if the mode requires a parameter for setting it, 0 if the mode does not require a parameter requires a parameter for setting it. isprefixmode Description: Returns whether a channel-mode can be applied to nicks (e.g. +o or +v). Returns: 1 if the mode can be applied to nicks, 0 otherwise. getchanprefix Description: Returns the "best" prefix of a nick. Returns: The prefix (e.g. @ or +). bnckill Description: Disconnects a user from the bouncer. Returns: Nothing. bncdisconnect Description: Disconnects a user from the irc server. Returns: Nothing. bncreply Description: Sends a notice/msg to the current user (depending on how the command-bind was triggered.) Returns: Nothing. getcurrentnick Description: Use $::botnick instead. Returns: The bot's current nick. bncgetmotd Description: Returns the current motd. Returns: A string. bncsetmotd Description: Sets the motd. Returns: Nothing. bncgetgvhost Description: Returns the default vhost. Returns: A string. bncsetgvhost Description: Sets the default vhost. Returns: Nothing: bncvalidusername Description: Checks whether something is a valid username. Returns: 1 if the username is valid, 0 otherwise. bncvaliduser Description: Checks whether the specified user exists. Returns: Boolean value. synthwho Description: Synthesizes a /who reply for the given channel. Returns: 1 if successful, 0 otherwise. Undefined behaviour can occur when Simulate and the reply are both 0. getchanrealname [] Description: Returns the user's realname. Returns: A string or NULL. bncaddcommand [] Description: Adds a new command for /sbnc help. This command can only be used in an "internalbind command"-proc which was triggered for the command "help". Returns: Nothing. bncdeletecommand Description: Removes a command from the command list. Returns: Nothing. bncsetglobaltag Description: Creates/sets a global tag. Global tags are stored in the sbnc.conf configuration file. Returns: Nothing. bncgetglobaltag Description: Returns the value of a global tag. Returns: A string or NULL. bncgetglobaltags Description: Returns a list of global tags. Returns: A list. putmainlog Description: Logs something in the main log. Returns: Nothing. bncisipblocked Description: Checks whether an IP address is temporarily blocked (i.e. can't be used to login). Returns: Boolean value. bnclogbadlogin Description: Logs a bad login attempt for the specified IP address. Returns: Nothing.