I have four modules catching the same event - ‘registration_complete’
1 - forum registration
2 - teamspeak registration
3 - automatic AIRMail welcome message
4 - automatic forum post announcing the new hire
They all work individually if I remove the other three from the modules folder, but when I have all four in the folder only one will catch the event. Do i need to create an event at the end of each module to call the next, or should they all be able to catch the same event?
This is basically what I am using at the start of each function to register it and look for the event…
public function __construct()
{
CodonEvent::addListener('ForumRegistration', array('registration_complete));
}
public function EventListener($eventinfo)
{
if($eventinfo[0] == 'registration_complete')
{
ForumRegistrationData::register_user();
}
}
What’s happening in ForumRegistrationData::register_user();? You probably don’t need a separate data class. The data classes should be used if you’re sharing common code.
Is there an echo coming out?
You probably also need some way to test events without having to registering a user every time. I’ll cook that up as well.
You have a working teamspeak registration code? Care to share?
Sorry Tom - Just caught this…
More than happy to share. I am on the road for work right now and I have the module running on my loacl development server at home. Should be home by the weekend and I will post it. It still needs to be cleaned up a little but I got it to work. The biggest hurdle was getting the password over to teamspeak. Also it is only working on teamspeak version2, I have not got it to work on the new version 3 beta teamspeak.