Aqu4bot: Difference between revisions

From SoylentNews
Jump to navigation Jump to search
Line 24: Line 24:
== Modules ==
== Modules ==
As aqu4bot is compiled into native executables, it does not support modules. Expanded features must be added by editing the existing source code.
As aqu4bot is compiled into native executables, it does not support modules. Expanded features must be added by editing the existing source code.
commands.c in CMD_ProcessCommand() is the bare minimum location you can add new commands. Depending on the sophistication of your new command, editing irc.c's IRC_Loop may be necessary, and depending on the sophistication, you may wish to add a new source file. You'll need to edit src/Makefile to add it to the build process. Remember to edit the help list at the top of commands.c.
commands.c in CMD_ProcessCommand() is the bare minimum location you can add new commands.
 
Depending on the sophistication of your new command, editing irc.c's IRC_Loop may be necessary, and depending on the sophistication, you may wish to add a new source file. You'll need to edit src/Makefile to add it to the build process. Remember to edit the help list at the top of commands.c.
 
aqu4bot is written in mostly-ANSI C (mostly C89). snprintf() and stdint.h are among the few C99 facilities we use, but we do NOT use any C99 language features, just headers and functions, and only the ones that are almost always going to exist such as snprintf(). Using C99 code will result in a warning from the compiler.
aqu4bot is written in mostly-ANSI C (mostly C89). snprintf() and stdint.h are among the few C99 facilities we use, but we do NOT use any C99 language features, just headers and functions, and only the ones that are almost always going to exist such as snprintf(). Using C99 code will result in a warning from the compiler.
== libcurl ==
As of recent revisions, aqu4bot links against libcurl. The functionality is used for http support mostly. See curlcore.c for CurlCore_GetHTTP().
Additional libcurl features such as SMTP should be implemented by creating base functions for that functionality in curlcore.c, and calling the new functions to use them in your new command. Remember to add them to aqu4.h.


== The 'wz' command ==
== The 'wz' command ==

Revision as of 08:09, 8 September 2014

Logo for aqu4bot.
Logo for aqu4bot.

aqu4bot, the main instance in IRC as aqu4, with the slogan "aqu4, daughter of pr0t0!" is an IRC bot written in C by Subsentient. She has a wide range of functionality, many of her commands being humorous and others being obscure. She has channel management capabilities, user tracking and messaging capabilities, and an extensive logging system.

Basic usage

aqu4bot can be set to respond to any prefix on a per-channel basis, but by default she responds to the dollar sign $, but will always respond to her name presented as aqu4:, followed by a space, to produce 'aqu4: commands'. She will not say anything if you specify an invalid command. Help is available with the 'help' command, of course accessible via $help or aqu4: help. No prefix is required in private messages, so /msg aqu4 help will indeed get you the help command. Likewise, the 'commands' command gives a list of available commands for the bot, but 'help' would have told you that.

Source code

aqu4bot's source code is available at https://github.com/Subsentient/aqu4bot

Availability

aqu4bot runs as user aqu4 on irc.soylentnews.org, irc.freenode.net, and irc.ootws.ca. irc.ootws.ca can be intermittent, so the subdomain ootwsirc.universe2.us was created by Subsentient to allow better access.

Logging

aqu4bot has an extensive and capable logging system, with the logs being stored at http://universe2.us/irclogz You will need to request a password from the bot maintainer, Subsentient to get access to the logs.

Modules

As aqu4bot is compiled into native executables, it does not support modules. Expanded features must be added by editing the existing source code. commands.c in CMD_ProcessCommand() is the bare minimum location you can add new commands.

Depending on the sophistication of your new command, editing irc.c's IRC_Loop may be necessary, and depending on the sophistication, you may wish to add a new source file. You'll need to edit src/Makefile to add it to the build process. Remember to edit the help list at the top of commands.c.

aqu4bot is written in mostly-ANSI C (mostly C89). snprintf() and stdint.h are among the few C99 facilities we use, but we do NOT use any C99 language features, just headers and functions, and only the ones that are almost always going to exist such as snprintf(). Using C99 code will result in a warning from the compiler.

libcurl

As of recent revisions, aqu4bot links against libcurl. The functionality is used for http support mostly. See curlcore.c for CurlCore_GetHTTP(). Additional libcurl features such as SMTP should be implemented by creating base functions for that functionality in curlcore.c, and calling the new functions to use them in your new command. Remember to add them to aqu4.h.

The 'wz' command

This command is used to list games in the Warzone 2100 game lobby, as told in 'help wz'. Warzone 2100 is an open source cross-platform RTS strategy game that Subsentient is very fond of.

The slogan

"aqu4, daughter of pr0t0!" is a homage to the predecessor of aqu4, pr0t0bot, a patchy, unstable, poorly written yet highly useful python bot based on phenny that was operated by Subsentient on freenode from 2010 to early 2014. It was designed to mimic a helpful personality, and as a result, users of pr0t0 became fond of it, including Subsentient, and to ease the feelings of loss, aqu4 was given a similar name, many similar attributes in function, and the slogan. She is often referred to as 'she' by Subsentient and his friends, as this is the 'imagined and intended' persona of the bot, just as pr0t0 before her was referred to as 'he'.

The logo for aqu4bot.

The logo is a combination of the letters P and Q. the q is for aqu4, and the p is for pr0t0. The cyan background is the color of Subsentient's homepage. The blue and green gradients are a reference to Subsentient's nationstates.net flag.

Problems

Perhaps something is wrong with aqu4, or some abuse is taking place. To remove aqu4 from a channel, you may kick her. She will register the kick and will not attempt to rejoin unless explicitly instructed to or if she is restarted. A +q quiet is preferable if possible, because Subsentient likes to keep the logs complete for all channels he considers of interest.

If this is not sufficient to resolve your problem, you may contact Subsentient here: http://universe2.us/contactinfo.html