bMotion-lib Perl Interface
bMotion-lib provides a Perl Interface for plugins as another option for creating custom modules for bMotion bots.
interface functions
all functions are prefaced by the bmotion namespace ( i.e. bmotion::pluginAddSimple )
plugin functions
- pluginAddSimple
- register a simple plugin. Simple plugins are those whose callback functions are the output itself.
- pluginAddComplex
- register a complex plugin. Complex plugins use the callback functions.
- pluginAddAdmin
- register an admin plugin. These respond to commands of the style .bmotion botname [command]
- pluginAddOutput
- register an output plugin. This will be a last minute call just prior to bot output to modify the output text.
- pluginAddIrcEvent
- register an IRC event plugin. IRC events are joins, quits, parts, etc...
- pluginAddActionSimple
- register a simple action plugin. Like a simple plugin, but for /me style inputs
- pluginAddActionComplex
- register a complex action plugin. Like a complex plugin, but for /me style inputs
abstract functions
- abstractRegister
- creates a new abstract type
- abstractBatchAdd
- adds a list of phrases/words to a created abstract
- abstractAdd
- add a single phrase/word to an abstract
- abstractGet
- get a random phrase/word from an abstract
settings functions
- getSetting
- get the value of a system level setting
- setSetting
- set the value of a system level setting
- talkingToMe
- returns true if the input phrase appears to be directed at this bot.
- isBotnick
- returns true is the text is the bot's name.
output functions
- doAction
- main bMotion system output function
- log
- put a message in the log system at a particular level
utility functions
- uncolen
- remove "£$(%*£!)*$)*&"!)($£* style characters from a string
- getColenChars
- get the sort of string that bMotion_uncolen removes
user functions
- getFriendship
- get the integer level of a user's friendship (careful, some of them are negative)
- driftFriendship
- change a user's friendship level by some amount (+/-)
- getRealName
- get what the system thinks is a real name for a user
- isFriend
- true or false for friend or not
- isLiked
- true or false for liked or not
interbot communication functions
- interbotMeNext
- check if this is the next bot on the botnet supposed to do something. Forces a re-election
mood functions
- moodGet
- get a mood level
- moodSet
- set a mood level
- makeHappy
- increase the happiness mood level
- makeSad
- decrease the happiness mood level
- makeHorny
- increase the horniness mood level
- makeLonely
- increase the loneliness mood level
- makeUnlonely
- decrease the loneliness mood level
