Advertisement
Eeems

Untitled

May 15th, 2011
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. #!/usr/bin/php
  2. <?php
  3.     $data = ":irc.choopa.net 353 EeeZor = #IRP :EeeZor @alberth @AaronBot @UBystand @CoolioJaz @LuaBot @Juju @Eeems";
  4. //  $data = ":irc.choopa.net 333 EeeZor #IRP Eeems!~THEGAME@57o9.org 1304800102";
  5.     $matches = array();
  6.     preg_match_all('/:([\S]+) (353) [\S]+ (?:=|@) #([\S]+) :(.+)/',$data,$matches);
  7.     out($data);
  8.     if(count($matches)>0&&isset($matches[4])){
  9.         out($matches[4][0]);
  10.         $t = explode(" ",$matches[4][0]);
  11.         foreach($t as $u){
  12.             out('Adding user: '.trim($u));
  13.         }
  14.     }
  15.     function out($text){
  16.         echo $text."\n";
  17.     }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement