Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Add a method to get a list of all active connections #41

Merged
merged 1 commit into from
Jun 4, 2015
Merged

Add a method to get a list of all active connections #41

merged 1 commit into from
Jun 4, 2015

Conversation

Renegade334
Copy link
Contributor

class Plugin extends AbstractPlugin
{
  /* ... */

  public function myRegularCallback()
  {
    /* get some data */

    foreach ($this->getClient()->getActiveConnections() as $connection) {
      $queue = $this->getEventQueueFactory()->getEventQueue($connection);
      $queue->ircPrivmsg('#mychan', "OHAI I HAZ SUM DATA 4 U: $data");
    }
  }
}

There is the question of whether such a function would need to be added to the client interface.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 98.87% when pulling 68ed1d1 on Renegade334:devel-active-connections-list into 63d736c on phergie:master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 98.86% when pulling 22c50a5 on Renegade334:devel-active-connections-list into 63d736c on phergie:master.

@elazar
Copy link
Member

elazar commented Jun 1, 2015

Do we really need the "active" portion of the method / property names? Seems implied that the connections being managed are active.

@Renegade334
Copy link
Contributor Author

Needs to be distinguished from the addConnection() family of methods, which create IRC sessions from connection objects. These ones just mark connection objects as active or not active by adding and removing them from the store.

elazar added a commit that referenced this pull request Jun 4, 2015
Add a method to get a list of all active connections
@elazar elazar merged commit ba7966c into phergie:master Jun 4, 2015
@elazar
Copy link
Member

elazar commented Jun 4, 2015

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants