View Single Post
  #1  
Old 11-10-2006, 04:50 AM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Talk about annoying =/

Okay, I am making the client handle who logs on/off to add a message saying they did such. Problem is, either IRC is showing up, or RC is showing up.

PHP Code:
function onPlayerLogin(newUser)
{
  if (
newUser.starts("irc:"))
  {
    return 
false;
  }
  
  for (
temp.var: allplayers)
  { 
    if (
temp.var == newUser)
    {
      
temp.found true;
      
      break;
    }
  }
  
  if (
temp.found)
  {
    
player.addMsg("Server"format("%s has logged on!"newUser), 15);
  }
}

function 
onPlayerLogout(newUser)
{
  if (
newUser.starts("irc:"))
  {
    return 
false;
  }
  
  for (
temp.var: allplayers)
  {
    if (
temp.var == newUser)
    {
      
temp.found true;
      
      break;
    }
  }
  
  if (
temp.found)
  {
    
player.addMsg("Server"format("%s has logged off!"newUser), 15);
  }

That method shows RC's logging on, and no logging off at all =(
Reply With Quote