App::FonBot::Plugin::Common - FonBot plugin that provides global variables and functions
use App::FonBot::Plugin::Common; App::FonBot::Plugin::Common->init; $ok_user_addresses{'marius OFTC mgvx'}=1; # Let user marius send messages to mgvx via the OFTC plugin sendmsg 'marius', 'OFTC mgvx', 'echo', 'Hello', 'world!'; App::FonBot::Plugin::Common->fini;
This FonBot plugin provides global variables and functions to the other plugins. It also sets the user and group according to the configuration file. It is a required plugin, since most other plugins depend on it.
These are the App::FonBot::Plugin::Config configuration variables used in this module
$dir
Directory to chdir to.
$user
User to change to.
$group
Group to change to.
@supplementary_groups
Supplementary groups list to set.
Hash that records combinations of username, driver and address that have sent commands to us. The key format is "$username $drivername $address". fonbotd will never send a message to an address which is not found in this hash.
"$username $drivername $address"
Example entry: $ok_user_address{"nobody EMAIL nobody@mailinator.com"}.
$ok_user_address{"nobody EMAIL nobody@mailinator.com"}
Hash from usernames to a Storable::freezed array of pending commands for the user.
Storable::freeze
Hash from usernames to a waiting HTTP::Response, as defined by the POE::Component::Server::HTTP documentation.
Sends a command to $touser's phone. The command includes a command name ($command), a list of arguments (@args) and a reply address ($replyto). If $requestid is defined, the command will also include that request ID.
$touser
$command
@args
$replyto
App::FonBot::Plugin::Common->init
Sets the user and group according to the configuration variables and reads the exported variables from the disk.
App::FonBot::Plugin::Common->fini
Writes the exported variables to the disk.
Marius Gavrilescu <marius@ieval.ro>
<marius@ieval.ro>
Copyright 2013 Marius Gavrilescu
This file is part of fonbotd.
fonbotd is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
fonbotd is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with fonbotd. If not, see <http://www.gnu.org/licenses/>
To install App::FonBot::Daemon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::FonBot::Daemon
CPAN shell
perl -MCPAN -e shell install App::FonBot::Daemon
For more information on module installation, please visit the detailed CPAN module installation guide.