Clan_Admin_Mod

Defender

Member
No, they can use what ever regular smurf name they want.
But if they want to have their clans yellow tag with their name, thay must use the code name, thats in the clan admin mod list, used on that server. Only the server owner/admin, has access to everyones code name. He must be trust worthy.
 

Jello

Contributor
this will be very helpful to me if you post this up, then ill be able to control my tram even better. plz do :D
 

Karnage

Private Tester
Yes, can't wait myself. Just had someone posing as one of my clan members last night. Not the end of the world but really annoying and bad for one's clan reputation if the person is less than savory which in this case they were.
 

Defender

Member
How it works is simple, but requires the server admin to give out code names that the players use to set their real player name and the yellow tag.
It needs to be tested, I may need to move the tag after the player name, I think some one said it caused the name to not show up some times.
I have 16 name slots now, more can be added, editing the code is vary simple..




Find this function in Legions Overdrive\live\server\scripts\clientManager\clientConnection.cs
Look for it at about line 29, second function from the top of the file..

If you prefere you can just copy the clientConnection.cs to the Legions Overdrive\live\mods\autoexec\folder. Edit it there, the game will use that file first.


Find
Code:
function GameConnection::onConnect( %this, %name, %observer )
{
  %name = stripTrailingSpaces(strToPlayerName(%name));
  Console::print(Normal,
      "%1 (ClientId: %2, Name: %3) is connecting to server",
      %this.getAddress(), %this, %name);
 
  %this.isObserver = %observer;
  Console::indent();
  ClientManager::clientConnected(%this, %name);
  Console::unindent();
}


Replace that function with this function..


Code:
//------------------------------------------------------------------------------
// function
//------------------------------------------------------------------------------
function GameConnection::onConnect( %this, %name, %observer )
{
  %name = stripTrailingSpaces(strToPlayerName(%name));
 
//---------------------------------
  %CodeName0 = $Host::Clan::CodeName0;
  if (%CodeName0 $= %name){
  %name = $Host::Clan::Name0;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName1 = $Host::Clan::CodeName1;
  if (%CodeName1 $= %name){
  %name = $Host::Clan::Name1;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName2 = $Host::Clan::CodeName2;
  if (%CodeName2 $= %name){
  %name = $Host::Clan::Name2;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName3 = $Host::Clan::CodeName3;
  if (%CodeName3 $= %name){
  %name = $Host::Clan::Name3;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName4 = $Host::Clan::CodeName4;
  if (%CodeName4 $= %name){
  %name = $Host::Clan::Name4;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName5 = $Host::Clan::CodeName5;
  if (%CodeName5 $= %name){
  %name = $Host::Clan::Name5;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName6 = $Host::Clan::CodeName6;
  if (%CodeName6 $= %name){
  %name = $Host::Clan::Name6;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName7 = $Host::Clan::CodeName7;
  if (%CodeName7 $= %name){
  %name = $Host::Clan::Name7;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName8 = $Host::Clan::CodeName8;
  if (%CodeName8 $= %name){
  %name = $Host::Clan::Name8;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName9 = $Host::Clan::CodeName9;
  if (%CodeName9 $= %name){
  %name = $Host::Clan::Name9;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName10 = $Host::Clan::CodeName10;
  if (%CodeName10 $= %name){
  %name = $Host::Clan::Name10;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName11 = $Host::Clan::CodeName11;
  if (%CodeName11 $= %name){
  %name = $Host::Clan::Name11;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName12 = $Host::Clan::CodeName12;
  if (%CodeName12 $= %name){
  %name = $Host::Clan::Name12;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName13 = $Host::Clan::CodeName13;
  if (%CodeName13 $= %name){
  %name = $Host::Clan::Name13;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName14 = $Host::Clan::CodeName14;
  if (%CodeName14 $= %name){
  %name = $Host::Clan::Name14;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  %CodeName15 = $Host::Clan::CodeName15;
  if (%CodeName15 $= %name){
  %name = $Host::Clan::Name15;
  %tag = $Host::Clan::Tag;
  %name = "\c4"@%tag@" \c1"@%name@"";
  }
  //---------------------------------
  Console::print(Normal,
      "%1 (ClientId: %2, Name: %3) is connecting to server",
      %this.getAddress(), %this, %name);
 
  %this.isObserver = %observer;
  Console::indent();
  ClientManager::clientConnected(%this, %name);
  Console::unindent();
}



Then add this to your server config at the bottom, edit the names, code names, tag settings, Let me know how it went..
jumpeveryone.gif



Code:
//------------------------------------------------------------------------------
// Version 3-13-12, by Defender  www.tribalcombat.com
//
// This mod lets clan admins assign yellow colored tags and names, using code names.
// Have your clan members chose code names, for connecting to the server with.
// The code name will set the real name and yellow clan tag, that everyone will see in the game.
// Its up to the server admin to add the code names and real names to the list, in the right order.
// Code names should use both numbers and letters.
//------------------------------------------------------------------------------
 
$Host::Clan::Tag = "[57th]"; // Clan tag for all players on this list.
//------------------------------------------------------------------------------
$Host::Clan::Name0 = "Karnage"; // Real name to be used.
$Host::Clan::CodeName0 = "Kan256457"; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name1 = "Defender"; // Real name to be used.
$Host::Clan::CodeName1 = "fdgtr6780"; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name2 = "JCARTEL420"; // Real name to be used.
$Host::Clan::CodeName2 = "4223ghg"; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name3 = "ZanteWarrior"; // Real name to be used.
$Host::Clan::CodeName3 = "cxv4vcf367"; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name4 = "Ammunition"; // Real name to be used.
$Host::Clan::CodeName4 = "tiondsg34"; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name5 = "Nemamiah"; // Real name to be used.
$Host::Clan::CodeName5 = "5hNecxvr456"; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name6 = ""; // Real name to be used.
$Host::Clan::CodeName6 = ""; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name7 = ""; // Real name to be used.
$Host::Clan::CodeName7 = ""; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name8 = ""; // Real name to be used.
$Host::Clan::CodeName8 = ""; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name9 = ""; // Real name to be used.
$Host::Clan::CodeName9 = ""; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name10 = ""; // Real name to be used.
$Host::Clan::CodeName10 = ""; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name11 = ""; // Real name to be used.
$Host::Clan::CodeName11 = ""; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name12 = ""; // Real name to be used.
$Host::Clan::CodeName12 = ""; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name13 = ""; // Real name to be used.
$Host::Clan::CodeName13 = ""; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name14 = ""; // Real name to be used.
$Host::Clan::CodeName14 = ""; // Code name, player uses for real name and tag to be assigned.
//
$Host::Clan::Name15 = ""; // Real name to be used.
$Host::Clan::CodeName15 = ""; // Code name, player uses for real name and tag to be assigned.
 

Defender

Member
If you want to log every players name and IP address, that connects to your server.
Edit the same file you just edited for the player clan tags..

Find this function in Legions Overdrive\live\server\scripts\clientManager\clientConnection.cs
Look for it at about line 6, top of the file..

Find

Code:
function GameConnection::onConnectRequest( %this, %netAddress, %name, %observer )
{
  %name = stripTrailingSpaces(strToPlayerName(%name));
  Console::print(Verbose,
      "Got connect request from %1 (ClientId: %2, Name: %3)",
      %netAddress, %this, %name);
  if (BanList::isBanned(%name, %netAddress))
  {
      return "CR_YOUAREBANNED";
  }
  if ($Server::PlayerCount >= $Host::MaxPlayers)
  {
      // If we haven't got an overflow password - block
      // If overflow password isn't the current password - block
      if (($Host::OverflowPassword $= "") || ($Host::OverflowPassword !$= $Pref::Server::Password))
        return "CR_SERVERFULL";
  }
 
  return "";
}


Replace that function with this function.


Code:
function GameConnection::onConnectRequest( %this, %netAddress, %name, %observer )
{
  %name = stripTrailingSpaces(strToPlayerName(%name));
  Console::print(Verbose,
      "Got connect request from %1 (ClientId: %2, Name: %3)",
      %netAddress, %this, %name);
 
  //===========================================================================
  // Mod ///////////////////////////////////////////////////////////
  //===========================================================================
  LogConnection(%this, %netAddress, %name);  // LOG CONECTIONS
  //===========================================================================
 
  if (BanList::isBanned(%name, %netAddress))
  {
      return "CR_YOUAREBANNED";
  }
 
  if ($Server::PlayerCount >= $Host::MaxPlayers)
  {
      // If we haven't got an overflow password - block
      // If overflow password isn't the current password - block
      if (($Host::OverflowPassword $= "") || ($Host::OverflowPassword !$= $Pref::Server::Password))
        return "CR_SERVERFULL";
  }
 
  return "";
}



Below that last function add this new function!

Code:
// called in clientConnection.cs, top of file.
function LogConnection(%this, %netAddress, %name)
{
  %ip = %this.getaddress();
    if ($Host::ConnectionLogging){
      %file = new FileObject();
      if (%file.OpenForAppend("PlayerConnectLog/PlayerConnectLog.log"))
      {
        %file.WriteLine(%this.getAddress() @", "@ %name);
        %file.close();
        echo (">>>>>>>>>: loging " @ %name @ "s IP = " @ %ip);
      }else{
        echo("Could not open connection.log");
      }
    %file.delete();
  }else{
      echo("$Host::logConnections == false; not logging connections");
  }
}


Now add this to your server config

// Mod Option
$Host::ConnectionLogging = 1; // log player names and Ips..


You will find the new player connect logs in the Legions Overdrive\live\PlayerConnectLog\folder
 

k e v i n

Private Tester
so does this work? maybe one of the devs can look into this, and if it does work for sure...maybe it can just be added to the new legions?
 

Defender

Member
Thanks for looking it over Rockey!!!
guntoting.gif

I have been wanting to get the old chat loging code working from my tribes2 mod in Legions, I think it could be usful for server admins.
Right now this will log the chat, but not the player name next to the chat like it did in tribes2..
Could you or some one who knows coding take a quick look at this?


Legions base chat function..


Code:
function chatMessageAll(%sendingCL, %msgString)
{
    if ((%msgString $= "") || spamAlert(%sendingCL))
      return;
 
    %count = ClientGroup.getCount();
    for (%i = 0; %i < %count; %i++)
    {
      %recipientCL = ClientGroup.getObject(%i);
      chatMessageClient(%recipientCL, %sendingCL, %msgString, false);
    }
// Chat logging
chatlog(%sendingCL, %msgString, true);
}


Tribes2 mod chat logging, modified a bit for legions by Me..

Code:
function ChatLog(%sendingCL, %msgString)
{
    %senderName = %sendingCL.decoratedNameTag;
  //decho("CHATLOGGING " @ %client SPC %msg);
    if($Host::ChatLogging)
        {
        $ChatLog = %senderName SPC getsimtime() @ ": " @ stripchars(%msg,"\cp\co\c6\c7\c8\c9");
        export("$ChatLog", "ChatLog/ChatLog.cs", true);
        }
}
 
Top