Futurismobject › dAmnF

From Botdom Documentation

Jump to: navigation, search

The dAmnF object (short for dAmn factory) is an object that holds settings on how the bot should connect to dAmn, and what happens on which events. It also creates the dAmn object. All methods (except for one called internally only) are all methods called by Twisted on selected events only. As such, any modules should not execute these, or even better, they should not even touch this object. Its features are only listed here for reference. This object is based on a Twisted ReconnectingClientFactory protocol, and as such, only changes to this are written here.

Contents

Properties

  • No properties!

Methods

instance dAmnF.buildProtocol(str addr)

Builds the dAmn object and returns it.

void dAmnF.clientConnectionFailed(instance connector, str reason)

Is called by Twisted when we can't connect to dAmn. Alerts to the gate and tries again.

void dAmnF.clientConnectionLost(instance connector, str reason)

Is called by Twisted when we've lost connection to dAmn. Alerts to the gate and tries to reconnect.

void dAmnF.configDefaults()

Sets configuration values to defaults if they have not been specified in the config file, as to prevent Python errors if the properties do not exist. Is called when we build the protocol, and can be externally called every time we load the configurations.

Personal tools