changed how module loads
This commit is contained in:
parent
10c04fbaae
commit
3767df26f9
2 changed files with 24 additions and 2 deletions
18
Secrets.pm.example
Normal file
18
Secrets.pm.example
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
package Secrets;
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use Exporter 'import';
|
||||||
|
|
||||||
|
our @EXPORT_OK = qw(
|
||||||
|
TELEGRAM_TOKEN
|
||||||
|
TELEGRAM_USER_ID
|
||||||
|
NICKSERV_PASSWORD
|
||||||
|
IRC_CHANNEL
|
||||||
|
);
|
||||||
|
|
||||||
|
use constant TELEGRAM_TOKEN => 'Bot Token'
|
||||||
|
use constant TELEGRAM_USER_ID => 123456789;
|
||||||
|
use constant NICKSERV_PASSWORD => 'supersecretpassword';
|
||||||
|
use constant IRC_CHANNEL => '#lobby';
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
@ -4,8 +4,12 @@ use warnings;
|
||||||
use POE;
|
use POE;
|
||||||
use POE::Component::IRC;
|
use POE::Component::IRC;
|
||||||
use WWW::Telegram::BotAPI;
|
use WWW::Telegram::BotAPI;
|
||||||
require './.secrets.pm';
|
use Secrets qw(
|
||||||
|
TELEGRAM_TOKEN
|
||||||
|
TELEGRAM_USER_ID
|
||||||
|
NICKSERV_PASSWORD
|
||||||
|
IRC_CHANNEL
|
||||||
|
);
|
||||||
my $IRC_SERVER = '127.0.0.1';
|
my $IRC_SERVER = '127.0.0.1';
|
||||||
my $IRC_PORT = 6667;
|
my $IRC_PORT = 6667;
|
||||||
my $IRC_NICK = 'Jerry';
|
my $IRC_NICK = 'Jerry';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue