Here's the result:
Code: Select all
$password["208_100_45_12"] = "yourPassword";
function remoteSetMusic(%player, %track, %mode)
{
if($password[var($Server::Address)] != "") {
say(0, "#login "@ $password[var($Server::Address)]);
}
}
function String::Replace(%string, %search, %replace){
%len = String::Len(%search);
for (%i = 0; (%char = String::getSubStr(%string, %i, %len)) != ""; %i++) {
if (%char @ "s" == %search @ "s")
%string = String::getSubStr(%string, 0, %i) @ %replace @ String::getSubStr(%string, %i + %len, 255);
}
return %string;
}
function var(%this)
{
%v = String::Replace(%this, ":", " ");
%v = String::Replace(%v, ".", "_");
return getWord(%v, 1);
}
Most of you have been around long enough to understand how to add a script so I won't go into details. Just use a plain text editor to create a file in your config folder named something like autologin.cs. Add the above code replacing yourPassword with your registered password and save the file. Then at the bottom of autoexec.cs, add a new line with the following command: exec("autologin.cs");
P.S. Thanks for the jump start Perrinoia!
Enjoy