<?php

class myplugin1{ 
  function endRacefunction($challengeinfo){ 
    global $client; 
    $client->query('ChatSendServerMessage', '>> End Race: '.$challengeinfo[1]['Name']); 
  } 
 
  function chatcommand1($chat,$userlogin){ 
    global $client; 
    $client->query('ChatSendServerMessageToLogin', '$ff0>> Hello '.$userlogin[0].'!', $userlogin[0]); 
  } 
}

$this->AddPlugin(new myplugin1()); 
$this->AddEvent('EndRace', 'endRacefunction'); 
$this->addChatCommand('chat1', true, 'chatcommand1'); 
?>