-
Notifications
You must be signed in to change notification settings - Fork 7
websages/jarvis
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
jarvis: uses POE::Builder to create 3 sessions: Jarvis::Persona::System (alias: system) Jarvis::IRC (alias: ${hostname}_irc) & passed 'system alias' Jarvis::Jabber (alias: ${hostname}_xmpp) & passed 'system alias' POE::Builder: new => checks must, may for POE::Builder must => [ loads list of mandatory args to module ] may => { hash of optional_args => defaults } indented_yaml => un-indents yaml yaml_sess => takes (indented) yaml, passes it to indented_yaml, instantiates the class, passes to object_session object_session => creates a POE::Session around the object adding the object_states from the method of the same name from the object, sets aliases Jarvis::Persona::System: connects to irc@127.0.0.1 as $(hosntame -s) joins #asgard connects to xmpp:$(hostname -f):5222 joins asgard\@conference.$(domainname) has 3 "known_personas" [ "crunchy", "berry", "jarvis" ] it can spawn when "spawn crunchy" is typed (in either irc:#asgard or xmpp:asgard) crunchy: Jarvis::Persona::Crunchy (our general purpose bot) connects to irc @127.0.0.1 joins #soggies berry: Jarvis::Persona::Crunchy (we use berry to test crunchy) connects to irc @127.0.0.1 joins #soggies jarvis: Jarvis::Persona::Jarvis (our Systems Administrator) connects to irc @127.0.0.1 joins #heathsmom From that point on, events recieved by the personality's irc/xmmpp modules are sent to the personality module, and responses are routed back to the requesting module. The interfaces between the protocol sessions and the personality sessions are far from normalized, as there are some things that irc can do that xmpp doesn't and vice-versa. I'm still working on a permanent API for connector-persona communication. Most of the communication is done in Jarvis::Persona::Base which is the parent class for the bots themselves. The bots need only have a POE method named "input" as that is what the connectors send input to, and resulting output should be sent back to the @_[SENDER]'s alias. See: lib/Jarvis/Persona/Minimal.pm for a skeleton.
About
just another really vigilant infrastructure sysadmin
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published