Prolix Logo
|
|
|
|
|
Documentation
|
Modules
|
There are 3 different types of modules in Prolix. control
modules, display modules, and bot modules.
control modules would typically be a main gui display, where
you can add and delete bots, see general stats on your bots.
display modules are for bringing up a channel menu with users
and displaying the channel text. There are currently gui, text, and
blank display modules.
bot modules are the actual channel bots, these control how
they react to user commands. If you are planning on writing your
own "bot", then this is generally the area you are primairly
concerned with.
Module directory sample tree:
modules
/bots
/dsbot
/sample
/control
/zds4
/display
/ansi
/gtk
|
class DB
|
The DB class is responsible for holding all the configuration and user data
in prolix. When you save a config file or a user database class DB is at work.
The API for class DB is fairly simple:
int DB::open( char *filename);
int DB::save( char *filename);
Vars *DB::newVar( char *type, char *name);
Vars *DB::getVar( char *type, char *name);
int DB::delVar( char *type, char *name);
A typical save file would look like the following. You can see the
types and the names
from the DB class, and you can see the key and
value for each item in the Vars.
user Bob {
access 20
flags FOBAR
}
user Frank {
access 100
lastmsg hi there bob!
flags MFOBAR
}
module dsbot {
publicwelcome no
}
hash W2BN {
exe war2.exe
dll battle.dll
}
The design of this involes a few classes, but is fairly simple. Cute
little psuedo-picture, classes in bold:
class DB
|
TypeList
|
"etc"---->VarList...
/ \
"bot" "hash"---->VarList...
\
"user"---->VarList
|
"Bob"---->Vars...
/ \
"Alice" "Frank"---->Vars
|
"name"---->"Frank"
/ \
"cdkey" "passwd"---->"secret"
|
Coding Standards
Thread List
Packet reference (beta)
New Format for the Packet Reference
|
|
|
|