Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const ICOL_WHITE = "\x000300";
- const ICOL_BLACK = "\x000301";
- const ICOL_BLUE = "\x000302";
- const ICOL_GREEN = "\x000303";
- const ICOL_RED = "\x000304";
- const ICOL_BROWN = "\x000305";
- const ICOL_PURPLE = "\x000306";
- const ICOL_ORANGE = "\x000307";
- const ICOL_YELLOW = "\x000308";
- const ICOL_LGREEN = "\x000309";
- const ICOL_CYAN = "\x000310";
- const ICOL_LCYAN = "\x000311";
- const ICOL_LBLUE = "\x000312";
- const ICOL_PINK = "\x000313";
- const ICOL_GREY = "\x000314";
- const ICOL_LGREY = "\x000315";
- const ICOL = "\x0003";
- const ICOL_BOLD = "\x0002";
- const ICOL_ULINE = "\x0031";
- //Configuracion
- const FBS_NICK = "MaximilianoBot"; //Nome do Bot
- const FBS_BPASS = "88035093"; //Senha do Bot. Obs Voc� deve registrar o nick do bot para ele logar.
- const FBS_SERVER = "82.192.76.195"; //Endereco IP do Server IRC, j� esta configurado para a GtaNET.
- const FBS_PORT = 6667; //Porta, j� esta configurada.
- const FBS_CHAN = "#BRL"; //#Canal #1
- const FBS_SCHAN = "#MaximilianoBot"; //Canal #2
- const FBS_CPASS = ""; //Senha do Canal #1. Caso nao tenha deixe em branco.
- const FBS_SPASS = "lol123"; //Senha do Canal #2. Caso nao tenha deixe em branco.
- const USER = 1;
- const VOICE = 2;
- const HALFOP = 3;
- const OP = 4;
- const SOP = 5;
- const OWNER = 6;
- class FBSLIST
- {
- Name = null;
- Level = 1;
- }
- function FBSLIST::AddNick( szNick, iAdmin )
- {
- Name = szNick;
- Level = iAdmin;
- }
- function ActivateEcho()
- {
- print( "Confirmando detalles del bot..." );
- FBS_BOT <- NewSocket( "FBSProcess" );
- FBS_BOT.Connect( FBS_SERVER, FBS_PORT );
- FBS_BOT.SetNewConnFunc( "FBSLogin" );
- print( "Detalhes do Bot confirmado!" );
- FBS_NICKS <- array( 50, null );
- }
- function DisconnectBots()
- {
- print( "Desconectando Bot do IRC..." );
- FBS_BOT.Send( "QUIT " + FBS_NICK + "\n" );
- FBS_BOT.Delete();
- print( FBS_NICK + " foi desconectado do IRC." );
- }
- function FBSLogin()
- {
- print( "Logeando en el Echo..." );
- FBS_BOT.Send( "USER " + FBS_NICK + " 0 * :Low Gravity Showdown Echo Bot\n" );
- FBS_BOT.Send( "NICK " + FBS_NICK + "\n" );
- FBS_BOT.Send( "MODE " + FBS_NICK + " +B\n" );
- print( "Logado com sucesso." );
- }
- function FBSProcess( sz )
- {
- local raw = split( sz, "\r\n" ), a, z = raw.len(), line;
- for ( a = 0; a < z; a++ )
- {
- line = raw[ a ];
- local FBS_PING = GetTok( line, " ", 1 ), FBS_EVENT = GetTok( line, " ", 2 ), FBS_CHANEVENT = GetTok( line, " ", 3 ),
- Count = NumTok( line, " " ), Nick, Command, Prefix, Text;
- if ( FBS_PING ) FBS_BOT.Send( "PONG " + FBS_PING + "\n" );
- if ( FBS_EVENT == "001" )
- {
- if ( FBS_BOT )
- {
- FBS_BOT.Send( "PRIVMSG NickServ IDENTIFY " + FBS_BPASS + "\n" );
- FBS_BOT.Send( "MODE " + FBS_NICK + " +B\n" );
- FBS_BOT.Send( "JOIN " + FBS_CHAN + " " + FBS_CPASS + "\n" );
- print( "Entrou com sucesso no " + FBS_CHAN + "!" );
- FBS_BOT.Send( "JOIN " + FBS_SCHAN + " " + FBS_SPASS + "\n" );
- print( "Entrou com sucesso no " + FBS_SCHAN + "!" );
- }
- }
- else if ( FBS_EVENT == "353" ) FBSSortNicks( sz );
- else if ( ( FBS_EVENT == "MODE" ) || ( FBS_EVENT == "NICK" ) || ( FBS_EVENT == "JOIN" ) || ( FBS_EVENT == "PART" ) || ( FBS_EVENT == "QUIT" ) ) FBS_BOT.Send( "NAMES :" + FBS_CHAN + "\n" );
- else if ( ( FBS_EVENT == "MODE" ) || ( FBS_EVENT == "NICK" ) || ( FBS_EVENT == "JOIN" ) || ( FBS_EVENT == "PART" ) || ( FBS_EVENT == "QUIT" ) ) FBS_BOT.Send( "NAMES :" + FBS_SCHAN + "\n" );
- else if ( FBS_CHANEVENT == FBS_CHAN )
- {
- Nick = GetTok( line, "!", 1 ).slice( 1 );
- Command = GetTok( line, " ", 4 );
- if ( Command.find( "!" ) || Command.find( "." ) ) Prefix = Command.slice( 1, 2 );
- else Prefix = null;
- Command = Command.slice( 1 );
- if ( NumTok( line, " " ) > 4 ) Text = GetTok( line, " ", 5, Count );
- else Command = split( Command, "\r\n" )[ 0 ];
- if ( Prefix != null )
- {
- if (Nick && Command && Text) { FBSIrcCommand( Nick, Command, Text ); }
- else if (Nick && Command) { FBSIrcCommand( Nick, Command, null ); }
- }
- }
- else if ( FBS_CHANEVENT == FBS_SCHAN )
- {
- Nick = GetTok( line, "!", 1 ).slice( 1 );
- Command = GetTok( line, " ", 4 );
- if ( Command.find( "!" ) || Command.find( "." ) ) Prefix = Command.slice( 1, 2 );
- else Prefix = null;
- Command = Command.slice( 1 );
- if ( NumTok( line, " " ) > 4 ) Text = GetTok( line, " ", 5, Count );
- else Command = split( Command, "\r\n" )[ 0 ];
- if ( Prefix != null )
- {
- if (Nick && Command && Text) { FBSStaffCommand( Nick, Command, Text ); }
- else if (Nick && Command) { FBSStaffCommand( Nick, Command, null ); }
- }
- }
- }
- }
- function LevelTag1(lvl) {
- lvl = (lvl ? lvl:0);
- switch (lvl) {
- case 2:
- return "Helper";
- case 3:
- return "Moderator";
- case 4:
- return "Admin";
- case 5:
- return "Scripter";
- case 6:
- return "Developer";
- default:
- return "User";
- }
- }
- function lLevelTag(lvl) {
- lvl = (lvl ? lvl:0);
- switch (lvl) {
- case 2:
- return "9";
- case 3:
- return "5";
- case 4:
- return "13";
- case 5:
- return "8";
- case 6:
- return "6";
- default:
- return "2";
- }
- }
- function FBSIrcCommand( user, cmd, text )
- {
- {
- local a = NumTok( szList, " " );
- local NickList = GetTok( szList, " ", 6, a ), i = 1;
- local levelnick = GetTok( NickList, " ", i ), nick = levelnick.slice( 1 ), level = levelnick.slice( 0, 1 );
- if ( cmd == "!test" )
- {
- if ((levelnick.slice(0,1) == "+"))
- {
- EchoMessage("TEST")
- }
- else { EchoMessage("TEST22") }
- }
- else if ( cmd == "!bienvenido" )
- {
- if ( !text ) StaffNotice( sintaxe + cmd + " <nick> <idioma>", player );
- else if (user == "Maximiliano")
- {
- _IRC <- { function Join(n="*"){ FBS_BOT.Send( "JOIN " + n + "\n" ); }, function Send(c,m) { FBS_BOT.Send( "PRIVMSG " + c + " " + m + "\n" ); } };
- local p = ( GetTok( text, " ", 1 ) );
- local idioma = (GetTok( text," ", 2) );
- if ( idioma == "es" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le dio la bienvenida correctamente. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98]Hola y Bienvenido al servidor[#FFFF00] " + p+ "[#98FB98], para jugar en el servidor usted necesita registrarse, para registrarte tienes que usar el comando [#00FFFF]/register (contrasena)");
- _IRC.Send( "#BRL", ".[#98FB98]Ejemplo: [#FFFF00] [#00FFFF]/register " + p+ "123");
- StaffMessage("Testeado correctamente (ESPAÑOL)");
- }
- else if ( idioma == "en" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le dio la bienvenida correctamente. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98]Hello and Welcome to Server[#FFFF00] " + p+ "[#98FB98], For play in the server you need register, use [#00FFFF]/register (password) [#98FB98]for register! :D");
- _IRC.Send( "#BRL", ".[#98FB98]Example: [#FFFF00] [#00FFFF]/register " + p+ "123");
- StaffMessage("Testeado correctamente (INGLES)");
- _IRC.Send( "#BRL", "Al Usuario " + p+ " se le dio la bienvenida correctamente. By ( "+ user +" )");
- }
- else if ( idioma == "pt" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le dio la bienvenida correctamente. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98]Bem vindo ao servidor[#FFFF00]" + p+ "[#98FB98], para jogar no servidor voce precisa se registrar, para se registrar voce tem que usar o comando [#00FFFF]/register (senha)");
- _IRC.Send( "#BRL", ".[#98FB98]Exemplo: [#FFFF00] [#00FFFF]/register " + p+ "123");
- StaffMessage("Testeado correctamente (PORTUGUES) ");
- }
- } else { EchoMessage("13"+ user +" 4Usted no tiene acceso"); }
- }
- else if ( cmd == "!nickregistrado" )
- {
- if ( !text ) StaffNotice( sintaxe + cmd + " <nick> <idioma>", player );
- else if (user == "Maximiliano")
- {
- _IRC <- { function Join(n="*"){ FBS_BOT.Send( "JOIN " + n + "\n" ); }, function Send(c,m) { FBS_BOT.Send( "PRIVMSG " + c + " " + m + "\n" ); } };
- local p = ( GetTok( text, " ", 1 ) );
- local idioma = (GetTok( text," ", 3) );
- local dias = (GetTok( text," ", 2) );
- if ( idioma == "es" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo que la cuenta que esta usando ya esta registrada. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98]Hola y Bienvenido al servidor[#FFFF00]" + p+ "[#98FB98], Ese nick ya fue registrado hace [#00FFFF]" + dias+ " dias[#98FB98], Si usted no lo registro, cambiese el nick y regrese para poder jugar");
- StaffMessage("Testeado correctamente (ESPAÑOL)");
- }
- else if ( idioma == "en" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo que la cuenta que esta usando ya esta registrada. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98]Hello and Welcome to the Server, [#FFFF00]" + p+ "[#98FB98], That nick was already registered [#00FFFF]" + dias+ " days ago[#98FB98], If you did not register the nickname you are using, you must exit the server and change the nickname to play here.");
- StaffMessage("Testeado correctamente (INGLES)");
- _IRC.Send( "#BRL", "Al Usuario " + p+ " se le dio la bienvenida correctamente. By ( "+ user +" )");
- }
- else if ( idioma == "pt" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo que la cuenta que esta usando ya esta registrada. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98]Ola e bem-vindo ao servidor [#FFFF00]" + p+ "[#98FB98], Esse nick ja foi registrado faz [#00FFFF]" + dias+ " dias[#98FB98], Se voce nao registrou ele, mude o nick e volte para poder jogar");
- StaffMessage("Testeado correctamente (PORTUGUES) ");
- }
- } else { EchoMessage("13"+ user +" 4Usted no tiene acceso"); }
- }
- else if ( cmd == "!carros" )
- {
- if ( !text ) StaffNotice( sintaxe + cmd + " <nick> <idioma>", player );
- else if (user == "Maximiliano")
- {
- _IRC <- { function Join(n="*"){ FBS_BOT.Send( "JOIN " + n + "\n" ); }, function Send(c,m) { FBS_BOT.Send( "PRIVMSG " + c + " " + m + "\n" ); } };
- local p = ( GetTok( text, " ", 1 ) );
- local idioma = (GetTok( text," ", 2) );
- if ( idioma == "es" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar vehiculos. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98], Los carros se compran en [#00FFFF]Sunshine Car[#98FB98], el carro mas barato tiene un costo de 110k.");
- StaffMessage("Testeado correctamente (ESPAÑOL)");
- }
- else if ( idioma == "en" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar vehiculos. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98] You can buy the cars in [#00FFFF]Sunshine Car[#98FB98], The cheapest car has a cost of 110k.");
- StaffMessage("Testeado correctamente (INGLES)");
- }
- else if ( idioma == "pt" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar vehiculos. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98] Voce pode comprar os veiculos em [#00FFFF]Sunshine Car[#98FB98], o mais barato custa 110k.");
- StaffMessage("Testeado correctamente (PORTUGUES) ");
- }
- } else { EchoMessage("13"+ user +" 4Usted no tiene acceso"); }
- }
- else if ( cmd == "!props" )
- {
- if ( !text ) StaffNotice( sintaxe + cmd + " <nick> <idioma>", player );
- else if (user == "Maximiliano")
- {
- _IRC <- { function Join(n="*"){ FBS_BOT.Send( "JOIN " + n + "\n" ); }, function Send(c,m) { FBS_BOT.Send( "PRIVMSG " + c + " " + m + "\n" ); } };
- local p = ( GetTok( text, " ", 1 ) );
- local idioma = (GetTok( text," ", 2) );
- if ( idioma == "es" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar propiedades. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98], Las propiedades se compran si estan en [#00FFFF]OFERTA[#98FB98] o comprandonselas a otros [#00FFFF]Jugadores[#98FB98], Necesitas minimo 150k.");
- StaffMessage("Testeado correctamente (ESPAÑOL)");
- }
- else if ( idioma == "en" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar Propiedades. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98], The properties are purchased if they are on [#00FFFF]OFFER[#98FB98] or buying from other [#00FFFF]Players[#98FB98], you need a minimum of 150k.");
- StaffMessage("Testeado correctamente (INGLES)");
- }
- else if ( idioma == "pt" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar vehiculos. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98], As propriedades são compradas a partir de [#00FFFF]ofertas[#98FB98] vindo de outros [#00FFFF]jogadores[#98FB98], voce precisara de no minimo 150k.");
- StaffMessage("Testeado correctamente (PORTUGUES) ");
- }
- } else { EchoMessage("13"+ user +" 4Usted no tiene acceso"); }
- }
- else if ( cmd == "!maxibotcmds" )
- {
- EchoMessage("13!Bienvenido, !nickregistrado, !carros, !props, !botchat, ");
- }
- else if ( cmd == "!botchat" )
- {
- if (user == "Maximiliano")
- {
- BRLMessage(text + " ( "+ user +" )");
- }else { EchoMessage("13"+ user +" 4Usted no tiene acceso"); }
- }
- }
- }
- //========== Cmds de Admin =============================
- function FBSStaffCommand( user, cmd, text )
- {
- {
- local NickInfo = FindNick( user ), level, tLevel, p;
- if ( NickInfo ) level = NickInfo.Level.tointeger();
- if (cmd)
- {
- if ( cmd.slice(0,1) == "." && cmd.len() > 1 ) {
- local msg = "12[ADMIN CHAT]7 " + user + "0: " + cmd.slice(1);
- local msg2 = "[#0000CD][ADMIN CHAT][#FFD700] " + user + "[#FFFFFF]: " + cmd.slice(1);
- if (text) { msg = msg + " " + text; }
- else if (text) { msg2 = msg + " " + text; }
- StaffMessage("" + msg );
- Message("[#FFE4B5] " + msg2);
- }
- }
- if ( cmd == "!lock" )
- {
- if ( level < 2 ) StaffMessage("[Erro] - Voce nao tem acesso a este comando.");
- else if ( !text ) StaffMessage("[Sintaxe] - !lock <senha>");
- else {
- SetPassword( " + text + " );
- MSG("Server Trancado");
- }
- }
- else if ( cmd == "!infp" )
- {
- if ( !text ) StaffNotice( user,"Syntax: " + cmd + " <Nick>");
- else
- {
- local Nick = GetTok( text, " ", 1);
- local q = QuerySQL(db, "SELECT * FROM Contas WHERE Nome='" + Nick + "'");
- if (GetSQLColumnData(q, 0) != Nick) StaffNotice(user ,"[Error] " + Nick + "'s nao existe.");
- else if ( GetSQLColumnData(q ,0 ) == null ) StaffNotice(user ,""+Nick+" Nao existe no sistema.")
- else
- {
- local name = GetSQLColumnData(q, 0), Reg = GetSQLColumnData(q, 7), Join = GetSQLColumnData(q, 8);
- StaffNotice( user, "6Nome0: "+Nick+"." );
- StaffNotice( user, "6Data De Registro0: "+Reg+"" );
- StaffNotice( user, "6Ultima vez que foi visto online0: "+Join+"" );
- }
- }
- }
- else if ( cmd == "!sname" )
- {
- if ( level < 2 ) StaffMessage("[Erro] - Voce nao tem acesso a este comando.");
- else if ( !text ) StaffMessage("[Sintaxe] - !sname <senha>");
- else {
- SetServerName( "" + text + "" );
- EchoNotice(user,"7Voce alterou o nome do servidor para " + text + " ");
- }
- }
- else if ( cmd == "!unlock" )
- {
- if ( level < 2 ) StaffMessage("[Erro] - Voce nao tem acesso a este comando.");
- else {
- SetPassword( "" );
- MSG("Server Destrancado");
- }
- }
- else if( cmd == "!bans" || cmd == "!banlist" || cmd == "!listaban" )
- {
- if ( level < 2 ) StaffMessage("[Erro] - Voce nao tem acesso a este comando.");
- else
- {
- local listQuery = QuerySQL( db, "SELECT * FROM Bans" );
- local count = 0;
- while ( GetSQLNextRow( listQuery ) )
- {
- count++;
- StaffNotice(user,"[BAN-#" + count + "]: Nome: " + GetSQLColumnData( listQuery, 0 ) + ", Admin: " + GetSQLColumnData( listQuery, 2 ) + ", Motivo: " + GetSQLColumnData( listQuery, 3 ) + ", Data: " + GetSQLColumnData( listQuery, 4 ));
- }
- FreeSQLQuery( listQuery );
- if( count == 0 ) return StaffNotice(user, "4[BAN-LIST]0: Sem jogadores banidos!");
- }
- }
- else if ( cmd == "!setvip" )
- {
- if ( level < 5 ) StaffMessage( "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffMessage( "9[Sintaxe] - !setvip <Nick/ID> <Level>");
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) StaffMessage("4Jogador Desconhecido." );
- else
- {
- local lvl = GetTok( text, " ", 2 );
- if ( !lvl ) StaffMessage( "9[Sintaxe] - !setlevel <Nick/ID> <Level>");
- else if ( !IsNum( lvl ) ) StaffMessage( "4[Erro] - Use Numeros." );
- else
- {
- status[ plr.ID ].Levelvip = lvl.tointeger();
- StaffNotice( user, "12Voce alterou o level de " + plr.Name + " para: " + lvl + " - " + Levelvip( plr ) + "." );
- I_MSG( "Admin " + user + " alterou seu level para: " + lvl + " - " + Levelvip( plr ) + ".", plr );
- MSG("Admin " + user + " deu uma vip para o jogador " + plr.Name + " Level: " + lvl + " - " + Levelvip( plr ) + ".");
- }
- }
- }
- }
- else if ( cmd == "!dp" )
- {
- if ( level < 2 ) EchoNotice( user,"Error - Your Level is not Enough." );
- else if ( !text ) EchoNotice( user,"Error - Syntax: " + cmd + " <Nombre Full>");
- else
- {
- local Nick = GetTok( text, " ", 1);
- local q = QuerySQL(db, "SELECT * FROM Contas WHERE Nome='" + Nick + "'");
- if (GetSQLColumnData(q, 0) != Nick) EchoNotice(user ,"[Error] " + Nick + "'s cuenta no existe.");
- else if ( GetSQLColumnData(q ,0 ) == null ) EchoNotice(user ,""+Nick+" No existe en la base de datos")
- else
- {
- local name = GetSQLColumnData(q, 0), level = GetSQLColumnData(q, 6), cash = GetSQLColumnData(q, 4), bank = GetSQLColumnData(q, 5), IP = GetSQLColumnData(q,1), UID = GetSQLColumnData(q,2);
- EchoNotice( user, "4[INFO-PLR]6 Name0: "+Nick+", 6Level0: "+level+", 6Cash0: "+cash+", 6Bank0: "+bank+"." );
- EchoNotice( user, "6IP0: "+IP+"" );
- EchoNotice( user, "6UID0: "+UID+"" );
- }
- }
- }
- else if ( cmd == "!cp" )
- {
- if ( level < 3 ) EchoNotice( user,"[ERROR] Usted no tiene acceso a este comando ");
- else if ( !text ) EchoNotice( user,"Error - Syntax: " + cmd + " <Nick/ID> ");
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) EchoNotice( user, "Jugador no esta en linea" );
- else
- {
- EchoNotice( user ,"[ACCOUNT-DATA] " + plr.Name + "" );
- EchoNotice( user ,"[ACCOUNT-UID] "+plr.UID+"")
- EchoNotice( user ,"[ACCOUNT-UID2] "+plr.UID2+"")
- }
- }
- }
- else if ( cmd == "!p" || cmd == "!players" )
- {
- local plr, buffer = "", MAX_PLAYERS = GetMaxPlayers();
- for( local i=0; i < MAX_PLAYERS; ++i )
- {
- plr = FindPlayer( i );
- if ( plr ) buffer = buffer + "12[" + plr.ID + "]" + plr.Name + "(Ping: " + plr.Ping + "),";
- }
- if ( buffer != "" ) StaffMessage( "2Jogadores Online: " + strip(buffer) );
- StaffMessage( "10Total de Jogadores0: " + GetPlayers() );
- }
- else if ( cmd == "!setpass" )
- {
- if ( level < 4 ) StaffMessage( "Voce nao tem acesso a este comando." );
- else if ( !text ) StaffMessage( cmd + " <Nick/ID> <Nova Senha>" );
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) StaffMessage( "Jogador Desconhecido." );
- //else if ( Checar( player, plr ) ) return 0;
- else
- {
- local senha = GetTok( text, " ", 2);
- if ( !senha ) StaffMessage( cmd + " <Nick/ID> <Nova Senha>" );
- else
- {
- local pass = e(senha);
- QuerySQL( db, "UPDATE Contas SET Senha='" + pass + "' WHERE Nome='" + plr.Name + "'" );
- StaffNotice( user, "8Voce mudou a senha de4 " + plr.Name + " 8para:4 " + senha );
- }
- }
- }
- }
- else if ( cmd == "!ban" )
- {
- if ( level < 4 ) StaffMessage( "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffMessage( cmd + " <Nick/ID> <Motivo>" );
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) StaffMessage("4Jogador Desconhecido." );
- else
- {
- local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
- if ( reason == null ) reason = "4Nenhum";
- Ban( user, plr, reason );
- }
- }
- }
- else if ( cmd == "!setlevel" )
- {
- if ( level < 5 ) StaffMessage( "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffMessage( "9[Sintaxe] - !setlevel <Nick/ID> <Level>");
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) StaffMessage("4Jogador Desconocido." );
- else
- {
- local lvl = GetTok( text, " ", 2 );
- if ( !lvl ) StaffMessage( "9[Sintaxe] - !setlevel <Nick/ID> <Level>");
- else if ( !IsNum( lvl ) ) StaffMessage( "4[Erro] - Use Numeros." );
- else
- {
- status[ plr.ID ].Level = lvl.tointeger();
- StaffNotice( user, "12Voce alterou o level de " + plr.Name + " para: " + lvl + " - " + LevelTag( plr ) + "." );
- I_MSG( "Admin " + user + " alterou seu level para: " + lvl + " - " + LevelTag( plr ) + ".", plr );
- }
- }
- }
- }
- else if ( cmd == "!kick" )
- {
- if ( level < 2 ) StaffMessage( "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffMessage( "9[Sintaxe] - !kick <Nick/ID> <Motivo>");
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) StaffMessage("4Jogador Desconhecido." );
- else
- {
- local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
- if ( reason == null ) reason = "4Nenhum";
- Kick( user, plr, reason );
- }
- }
- }
- else if (cmd == "!salvartudo" || cmd == "!saveall")
- {
- if ( level < 5 ) StaffMessage( "4Voce nao tem acesso a este comando.", player);
- else{
- ADMIN( user + " Salvou dados do servidor... ");
- SalvarTudo();
- StaffMessage("4*** Voce salvou o dados do servidor... ");
- }
- }
- else if ( cmd == "!ban" )
- {
- if ( level < 4 ) StaffMessage( "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffMessage( "9[Sintaxe] - !ban <Nick/ID> <Motivo>");
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) StaffMessage("4Jogador Desconhecido." );
- else
- {
- local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
- if ( reason == null ) reason = "4Nenhum";
- Ban( user, plr, reason );
- }
- }
- }
- else if( cmd == "!reload" || cmd == "!r" )
- { Reload();
- }
- else if( cmd == "!exe" )
- {
- if ( !text ) StaffNotice( user, "13[Sintaxe] - !exe <Codigo SQ>" );
- else
- {
- try
- {
- local script = compilestring( text );
- if(script)
- {
- script();
- StaffMessage( "4Comando executado com sucesso." );
- }
- else StaffNotice( user, "4Erro!" );
- }
- catch(e) StaffNotice( user, "Erro:" + e );
- }
- }
- else if ( cmd == "!brl" )
- {
- StaffNotice( user, "13Bot Joined" );
- FBS_BOT.Send( "JOIN #BRL \n" );
- }
- else if ( cmd == "!test" )
- {
- _IRC.Send( "#BRL", "7Testeado correctamente. 13By ( "+ user +" ) \n");
- BRLMessage(".Test");
- }
- else if ( cmd == "!bienvenido" )
- {
- if ( !text ) StaffNotice( sintaxe + cmd + " <nick> <idioma>", player );
- else
- {
- _IRC <- { function Join(n="*"){ FBS_BOT.Send( "JOIN " + n + "\n" ); }, function Send(c,m) { FBS_BOT.Send( "PRIVMSG " + c + " " + m + "\n" ); } };
- local p = ( GetTok( text, " ", 1 ) );
- local idioma = (GetTok( text," ", 2) );
- if ( idioma == "es" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le dio la bienvenida correctamente. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98]Hola y Bienvenido al servidor[#FFFF00] " + p+ "[#98FB98], para jugar en el servidor usted necesita registrarse, para registrarte tienes que usar el comando [#00FFFF]/register (contrasena)");
- _IRC.Send( "#BRL", ".[#98FB98]Ejemplo: [#FFFF00] [#00FFFF]/register " + p+ "123");
- StaffMessage("Testeado correctamente (ESPAÑOL)");
- }
- else if ( idioma == "en" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le dio la bienvenida correctamente. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98]Hello and Welcome to Server[#FFFF00] " + p+ "[#98FB98], For play in the server you need register, use [#00FFFF]/register (password) [#98FB98]for register! :D");
- _IRC.Send( "#BRL", ".[#98FB98]Example: [#FFFF00] [#00FFFF]/register " + p+ "123");
- StaffMessage("Testeado correctamente (INGLES)");
- _IRC.Send( "#BRL", "Al Usuario " + p+ " se le dio la bienvenida correctamente. By ( "+ user +" )");
- }
- else if ( idioma == "pt" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le dio la bienvenida correctamente. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98]Bem vindo ao servidor[#FFFF00]" + p+ "[#98FB98], para jogar no servidor voce precisa se registrar, para se registrar voce tem que usar o comando [#00FFFF]/register (senha)");
- _IRC.Send( "#BRL", ".[#98FB98]Exemplo: [#FFFF00] [#00FFFF]/register " + p+ "123");
- StaffMessage("Testeado correctamente (PORTUGUES) ");
- }
- }
- }
- else if ( cmd == "!nickregistrado" )
- {
- if ( !text ) S_MSG( sintaxe + cmd + " <nick> <idioma> <dias>", player );
- else
- {
- _IRC <- { function Join(n="*"){ FBS_BOT.Send( "JOIN " + n + "\n" ); }, function Send(c,m) { FBS_BOT.Send( "PRIVMSG " + c + " " + m + "\n" ); } };
- local p = ( GetTok( text, " ", 1 ) );
- local dias = (GetTok( text," ", 2) );
- local idioma = (GetTok( text," ", 3) );
- if ( idioma == "es" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo que la cuenta que esta usando ya esta registrada. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", "Al Usuario " + p+ " se le informo que su nick ya fue registrado, Mensaje Enviado Correctamente. By ( "+ user +" )");
- _IRC.Send( "#BRL", ".[#98FB98]Hola y Bienvenido al servidor[#FFFF00]" + p+ "[#98FB98], Ese nick ya fue registrado hace [#00FFFF]" + dias+ " dias[#98FB98], Si usted no lo registro, cambiese el nick y regrese para poder jugar");
- StaffMessage("Testeado correctamente (ESPAÑOL)");
- }
- if ( idioma == "en" )
- {
- StaffMessage("Pronto (INGLES)");
- }
- if ( idioma == "pt" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo que la cuenta que esta usando ya esta registrada. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", "Al Usuario " + p+ " se le informo que su nick ya fue registrado, Mensaje Enviado Correctamente. By ( "+ user +" )");
- _IRC.Send( "#BRL", ".[#98FB98]Ola e bem-vindo ao servidor [#FFFF00]" + p+ "[#98FB98], Esse nick ja foi registrado faz [#00FFFF]" + dias+ " dias[#98FB98], Se voce nao registrou ele, mude o nick e volte para poder jogar");
- StaffMessage("Testeado correctamente (PORTUGUES) ");
- }
- }
- }
- else if ( cmd == "!helpercmds" )
- {
- StaffMessage(" !Bienvenido, !nickregistrado, !carros, !props, !helplogin");
- }
- else if ( cmd == "!me" )
- {
- BRLMessage(text + " ( "+ user +" )");
- }
- else if ( cmd == "!carros" )
- {
- _IRC <- { function Join(n="*"){ FBS_BOT.Send( "JOIN " + n + "\n" ); }, function Send(c,m) { FBS_BOT.Send( "PRIVMSG " + c + " " + m + "\n" ); } };
- local p = ( GetTok( text, " ", 1 ) );
- local idioma = (GetTok( text," ", 2) );
- if ( !text ) StaffNotice( sintaxe + cmd + " <nick> <idioma> <dias>", player );
- else
- {
- local p = ( GetTok( text, " ", 1 ) );
- local idioma = (GetTok( text," ", 2) );
- if ( idioma == "es" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar vehiculos. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98], Los carros se compran en [#00FFFF]Sunshine Car[#98FB98], el carro mas barato tiene un costo de 110k.");
- StaffMessage("Testeado correctamente (ESPAÑOL)");
- }
- if ( idioma == "en" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar vehiculos. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98] You can buy the cars in [#00FFFF]Sunshine Car[#98FB98], The cheapest car has a cost of 110k.");
- StaffMessage("Testeado correctamente (INGLES)");
- }
- if ( idioma == "pt" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar vehiculos. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98] Voce pode comprar os veiculos em [#00FFFF]Sunshine Car[#98FB98], o mais barato custa 110k.");
- StaffMessage("Testeado correctamente (PORTUGUES) ");
- }
- }
- }
- else if ( cmd == "!props" )
- {
- _IRC <- { function Join(n="*"){ FBS_BOT.Send( "JOIN " + n + "\n" ); }, function Send(c,m) { FBS_BOT.Send( "PRIVMSG " + c + " " + m + "\n" ); } };
- local p = ( GetTok( text, " ", 1 ) );
- local idioma = (GetTok( text," ", 2) );
- if ( !text ) StaffNotice( sintaxe + cmd + " <nick> <idioma> <dias>", player );
- else
- {
- if ( idioma == "es" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar propiedades. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98], Las carros se compran si estan en [#00FFFF]OFERTA[#98FB98] o comprandonselas a otros [#00FFFF]Jugadores[#98FB98], Necesitas minimo 150k.");
- StaffMessage("Testeado correctamente (ESPAÑOL)");
- BRLMessage("Al Usuario " + p+ " se le informo como comprar Propiedades. Mensaje Enviado Correctamente. By ( "+ user +" )");
- }
- if ( idioma == "en" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar propiedades. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98] You can buy the cars in [#00FFFF]Sunshine Car[#98FB98], The cheapest car has a cost of 110k.");
- StaffMessage("Testeado correctamente (INGLES)");
- BRLMessage("Al Usuario " + p+ " se le informo como comprar Propiedades. Mensaje Enviado Correctamente. By ( "+ user +" )");
- }
- if ( idioma == "pt" )
- {
- _IRC.Send( "#BRL", "7Al Usuario 12" + p+ " 7se le informo como comprar propiedades. 13By ( "+ user +" ) \n");
- _IRC.Send( "#BRL", ".[#98FB98][#FFFF00]" + p+ "[#98FB98] Voce pode comprar as veiculos em [#00FFFF]Sunshine Car[#98FB98], o mais barato custa 110k.");
- StaffMessage("Testeado correctamente (PORTUGUES) ");
- BRLMessage("Al Usuario " + p+ " se le informo como comprar Propiedades. Mensaje Enviado Correctamente. By ( "+ user +" )");
- }
- }
- }
- else if ( cmd == "!unbanip" )
- {
- if ( level < 2 ) StaffMessage("[Erro] - Voce nao tem acesso a este comando.");
- else if ( !text ) StaffNotice( user, "13[Sintaxe] - " + cmd + " <Ip>" );
- else
- {
- UnbanIP("" + text + "");
- StaffMessage("6Admin0 " + user + " 6desbaniu o ip0 -> " + text +" ");
- }
- }
- else if ( cmd == "!cmds" )
- {
- if ( level < 2 ) StaffMessage( user, "4[Erro] - Voce nao tem acesso a este comando." );
- else StaffNotice( user, "12!exe, !ip, !kick, !lockserver, !unlockserver, !ban, !unban, !reload, !setlevel, !drown, !salvartudo, !banlist, !cp, !dp, !sban, !banuid, !unbanuid, warn, warnstaff." );
- }
- else if ( cmd == "!ip")
- {
- if( level < 3 ) StaffNotice( user, ICOL_RED + "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffNotice( user, ICOL_RED + "[Sintaxe] - !ip <Nick/ID>" );
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if (!plr) StaffNotice( user, "[Erro] - Jogador Desconhecido." );
- else StaffNotice( user, "7IP de0 " + plr.Name + "7: [ " + plr.IP + " ]." );
- }
- }
- else if(cmd=="!sban")
- {
- if ( level < 2 ) StaffMessage( user, "4[Erro] - Voce nao tem acesso a este comando." );
- else if (!text) EchoNotice( user,"[Syntax] - /" + cmd + " <Nick Full> <Motivo>");
- else
- {
- local plr = GetPlayer(GetTok(text, " ", 1));
- local playerJ = GetTok( text, " ", 1);
- local motivo = GetTok(text, " ", 2 NumTok(text, " "));
- local q = QuerySQL(db, "SELECT * FROM Contas WHERE Nome='" + playerJ + "'");
- local q2 = QuerySQL(db, "SELECT * FROM Bans WHERE Nome='" + playerJ + "'");
- if (GetSQLColumnData(q, 0) != playerJ) EchoNotice(user,"[Error] - " + playerJ + "'s Conta nao existe.", player);
- else if ( GetSQLColumnData(q ,0 ) == null ) EchoNotice( user,"Esse jogador nao existe.")
- else if (plr) EchoNotice( user,"[ATT-BAN] O Jogador esta online. use !ban "+plr+".")
- else if(!motivo)EchoNotice( user,"[ERROR] Voce deve colocar o motivo.")
- else if (GetSQLColumnData(q2, 0) == playerJ) EchoNotice(user,"[BAN] "+playerJ+" ja esta banido.")
- else
- {
- QuerySQL(db, "SELECT * FROM Contas WHERE Name='" + playerJ + "'");
- local name = GetSQLColumnData(q, 0), Ip = GetSQLColumnData(q, 1), UID = GetSQLColumnData(q, 2), Cash = GetSQLColumnData(q, 4), bank = GetSQLColumnData(q, 5), Level = GetSQLColumnData(q,6), Reg = GetSQLColumnData(q,7)
- QuerySQL( db, "INSERT INTO Bans ( Nome, UID, Admin, Motivo, Data ) VALUES ( '" + name + "', '" + UID + "', '" + user + "', '"+motivo+"', '" + GetFullTime() + "' )" );
- ADMIN( user + " baniu " + name + " Motivo: "+motivo+"" );
- }
- }
- }
- else if ( cmd == "!banuid" )
- {
- if ( level < 4 ) EchoNotice( user,"Usted no tiene acceso a este comando.");
- else if(!text || NumTok(text, " ") < 3) EchoNotice(user,"Error: Use /"+cmd+" <player> <days 1 - 100> <reason>");
- else
- {
- local now = date();
- local dat = now.day + "/" + now.month + "/" + now.year + " " + now.hour + ":" + now.min + ":" + now.sec;
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- local reason = GetTok(text, " ", 3 NumTok(text, " "));
- if ( !plr ) EchoNotice( user,"Jugador Desconocido.");
- else if ( level < status[ plr.ID ].Level ) EchoNotice( user,"Usted no puede banear a alguien con nivel superior a usted." );
- else
- {
- QuerySQL( db, "INSERT INTO UIDs ( NOMBRE, UID, UID2, IP, ADMIN, DATA, TIME, RAZON ) VALUES ( '" + plr.Name + "', '" + plr.UniqueID + "', '" + plr.UID2 + "', '"+plr.IP+"', '"+user+"', '" + dat + "', '"+addbantime(GetTok(text, " ", 2).tointeger())+"', '"+reason+"' )")
- Message("[#00FFFF][BAN-UID] [#00FFFF]"+user+" [#FFFFFF]prohibio a [#00FFFF]"+plr.Name+" [#FFFFFF]Dias: [#00FFFF]"+(GetTok(text, " ", 2).tointeger())+" [#FFFFFF]razon: [#00FFFF]"+reason+"." )
- EchoMessage("4[BAN-UID] "+user+" prohibio a "+plr.Name+" Dias: "+(GetTok(text, " ", 2).tointeger())+" razon: "+reason+"." )
- plr.Kick();
- }
- }
- }
- else if ( cmd == "!unbanuid" )
- {
- local q = QuerySQL(db, "SELECT * FROM UIDs WHERE NOMBRE='" + text + "'" );
- if ( level < 4 ) EchoNotice( user,"Error - Tu level no es acto para este comando." );
- else if ( !text ) EchoNotice( user,"Error Syntax: " + cmd + " <nombre completo>");
- else if ( GetSQLColumnData( q, 0 ) != text ) EchoMessage(user,text + " el no esta baneado.");
- else
- {
- QuerySQL( db, "DELETE FROM UIDs WHERE NOMBRE LIKE '" + text + "'" );
- MSG( "[#00FFFF][PACK-UNBANNED] [#FFFFFF]Admin [#00FFFF]" + user + " [#FFFFFF]Quito prohibicion a " + text + "." );
- EchoMessage( "4>> [UNBAN] " + user + " quito prohibicion de UID a " + text + "." );
- }
- }
- else if ( cmd == "!uid")
- {
- if( level < 3 ) StaffNotice( user, ICOL_RED + "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffNotice( user, ICOL_RED + "[Sintaxe] - !uid <Nick/ID>" );
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if (!plr) Staffnotice( user, "[Erro] - Jogador Desconhecido." );
- else StaffNotice( user, ICOL_BLUE + "IP de " + plr.Name + ": [ " + plr.UniqueID + " ]." );
- }
- }
- else if ( cmd == "!drown" )
- {
- if( level < 3 ) StaffNotice( user, ICOL_RED + "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffNotice( user, ICOL_RED + "[Sintaxe] - 4!drown <Nick/ID> <Motivo> " );
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) StaffNotice( user, "4Error - Jogador Desconhecido.", player );
- else
- {
- local msg = GetTok( text, " ", 2, NumTok( text, " " ) );
- if ( !msg ) StaffNotice( user, "4Erro - Qual o motivo?" );
- else
- {
- ADMIN( user + " Afogou o Jogador " + plr.Name +". Motivo: " + msg + " " );
- plr.Pos = Vector( 283.521 , -1574.3 , 7.19846 );
- }
- }
- }
- }
- else if ( cmd == "!warn" )
- {
- if ( level < 4 ) StaffMessage( "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffMessage( "9[Sintaxe] - !warn <Nick/ID> <Motivo>");
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) StaffMessage("4Jogador Desconhecido." );
- else
- {
- local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
- if ( reason == null ) reason = "4Nenhum";
- status[ plr.ID ].Warns ++;
- if ( status[ plr.ID ].Warns == 5 ) Ban( "Server", plr, "[5/5] Warns" );
- I_MSG("Maximo de warns sao 5, cuidado para nao ser banido. [" + status[ plr.ID ].Warns + "/5]", plr );
- ADMIN( user + " advertiu o jogador " + plr.Name + " Motivo: " + reason + ". [" + status[ plr.ID ].Warns + "/5]");
- }
- }
- }
- else if ( cmd == "!warnstaff" )
- {
- if ( level < 4 ) StaffMessage( "4[Erro] - Voce nao tem acesso a este comando." );
- else if ( !text ) StaffMessage( "9[Sintaxe] - !warnstaff <Nick/ID> <Motivo>");
- else
- {
- local plr = GetPlayer( GetTok( text, " ", 1 ) );
- if ( !plr ) StaffMessage("4Jogador Desconhecido." );
- else
- {
- local motivo = GetTok( text, " ", 2 NumTok( text, " " ) );
- if ( motivo == null ) motivo = "Nenhum";
- if ( status[ plr.ID ].Level <= 2 ) StaffMessage("Jogador nao e administrador");
- status[ plr.ID ].warn_staff ++;
- if ( status[ plr.ID ].warn_staff == 5 ) status[ plr.ID ].Level = 1;
- I_MSG("Maximo de warns sao 5, voce pode ser removido da staff. [" + status[ plr.ID ].warn_staff + "/5]", plr );
- ADMIN( user + " advertiu o jogador " + plr.Name + " no cargo administrativo. Motivo: " + motivo + ". [" + status[ plr.ID ].warn_staff + "/5]");
- }
- }
- }
- }
- }
- function EchoNotice( nick, text )
- {
- FBS_BOT.Send( "NOTICE " + nick + " " + text + "\n" );
- }
- function EchoMessage( text )
- {
- FBS_BOT.Send( "PRIVMSG " + FBS_CHAN + " :" + text + "\n" );
- }
- function StaffNotice( nick, text )
- {
- FBS_BOT.Send( "NOTICE " + nick + " " + text + "\n" );
- }
- function StaffMessage( text )
- {
- FBS_BOT.Send( "PRIVMSG " + FBS_SCHAN + " :" + text + "\n" );
- }
- function BRLMessage ( text )
- {
- _IRC <- { function Join(n="*"){ FBS_BOT.Send( "JOIN " + n + "\n" ); }, function Send(c,m) { FBS_BOT.Send( "PRIVMSG " + c + " " + m + "\n" ); } };
- _IRC.Send( "#BRL", text);
- }
- function FBSSortNicks( szList )
- {
- local a = NumTok( szList, " " );
- local NickList = GetTok( szList, " ", 6, a ), i = 1;
- FBS_NICKS <- array( 50, null );
- while( GetTok( NickList, " ", i ) != "366" )
- {
- local levelnick = GetTok( NickList, " ", i ), nick = levelnick.slice( 1 ), level = levelnick.slice( 0, 1 );
- if ( level == ":" ) { level = nick.slice( 0, 1 ); nick = nick.slice( 1 ); }
- if ( level == "+" ) AddNewNick( nick, 2 );
- else if ( level == "%" ) AddNewNick( nick, 3 );
- else if ( level == "@" ) AddNewNick( nick, 4 );
- else if ( level == "&" ) AddNewNick( nick, 5 );
- else if ( level == "~" ) AddNewNick( nick, 7 );
- else AddNewNick( nick, 1 );
- i ++;
- }
- }
- function AddNewNick( szName, iLevel )
- {
- local i = FindFreeNickSlot();
- if ( i != -1 )
- {
- FBS_NICKS[ i ] = FBSLIST();
- FBS_NICKS[ i ].AddNick( szName, iLevel );
- }
- }
- function FindFreeNickSlot()
- {
- for ( local i = 0; i < FBS_NICKS.len(); i++ )
- {
- if ( !FBS_NICKS[ i ] ) return i;
- }
- return -1;
- }
- function FindNick( szName )
- {
- for ( local i = 0; i < FBS_NICKS.len(); i++ )
- {
- if ( FBS_NICKS[ i ] )
- {
- if ( FBS_NICKS[ i ].Name == szName ) return FBS_NICKS[ i ];
- }
- }
- return null;
- function GetIRCLevel( Level )
- {
- local Name = "User";
- switch( Level )
- {
- case 1:
- Name = "User";
- break;
- case 2:
- Name = "Helper";
- break;
- case 3:
- Name = "Half-Op";
- break;
- case 4:
- Name = "Op";
- break;
- case 5:
- Name = "Manager";
- break;
- case 6:
- Name = "Owner";
- break;
- }
- return Name;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement