| 1 | # sub POE::Kernel::TRACE_DEFAULT () { 1 } | ||
| 2 | sub POE::Kernel::ASSERT_DEFAULT () { 1 } | ||
| 3 | # sub POE::Kernel::TRACE_EVENTS () { 1 } | ||
| 4 | # sub POE::Kernel::TRACE_QUEUE () { 1 } | ||
| 5 | # sub POE::Kernel::TRACE_GARBAGE () { 1 } | ||
| 6 | # sub POE::Kernel::TRACE_REFCOUNT () { 1 } | ||
| 7 | |||
| 8 | # use lib qw/./; | ||
| 9 | use Data::Dumper; | ||
| 10 | use POE; | ||
| 11 | use Amethyst; | ||
| 12 | |||
| 13 | new Amethyst; | ||
| 14 | |||
| 15 | my %anarres = ( | ||
| 16 | # Amethyst variables | ||
| 17 | Name => 'anarres', | ||
| 18 | Brains => [ qw(infobot eliza) ], # barwench markov | ||
| 19 | Alias => 'anarres', # For CNN module | ||
| 20 | # Object specific variables | ||
| 21 | Host => 'mudlib.anarres.org', | ||
| 22 | Port => 5000, | ||
| 23 | Login => q[(some valid login)], | ||
| 24 | Password => q[(the password)], | ||
| 25 | # Debug => 3, | ||
| 26 | Channel => 'spam', # Force output to one channel | ||
| 27 | ); | ||
| 28 | unless ($ENV{HOSTNAME} =~ /^pink/) { | ||
| 29 | $anarres{Host} = 'localhost'; | ||
| 30 | } | ||
| 31 | my %cnnchat = ( | ||
| 32 | # Amethyst variables | ||
| 33 | Name => 'cnnchat', | ||
| 34 | Brains => [ qw(cnn) ], | ||
| 35 | # Object specific variables | ||
| 36 | # Server => 'london.rhizomatic.net', | ||
| 37 | # Channels => [ qw(amethyst) ], | ||
| 38 | Server => 'chat.cnn.com', | ||
| 39 | Nick => 'Amethyst', | ||
| 40 | Channels => [ qw(CNN_Newsfeed) ], | ||
| 41 | ClientAlias => 'cnn irc', | ||
| 42 | ); | ||
| 43 | my %rhizomatic = ( | ||
| 44 | # Amethyst variables | ||
| 45 | Name => 'rhizomatic', | ||
| 46 | Alias => 'rhizomatic', # For CNN module | ||
| 47 | Brains => [ qw(infobot) ], # barwench | ||
| 48 | # Object specific variables | ||
| 49 | Server => 'london.rhizomatic.net', | ||
| 50 | Nick => 'Amethyst', # Replace this | ||
| 51 | # Channels => [ qw(bblug) ], # Put your channels here | ||
| 52 | ); | ||
| 53 | |||
| 54 | my %infobot = ( | ||
| 55 | # Amethyst variables | ||
| 56 | Name => 'infobot', | ||
| 57 | # Object specific variables | ||
| 58 | # You can put any valid selection of | ||
| 59 | # Amethyst::Brain::Infobot::Module names in this list. I have | ||
| 60 | # taken some out as my personal preference. | ||
| 61 | Modules => [ qw( | ||
| 62 | Statement | ||
| 63 | Google Nslookup | ||
| 64 | Karma | ||
| 65 | Fortune Excuse Insult | ||
| 66 | Zippy Zappa | ||
| 67 | Help Time Math | ||
| 68 | BabyTime | ||
| 69 | ) ], | ||
| 70 | # Readonly databases - build this using import.sh | ||
| 71 | FactoidRead => [ qw(factpack) ], | ||
| 72 | # The readwrite database | ||
| 73 | FactoidWrite => q(statement), | ||
| 74 | ); | ||
| 75 | my %barwench = ( | ||
| 76 | Name => 'barwench', | ||
| 77 | ); | ||
| 78 | my %cnn = ( | ||
| 79 | Name => 'cnn', | ||
| 80 | # Object specific | ||
| 81 | Output => { | ||
| 82 | # Connection name => Channel name | ||
| 83 | # rhizomatic => 'amethyst', | ||
| 84 | # anarres => 'cnn', | ||
| 85 | }, | ||
| 86 | ); | ||
| 87 | my %eliza = ( | ||
| 88 | Name => 'eliza', | ||
| 89 | ); | ||
| 90 | my %markov = ( | ||
| 91 | Name => 'markov', | ||
| 92 | ); | ||
| 93 | |||
| 94 | $poe_kernel->post('amethyst', 'add_brain', | ||
| 95 | 'Amethyst::Brain::Infobot', \%infobot); | ||
| 96 | $poe_kernel->post('amethyst', 'add_brain', | ||
| 97 | 'Amethyst::Brain::BarWench', \%barwench) | ||
| 98 | if 0; | ||
| 99 | $poe_kernel->post('amethyst', 'add_brain', | ||
| 100 | 'Amethyst::Brain::CNN', \%cnn) | ||
| 101 | if 0; | ||
| 102 | $poe_kernel->post('amethyst', 'add_brain', | ||
| 103 | 'Amethyst::Brain::Eliza', \%eliza); | ||
| 104 | $poe_kernel->post('amethyst', 'add_brain', | ||
| 105 | 'Amethyst::Brain::Markov', \%markov) | ||
| 106 | if 0; | ||
| 107 | |||
| 108 | $poe_kernel->post('amethyst', 'add_connection', | ||
| 109 | 'Amethyst::Connection::Anarres', \%anarres) | ||
| 110 | if 1; | ||
| 111 | $poe_kernel->post('amethyst', 'add_connection', | ||
| 112 | 'Amethyst::Connection::IRC', \%rhizomatic) | ||
| 113 | if 0; | ||
| 114 | $poe_kernel->post('amethyst', 'add_connection', | ||
| 115 | 'Amethyst::Connection::IRC', \%cnnchat) | ||
| 116 | if 0; | ||
| 117 | |||
| 118 | $poe_kernel->post('amethyst', 'connect'); | ||
| 119 | |||
| 120 | $poe_kernel->run(); |