Next: Introduction, Previous: (dir), Up: (dir) [Index]
Next: Configuration, Previous: Top, Up: Top [Index]
Bobot++ is a powerful IRC bot written in C++. It can be used standalone as a channel maintenence bot, or extended to do almost anything using Scheme scripts.
FIXME: Fill the intro in more?
Next: Using the Bot, Previous: Introduction, Up: Top [Index]
Bobot++ is easy to configure. See the examples directory for an example configuration.
The main configuration file is bot.conf. There are several auxiliary configuration files (a user list, aliases file, ban list, and a script autoexec).
• Configuration File Placement | ||
• Configuration Files |
Next: Configuration Files, Previous: Configuration, Up: Configuration [Index]
Bobot++ will look in /etc/bobotpp/default/ for its default config if none is specified on the command line. Put the configuration files you want to be loaded by default in this directory. If you are not root, or you want to have your own personal configuration, put it in ~/.bobotpp/config/default/.
Previous: Configuration File Placement, Up: Configuration [Index]
• bot.conf | ||
• bot.users | ||
• bot.init | ||
• bot.autoexec | ||
• bot.shit |
Next: bot.users, Previous: Configuration Files, Up: Configuration Files [Index]
bot.conf contains key value pairs separated by =
.
<key> = <value>
Comments are started with a #
and cause the entire line to be
ignored. Note that this only works when the #
is the first
character of the line.
bot.conf is the main configuration file for a Bobot++. The available configuration variables are listed below in the format “variable <default-value>: description”
A few of the options have more complex syntax, they are documented in their own subsections.
• server syntax | ||
• channel syntax |
Next: channel syntax, Previous: bot.conf, Up: bot.conf [Index]
The server syntax in bot.conf allows you to specify an alternate port to connect on, and a password to send the server.
You may use more than one server line; Bobot++ will attempt to connect
to the first one, and will connect to the next one in the list if it
fails. The bot will continue cycling through the server list until it
is able to connect to one. There is a command (!cycle
) to make
the bot to cycle servers.
server = server_name [port [password]]
This will make Bobot++ attempt to connect to server_name on port port with the password password. server_name should be the address of the server. port and password are optional.
Previous: server syntax, Up: bot.conf [Index]
The channel syntax in bot.conf allows you to specify the initial modes the bot should set on a channel, the modes the bot should maintain, and a key if the channel needs it.
You may have any number of channel lines. When Bobot++ starts it will attempt to join and gain operator status in every channel listed.
channel = name:initial_modes:modes_to_keep:channel_key
The bot will join name and set the channel modes to initial_modes (e.g. “nt”) if it is able to gain operator status. It will then maintain modes_to_keep. If the channel requires a key to enter simply set channel_key. Every argument except for name is optional.
A few example lines:
channel = #foo:nt:nt:bar
The bot will join #foo
with the channel key bar
and will
then maintain the modes nt
.
channel = #bar:::
The bot will join #bar
and will not set any modes nor will it
attempt to maintain any modes.
Next: bot.init, Previous: bot.conf, Up: Configuration Files [Index]
bot.users is the default file name of the userlist. It may be changed in bot.conf via the userlist option. You must add an entry for yourself manually. You will probably want to add other entries using the IRC command interface as it is more intuitive than editing the file by hand.
The file contains lines with the format:
‘host_mask:channel_mask:level:protection:auto-op:expiration:password’
*NONE*
to not have a password.
Next: bot.autoexec, Previous: bot.users, Up: Configuration Files [Index]
This file stores a list of IRC command aliases. The filename may be
changed in bot.conf via the initfile option. You use this
file to set up aliases for IRC commands, e.g. to make !a
call
!adduser
. This way you can save typing for commonly used commands.
The format of a line in the file is: alias command
This will make alias call command. e.g. ‘t topic’
will make !t New Topic
set the current channel’s topic to “New
Topic,” just as if you had used !topic New Topic
.
Next: bot.shit, Previous: bot.init, Up: Configuration Files [Index]
This file is only used when Bobot++ is compiled with scripting support. The name of the autoexec file can be changed in bot.conf via the autoexecfile option.
The contents of this file are evaluated by Guile when the bot starts. You can use this to do things like loading a few default modules when the bot starts.
Previous: bot.autoexec, Up: Configuration Files [Index]
This file stores the ban list. The name may be changed in bot.conf via the shitlist option. You will most likely want to use the IRC command interface to edit this file instead of editing it directly.
The file contains lines in the form:
‘host_mask:channel_mask:level:expiration:reason’
Next: Scripting, Previous: Configuration, Up: Top [Index]
Using Bobot++ is easy. This chapter covers starting the bot, a few Bobot++ specific concepts, and using the built-in commands of the bot.
• Starting the Bot | ||
• Concepts | ||
• Built-In Commands |
Next: Concepts, Previous: Using the Bot, Up: Using the Bot [Index]
The bot is usually installed with the binary name bobotpp. It accepts the following command line arguments.
[--help][-h]
- Shows detailed help and exits
[--version][-v]
- Shows version information and exits
[--no-background][-b]
- Run bobot++ in the foreground
[--config-file file][-f]
- Use file instead of bot.conf
[--config-dir dir][-d]
- Use dir as dir to load config file from
[--config dir][-c]
- Search your config path (defaults to
$HOME/.bobotpp/config/ and then /etc/bobotpp/) for
dir and then loads your config data using dir
[--sys-config dir][-s]
- Looks for config in
/etc/bobotpp/dir. Note that the user dir is still searched
first
[--user-config dir][-u]
- Looks for config in
$HOME/.bobotpp/config/dir/. Note that the system dir is
still searched after this if dir is not found.
[--debug][-D]
Makes Bobot++ print debugging info and run
in the foreground
[--debug-scripts][-S]
Enables the Guile debugging
evaluator for verbose script errors and backtraces while still running
the bot in the background.
The default configuration is read from $HOME/.bobotpp/config/default/ and then /etc/bobotpp/default/ if the user config is not found.
The bot defaults to running in the background as a daemon.
Next: Built-In Commands, Previous: Starting the Bot, Up: Using the Bot [Index]
There are a few general concepts that a user of Bobot++ should know about.
• User List | ||
• Shit List | ||
• Spy List | ||
• Levels |
• User Levels | ||
• Protection | ||
• Automatic Op | ||
• Shit Levels |
Next: Protection, Previous: Levels, Up: Levels [Index]
There are several user levels available in Bobot++ to provide gradated
access to commands. !adduser
and bot.users use the
numeric code; Scheme uses the textual name for the level. By default
(if the user is not found in the userlist) a user has access to
commands with the level bot:user-none
.
bot:user-none
- No built-in commands may be
executed by default (commands may be added from Scheme that can
be executed by users of level none and the level required to execute a
command may be changed from Scheme).
bot:user-user
- Will be able to execute most commands but
not all and cannot use masks on kicks and bans.
bot:user-trusted
- For built-ins with a default
configuration this user has access to the same set of commands as an
user
but may use masks on kicks and bans. Scheme commands may
be added which require a user to be of this level.
bot:user-friend
- In the default configuration a user who
is a friend will be able to do everything short of stopping the
bot. Again, there may be user added commands that require a higher
user level.
bot:user-master
- This is the highest user level and has
access to every feature of the bot.
Next: Automatic Op, Previous: User Levels, Up: Levels [Index]
A user added via Scheme, the bot.users file, or
!adduser
may be protected from being deoped, kicked, or
banned. The user list and IRC commands use the numeric codes, Scheme
uses the symbolic names.
bot:protection/none
No protection
bot:protection/no-ban
No ban. If a user is banned the bot will unban him..
bot:protection/no-kick
No kick. The user may still be kicked but the bot will kickban
the user who kicked the protected user.
bot:protection/no-deop
No deop. The bot will ensure that the user always maintains
operator status.
Next: Shit Levels, Previous: Protection, Up: Levels [Index]
A user may be automatically given operator status upon entering a channel. Scheme uses the symbolic name, the user list (bot.users) and IRC commands use the numeric value.
bot:aop/no
Do not automatically op the user
bot:aop/yes
Do automatically op the user
Previous: Automatic Op, Up: Levels [Index]
The shit list and shit list related commands use different levels to define how much the bot hates a user. Scheme uses the symbolic names, the shit list and IRC commands use the numbers.
bot:shit/none
The bot doesn’t hate the user (this is the
normal level)
bot:shit/no-op
The bot will deop the user any time he
gains operator priviliges in the channel
bot:shit/no-join
The bot will kick and ban the user when he
joins the channel
bot:shit/no-deban
The bot will kick and ban usre when he
joins the channel, and will prevent other users from debanning him.
Previous: Concepts, Up: Using the Bot [Index]
Bobot++ has many built-in commands that make it useful without scripting support. The reference leaves off the command char; remember to use whatever you defined the command char to be in bot.conf.
If a command needs the channel name then you must specify the channel as the first argument to the command when private messaging the bot a command. If, however, you are using the command in a channel you may omit the channel argument, and the bot will use the current channel.
Next: Message Commands, Previous: Built-In Commands, Up: Built-In Commands [Index]
These commands are used to control the behaviour of the bot.
Makes the bot leave and join channel.
Makes the bot stop immediately.
Makes the bot join channel.
Makes the bot use nickname new-nick.
Sets the flood rate to messages-per-second. The bot will consider users sending more than messages-per-second messges in a second to be flooding and will ignore them.
Sets the string returned when someone requestions the version info of the bot.
Next: Channel Control, Previous: Bot Control Commands, Up: Built-In Commands [Index]
These commands cause the bot to send messages (e.g. sending a message to a channel or performing an action). For all commands target may be either a user or a channel.
Makes the bot to perform the action do in a message sent to target.
Sends a raw irc command. command is the IRC command you wish to send (e.g. ‘PRIVMSG #foo Hello!’).
Makes the bot say message to target.
Next: Spylist Commands, Previous: Message Commands, Up: Built-In Commands [Index]
Bans mask from channel. You must be a trusted user to ban using a host mask, but a normal user may ban individual nicks.
Debans mask from channel. You must be a trusted user to deban with a mask.
Deops mask on channel.
Invites nick to channel.
Sets the modes that the bot will keep for channel.
Kicks mask out of channel, because of
reason. kickban
also bans mask.You must be a
trusted user to use a mask.
Locks topic on channel
Sets mode of channel to the mode string modes.
Ops nick on channel
Makes the bot leave channel.
Bans mask from channel for time
seconds. tkban
also kicks the user. You must be a trusted
user to use a mask.
Sets the topic in channel to topic. If topic is not supplied the current topic is sent as a notice to the user calling the command.
Unlocks the topic on channel
Next: User List Commands, Previous: Channel Control, Up: Built-In Commands [Index]
spylist
Shows the bot’s spylist.
spymessage
Adds you to the spylist
rspymessage
Removes you from the spy
list.
Next: Server List Commands, Previous: Spylist Commands, Up: Built-In Commands [Index]
Adds the user
deluser
Removes nick or
mask from the userlist.
Saves the userlist.
userlist
Shows the bot’s userlist
Next: Shit List Commands, Previous: User List Commands, Up: Built-In Commands [Index]
addserver
Adds the server specified by
host name or ip address to the server list.
delserver
Deletes server from server
list whose number in the server list is server number.
nextserver
Makes the bot connect to the
next server in its server list.
reconnect
Makes the bot reconnect to
its current server.
server
Select the server to connect
to. server number is the number of the server in the serverlist.
serverlist
Shows the bot’s serverlist.
Next: Channel Info, Previous: Server List Commands, Up: Built-In Commands [Index]
addshit
delshit
Removes nick or
mask from the shitlist
shitlist
Shows the bot’s shitlist.
Next: Scripting Commands, Previous: Shit List Commands, Up: Built-In Commands [Index]
banlist
channels
Prints the channel(s) where
the bot is currently.
names
Yes Shows the nicknames and
status of users on channel.
stats
Yes Gives channel’s statistics.
Next: Authentication Commands, Previous: Channel Info, Up: Built-In Commands [Index]
execute
Only available if scripting support is enabled
load
Reloads the userlist from disk.
loadscript
Only available if scripting support is enabled
Next: Miscellaneous Commands, Previous: Scripting Commands, Up: Built-In Commands [Index]
ident
Identifies you on the bot. Note
that you should not use this command in public …
password
Changes your password on the
bot. Use NONE
as password if you want to clear it. Do not use this
command in public!
Previous: Authentication Commands, Up: Built-In Commands [Index]
alias
Makes an alias, and adds the
function new name, that will do exactly the same command as
old name.
dcclist
Gives the list of all DCC Chat
connections.
help
nslookup
Does a nameserver query about
nick host, host or ip address.
who
Yes Show your level on channel
whois
Yes Shows information about
nick on channel
Next: Concept Index, Previous: Using the Bot, Up: Top [Index]
Bobot++’s most powerful feature is its scripting system. You write scripts using Guile Scheme. This manual does not cover how to use Guile or how to learn Scheme. See Guile Reference Manual in The Guile Reference Manual, for the Guile reference manual and http://www.ccs.neu.edu/home/dorai/t-y-scheme/t-y-scheme.html for a good tutorial on Scheme.
Note that in previous versions the scripting commands where in the
form bot-function
. They are now in the form
bot:function
. The old names are still available, but are
deprecated and will be removed in Bobot++ 3.0. New commands are only
available with the bot:
prefix. The command perl -pi
-e ``s/bot-/bot:/g'' your-files
should be enough to convert
your code to use the new functions.
NOTE: All arguments to functions and hooks called by the bot are strings unless otherwise specified.
• Adding New Commands | ||
• Hooks | ||
• Sending Messages | ||
• Misc Scripting Stuff | ||
• Scheme Commands | ||
• Query Functions |
Adding a new command is simple. To register a new command use
bot:addcommand
.
The name is a string representing the name of the command being
added. func is a function accepting num-of-args
arguments. needs-channel? is a bool that is true if the function
needs the channel name as its first arg, and false otherwise.
num-of-args is the number of args func will take and must
be within zero (0) and twenty (20). min-level is one of the
User Levels. A user must be at least a min-level user to
use the new command. None of the arguments are guaranteed to be
passed; if they aren’t they are set to the empty string ""
. An
example of a new command would be:
(define (hello channel name) (if (string=? name "") (bot:say channel "Hello world!") (bot:say channel (string-append "Hello " name "!"))) (bot:addcommand "hello" hello #t 2 0)
This will display “Hello World!” if called as !hello and “Hello World USER” if called as !hello USER.
Next: Sending Messages, Previous: Adding New Commands, Up: Scripting [Index]
Hooks are a powerful feature of Bobot++. Hooks are a hybrid of ircII and tiny fugue (a MUD bot) hooks with a little bit of extra stuff added in. A hook is called when a regular expression is matched against a message sent to or by the bot.
Bobot++ uses different hook types for each IRC message type, and also includes a hook for accessing raw irc messages. Hooks are tagged with a priority and a flag that specifies whether to call the next hook that matches after calling the current one or to stop processing.
Hooks are processed from the highest to lowest priority, with fallthrough hooks of equal priority to non-fallthrough hooks being executed first.
• Creating a Hook | ||
• Hook Types |
Next: Hook Types, Previous: Hooks, Up: Hooks [Index]
To add a new hook you use the function bot:addhook
.
type specifies the type of hook (the types of hooks are listed in Hook Types).
regex is a standard regular expression. If regex is matched, function will be called.
function will take a different number of args depending on the hook type.
pri specifies the priority of the hook—higher priority hooks
are executed first. This argument is optional and defaults to
0
.
fall is #t
if the hook is a fallthrough hook and
#f
is the hook is not a fallthrough hook. This arg is also
optional and defaults to #t
.
name is the optional name of the hook that defaults to
"DEFAULT"
. If you set the name then you can have more than
one hook that matches the same regexp, as long as they have the same
name. E.g. in a log script you could have the regexps for the log
function all be ".*"
and set their names to "log"
to
avoid a conflict with other hooks.
Previous: Creating a Hook, Up: Hooks [Index]
The following sections document the different hooks Bobot++ exposes.
The general format of each hook description is as if it were a
function to be defined, but these describe the function to be passed
to bot:addhook
. Do not name your functions these
names.
That said, here is the list of available hooks functions. FIXME: write docs
• Received Message Hooks | ||
• Sent Message Hooks | ||
• DCC CHAT Hooks | ||
• Miscellaneous Hooks |
Next: Sent Message Hooks, Previous: Hook Types, Up: Hook Types [Index]
The following hooks are triggered when a mesage is received by the bot.
This hook is triggered when someone performs an action.
from is the nickname the person that performed the action.
to is the target of the action, which is either a channel or the Bot’s nick if the user private messages the bot.
action is the text of the action. E.g. if someone did ‘*
foobar does baz’, then action would be the string "does
baz"
.
This hook is called when someone changes his nickname from old-nick to new-nick.
This hook is called when someone signs off of IRC.
nick is the nickname of the person signing off.
message is his quit message
This hook is called when a CTCP request is received by the bot.
nick is the nickname of the sender.
to is the target of the CTCP request. This will either be a channel the bot is in, or the nickname of the bot.
command is the CTCP command issued.
rest contains the arguments to the CTCP command.
This hook is called when a CTCP REPLY is received. This occurs when the bot has sent a CTCP request to another client. The CTCP REPLY is always addressed to the bot directly.
nick is the nickname of the person who replied.
command is the command to which nick is replying.
rest contains the body of the reply.
This is called when the bot is disconnected from a server.
server is the hostname of the server from which the bot was disconnected.
intentional is a flag set to #t
when the bot disonnected
from the server as the result of a command (issued by a user from IRC,
SIGHUP, or from a script), or #f
when the bot disconnected from
the server unintentionally..
This hook is called when a user invited the bot to join a channel.
nick is the nickname of the user who sent the invite.
channel is the channel to which the bot was invited.
This is called when a user or the bot joins a channel.
nick is the nickname of the user who joined channel. This may be the bot’s nickname (the IRC server sends the JOIN command back to the the bot after it joins a channel).
channel is the channel that was joined
This hook is called when a user, including the bot, is kicked out of a channel.
target is the nick of the user who was kicked. This may be the bot’s nick.
from is the nick of the user who issued the kick. This may also be the bot’s nick.
channel is the channel the kick was issued in.
reason is the reason the user was kicked.
This hook is called when a user parts a channel.
nick is the user who parted the channel. This may be the bot.
channel is the channel from which the user parted.
This hook is called when someone sets the modes of target.
nick is the user who set the modes. This may be the bot.
target is the target of the MODE command. This may be a channel or a user. If it is a user, it may be the bot.
modes is the MODE string.
This hook is called when someone sends a private message to the bot.
nick is the nickname of the user who sent the message.
message is the message the user sent.
This hook is called when a user send a private notice to the bot.
nick is the user who sent the notice.
message is the message the user sent.
This hook is called when a user sends a normal message to a channel.
nick is the user who sent the message.
channel is the channel to which the message was sent.
message is the message that was sent.
This hook is called when a user send a notice to a channel.
nick is the user who sent the notice.
channel is the channel to which the notice was sent.
message is the message that was sent.
This hook is called every time a message is received. This matches on the raw message text and passes the hook function the raw IRC message.
raw-message is the raw IRC message.
This hook is called when a user changes the topic in a channel.
nick is the user who set the topic. This may be the bot.
channel is the channel that’s topic was changed.
new-topic is the new topic.
Next: DCC CHAT Hooks, Previous: Received Message Hooks, Up: Hook Types [Index]
These hooks are called when the bot sends a message. mynick is always the bot’s nick and will not be documented in each hook description.
This hook is called when the bot sends a normal message to a channel.
channel is the channel to which the bot sent the message.
message is the message the bot sent.
This hook is called when the bot sends a private message to a user.
to is the nick of the user to whom the message was sent.
message is the message that was sent.
This hook is called when the bot sents an action to a channel or a user.
to is the channel or nick of the user to which the action was sent.
message is the text of the action.
This hook is called when the bot sends a CTCP message other than an ACTION to a channel or user.
to is the channel or nick of the user to which the CTCP was sent.
command is the CTCP command that was sent.
message is a string containing the arguments to the CTCP command.
This is called when the bot sends a WHO message. The regex is matched on who, which is also passed as the only argument to your function.
who is the channel or nick that was WHOed.
This is called when the bot sends a WHOIS message. The regex is matched on nick, which is also passed as the only argument to your function.
nick is the nickname of the person who was WHOISed.
Next: Miscellaneous Hooks, Previous: Sent Message Hooks, Up: Hook Types [Index]
These hooks are called when a user initializes a DCC CHAT and when the bot receives messages from the user in a DCC CHAT.
This hook is called when a user begins a DCC CHAT with the bot. from is the user’s address in the form ‘nick!user@host’.
This hook is called when a DCC CHAT is purged after being idle for a while, or when the user closes the DCC CHAT. As such, you cannot write any more data to the DCC CHAT.
address is the address (nick!user@host) of the person on the other side of the DCC.
This hook is called when a user sends a message to the bot through a DCC CHAT.
from is the user’s address in the form ‘nick!user@host’.
message is the message the user sent to the bot.
Previous: DCC CHAT Hooks, Up: Hook Types [Index]
This hook is called when a user is detected flooding the bot.
nick is the nickname of the user flooding the bot.
This hook is called once a minute. The regex is not used.
time is the in zero-padded hh:mm
format.
Next: Misc Scripting Stuff, Previous: Hooks, Up: Scripting [Index]
There are several types of messages you can send with Bobot++ from scripts. They are split into High and Low level message sending functions. Most bots will only use the high level functions, but the low level ones are provided for when a bot needs to do things like send raw IRC messages or CTCP commands.
• High Level Message Functions | ||
• Low Level Message Functions |
Next: Low Level Message Functions, Previous: Sending Messages, Up: Sending Messages [Index]
Send an “action” type message to channel
Send a public or private message to target.
target may be a channel or a nickname.
In versions of Bobot++ prior to 2.1.8 bot:say
could only send
to channels, and bot:msg
could only send private messages to
users. They are aliases of the same command now, but it may be worth
using them as they used to for clarity.
Sends message as a NOTICE to target. target may be a user (nick) or a channel.
Previous: High Level Message Functions, Up: Sending Messages [Index]
The “Low Level” messaging functions allow you to do things like send
CTCP messages. You probably want to read rfc 2812 and the CTCP spec
before using these. If you have no idea what these do, read rfc 2812
(IRC Client Protocol) and CTCP spec. These functions all return
*unspecified*
always, so don’t use the return value for
anything.
to is the target of your CTCP message, command is the
CTCP command, and message is the message (or arguments) of the
command. Make sure to bot:ctcp-quote
the message!
to is the target of your CTCP reply, command is the
CTCP command, and message is the message (or arguments) of the
command. Make sure to bot:ctcp-quote
the message!
This is used to reply to a ctcp that the bot has received.
Next: Scheme Commands, Previous: Sending Messages, Up: Scripting [Index]
These are a few useful things that I thought people writing scripts might want to know.
If you want to execute code when the bot exits, just do
add-hook! bot:exit-hook thunk
where thunk is an
argumentless procedure (a thunk). When the bot exits your thunk will
be called.
• Scheme Commands | ||
• Query Functions |
Next: Query Functions, Previous: Misc Scripting Stuff, Up: Scripting [Index]
These scheme functions are the same as the commands. They allow you to execute bot commands from scheme scripts.
Adds an user to the userlist, for a nick!user@host
matching the
one given, on a channel matching the channelMask given.
The level can be: | The prot can be: | The auto-op can be: |
0 - No level | 0 - No protection | 0 - No auto-op |
1 - User | 1 - No ban | 1 - Op on join |
2 - Trusted User | 2 - No kick | |
3 - Friend | 3 - No deop | |
4 - Master |
Adds the server specified by hostname or ip-address to the server list.
Adds an user to the shitlist, for a nick!user@host matching the one given, on a channel matching the channelMask given.
The level can be: 0 - No shit 1 - No op 2 - Kick and Ban on join 3 - Kick and Ban on join, no deban
Bans mask or nick from channel. You must be a trusted user to ban with a mask.
Gives nick or mask level new-level on channel(s) channel-mask. Note that you can not change level for someone whose level is greater than yours, and that you can not give a level greater than yours.
Makes the bot leave and join channel.
Debans mask or nick from channel. You must be a trusted user to deban with a mask.
Deletes server from server list whose number in the server list is server-number
Removes nick or mask from the userlist.
Removes nick or mask from the shitlist.
Deops mask or nick on channel.
Makes the bot stop immediately.
Invites nick on channel.
Makes the bot join channel.
Sets the modes that the bot will keep for channel. See also STATS.
Kicks mask or nick out of channel, because of reason. You must be a trusted user to use a mask.
Bans then kicks mask or nick out of channel, because of reason. You must be a trusted user to use a mask.
Locks topic on channel.
Sends mode-string as mode for channel.
Makes the bot connect to the next server in its server list.
Makes the bot use nickname nick.
Ops nick on channel.
Makes the bot leave channel.
Makes the bot reconnect to its current server.
Select the server to connect to. server-number is the number of the server in the serverlist.
Bans nick or mask from channel for time seconds.
Bans nick or mask from channel for time seconds, then kicks him/them because of reason.
If no topic is given, prints channel’s topic. Otherwise, the bot will change channel’s topic to topic.
Makes the bot unlock topic on channel.
Sends a WHO command to target. target may be either a channel or a user.
Sends a WHOIS command to nick. nick must be a nickname, you cannot send a WHOIS to a channel.
[ Probably deletes a command added with bot:addcommand
? ]
Previous: Scheme Commands, Up: Scripting [Index]
[ I didn’t know where to put any of these, so I just stuck them in here.
There probably needs to be several sections added, like dealing with users (kicking, added, etc), dealing with the bot (channels, nickname of the bot, etc), server issues (serverlist), useful tools (nslookup, whois), and do on. ]
These functions allow scripts to get various bits of information.
[ Probably returns the log port? ]
[ Gets the bot’s nickname? ]
Return the long bot version string (same as returned by a CTCP VERSION request, e.g. “bobotpp version 2.3.1.1-8cd2-dirty by unknown_lamer@FreeNode <clinton@unknownlamer.org>\n1.97 and below by eb@IRCNet <eb@via.ecp.fr>”).
Return the bot version only (e.g. “2.3.1.1-8cd2”).
[ Flushes the socket to the server? ]
[ Flushes the log port? ]
[ Returns a random number? What range? Why? ]
[ And what about the stuff defined in bobot-utils.scm ? I just added it here so it could be somewhere. There should also be a section dealing with modules. How to use them. What module scripts are in. What module bobot++ provided primites are in. And so on. ]
Write as many messages as you want to the log. If the arg is a thunk it will be executed and it’s output will be written to the log.
bot:match-not-channel
adds a prefix regex to your regex so it
doesn’t match the sender or channel in a PUBLIC message
bot:match-to-me
matches text that was addressed to the bot with a
’:’, ’,’, or nothing after the bot name.
Returns the CTCP quoted message
Input MUST NOT contain the trailing \r\n
(it is added by the message sending code).
Next: Function Index, Previous: Scripting, Up: Top [Index]
Jump to: | B |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
B | |||
Background on Hooks: | Hooks | ||
|
Jump to: | B |
---|
Next: Variable Index, Previous: Concept Index, Up: Top [Index]
Jump to: | %
A B C D H I J K L M N O P S T U |
---|
Jump to: | %
A B C D H I J K L M N O P S T U |
---|
Previous: Function Index, Up: Top [Index]
Jump to: | %
E |
---|
Index Entry | Section | ||
---|---|---|---|
| |||
% | |||
%bot:loadpath : | Query Functions | ||
| |||
E | |||
exit-hook : | Misc Scripting Stuff | ||
|
Jump to: | %
E |
---|