Пример #1
0
 /**
  * Called every time a member is added/removed from a team
  *
  * @param TeamAbandonEvent|TeamJoinEvent|TeamKickEvent $event The event
  * @param string $type The type of the event
  */
 public function onTeamMembershipChange(Event $event, $type)
 {
     $query = \Conversation::getQueryBuilder()->forTeam($event->getTeam());
     foreach ($query->getModels() as $conversation) {
         \ConversationEvent::storeEvent($conversation->getId(), $event, $type);
     }
 }
Пример #2
0
 /**
  * Called every time a member is added/removed from a team
  *
  * @param TeamAbandonEvent|TeamJoinEvent|TeamKickEvent $event The event
  * @param string $type The type of the event
  */
 public function onTeamMembershipChange(Event $event, $type)
 {
     $query = \Conversation::getQueryBuilder()->forTeam($event->getTeam());
     foreach ($query->getModels() as $conversation) {
         \ConversationEvent::storeEvent($conversation->getId(), $event, $type);
         if ($type === 'team.join') {
             $conversation->addMember($event->getPlayer(), $distinct = false);
         }
     }
 }
Пример #3
0
$event = new ConversationAbandonEvent($conversation, $mdskpr);
ConversationEvent::storeEvent($conversation->getId(), $event, Events::CONVERSATION_ABANDON);
$conversation->sendMessage($allejo, "tea?");
$event = new ConversationJoinEvent($conversation, array($brad, $mdskpr, $lweak));
ConversationEvent::storeEvent($conversation->getId(), $event, Events::CONVERSATION_JOIN);
$event = new ConversationRenameEvent($conversation, "test", "Test", $alezakos);
ConversationEvent::storeEvent($conversation->getId(), $event, Events::CONVERSATION_RENAME);
$conversation->sendMessage($allejo, "what would have some.");
$conversation->sendMessage($snake, "hahaha I'm sure I've used a url shorten urls book I'm not sure it would be used it");
$conversation->sendMessage($blast, "so I assume you're the correlative still always_ goes down history\"'s for anything");
$conversation->sendMessage($kierra, "I had a page. No addon, plugin to windows it...");
$conversation->sendMessage($allejo, "so I'm the world  (which was amazing :)");
$event = new ConversationKickEvent($conversation, $lweak, $alezakos);
ConversationEvent::storeEvent($conversation->getId(), $event, Events::CONVERSATION_KICK);
$event = new ConversationKickEvent($conversation, $brad, $alezakos);
ConversationEvent::storeEvent($conversation->getId(), $event, Events::CONVERSATION_KICK);
$conversation->sendMessage($autoreport, "she also going to essential command and to https://github Releases?\"  \"No!\"  \"STOP! IT!\"  \"*pbbbttt*\"  \"That's interesting I want help");
$conversation->sendMessage($autoreport, "I wonder 600KB) screenshot here. but how much I know all I was doing to debug, visual studio");
$conversation->sendMessage($autoreport, "and night night!");
echo " done!";
echo "\nAdding bans...";
Ban::addBan($snake->getId(), $alezakos->getId(), "2014-09-15", "Snarke 12534 has been barned again", "Cuz you're snake", "256.512.104.1");
Ban::addBan($allejo->getId(), $tw1sted->getId(), "2014-05-17", "for using 'dope'", "dope", array("127.0.2.1", "128.0.3.2"));
Ban::addBan($tw1sted->getId(), $alezakos->getId(), "2014-06-12", "tw1sted banned for being too awesome");
Ban::addBan($alezakos->getId(), $tw1sted->getId(), "2014-11-01", "alezakos banned for breaking the build", "For breaking the build", array("256.512.124.1", "256.512.124.3"));
echo " done!";
echo "\nAdding pages...";
Page::addPage("Rules", "<p>This is a test page.</p>\n<p>Let's hope this works!</p>", $tw1sted->getId());
Page::addPage("Contact", "<p>If you find anything wrong, please stop by irc.freenode.net channel #sujevo and let a developer know.<br /><br />Thanks", $tw1sted->getId());
echo " done!";
echo "\nAdding news categories...";
Пример #4
0
 /**
  * Called when a conversation event needs to be stored in the database
  *
  * @param Event  $event The event
  * @param string $name  The name of the event
  */
 public function conversation(Event $event, $name)
 {
     \ConversationEvent::storeEvent($event->getConversation()->getId(), $event, $name);
 }