Author Topic: Admin X || 0.3 Released - No More Mindcontrol!  (Read 7123 times)

Ugh you didn't do camelcase
Ugh*2 you didn't put in RTB checks
Ugh*3 you didn't isObject the clients
Ugh*4 you improperly formatted the description

I'll post a fixed up version later.

i got first one and third one
dun steal my thundr

i got first one and third one
dun steal my thundr
Nobody can even touch the thundr on that epic rant.

http://lh.rs/rMn5ICL02rxq

fixed (sort of)

can someone fix the MindControl command so that it doesn't forget with people?

I know allot of the stuff in Blockland can already be abused....but this is just going too far.
Admin itself is abusable.  I'm not going to nerf it just because people are bad at their job.

If the admins are abusing admin then it's a stuffty server anyway and probably not even worth playing.

bricky did you see my amazing constructive criticism on the first page

silly me, of course you did

what are your thoughts?

Ugh you didn't do camelcase
Ugh*2 you didn't put in RTB checks
Ugh*3 you didn't isObject the clients
Ugh*4 you improperly formatted the description

I'll post a fixed up version later.
1. Why bother?  It makes no difference in TorqueScript (I know it does in other languages, but again, not in TorqueScript)
2. Fixed in 0.2
3. Will fix in a later version.
4. Fixed in 0.2

bricky did you see my amazing constructive criticism on the first page

silly me, of course you did

what are your thoughts?
I'm glad you pointed them out and I am fixing (most) of those.  Thank you.

In fact, I'm about to release the new version right now.

Edit: aaaaaand done.
« Last Edit: July 24, 2012, 01:46:22 AM by brickybob »

I did a quick fix that I missed, I forgot to put a time in the /ver command so it just stays there forever.  It's fixed now, type /ver and you'll get "0.2 Hotfix"

much better
it's still weird as forget in some places


and this? GameConnection::spawnPlayer(%cl)
if(%cl.spawned = 0) {%cl.spawned = 1;} //instead of doing fancy stuff, I just swapped the place of the two if checks.
   if(%cl.spawned = nil) {%cl.spawned = 0;}


what in forgets name

just use GameConnection::onClientEnterGame(%cl)
it was made for people like you
i'm not kidding

$pref::server::alwaysspawnmessage is a really crappy pref. i don't like it and i don't think anyone will ever use it. i mean, if the entire centerprint was 100% customizable, sure. i could be wrong, but i'm probably not.

function serverCmdver(%cl)
{
   %cl.centerPrint($pref::server::adminxver,3);
}

make that messageclient(%cl, '', $pref::server::adminxver);

findclientbyname(%target).player.addhealth(-%power); are you 100% positive this works?

You still failed to put isObject checks on the findClientByName(%target).player.
This means that any server running this mod that I'm admin on, I can lag it practically to death by simply spamming this servercmd with an invalid name.


check it-
function serverCmdSlay(%c,%t) //Proper camelCase dammit
{
   if(!%c.isAdmin) //Check for admin
      return;
   if(!isObject(%t = findClientByName(%t))) //target client isobject.
      return;
   if(!isObject(%p = %t.player)) //player isobject
      return;
   announce(%c.getPlayerName() SPC "has slain" SPC %t.getPlayerName());
   %p.kill();
}


There. That's the perfect function. follows all the stuff that i've been taught/learned


note the if(!isObject
more specifically, the !. that means opposite.
so if i do
==> %a = 1; echo(!%a);
0


tada.

%targetname = findclientbyname(%target).name; you're just making things hard on yourself. also this looks stupid.


if(isFile("Add-Ons/System_ReturnToBlockland/server.cs")) //LOOK, CHECKING FOR RTB!  DO YOU LOVE ME NOW?
no i hate you. you forgot something important: just because RTB exists doesn't mean it's executed!
DON'T loving EXECUTE IT RIGHT HERE DUMBASS
I SAW YOU - you were thinking you'd just throw in a exec("Add-Ons/System_ReturnToBlockland/server.cs"); weren't you? yes you were! don't deny it!
Do it right.

if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
{
   if(!$RTB::RTBR_ServerControl_Hook)
   exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");


http://www.returntoblockland.com/files/RTB_Documentation.pdf
« Last Edit: July 24, 2012, 02:55:51 AM by Lugnut »

no i hate you. you forgot something important: just because RTB exists doesn't mean it's executed!
DON'T loving EXECUTE IT RIGHT HERE DUMBASS
I SAW YOU - you were thinking you'd just throw in a exec("Add-Ons/System_ReturnToBlockland/server.cs"); weren't you? yes you were! don't deny it!
lugnut take some breaths bro

much better
it's still weird as forget in some places


and this? GameConnection::spawnPlayer(%cl)
if(%cl.spawned = 0) {%cl.spawned = 1;} //instead of doing fancy stuff, I just swapped the place of the two if checks.
   if(%cl.spawned = nil) {%cl.spawned = 0;}


what in forgets name

just use GameConnection::onClientEnterGame(%cl)
it was made for people like you
i'm not kidding

$pref::server::alwaysspawnmessage is a really crappy pref. i don't like it and i don't think anyone will ever use it. i mean, if the entire centerprint was 100% customizable, sure. i could be wrong, but i'm probably not.

function serverCmdver(%cl)
{
   %cl.centerPrint($pref::server::adminxver,3);
}

make that messageclient(%cl, '', $pref::server::adminxver);

findclientbyname(%target).player.addhealth(-%power); are you 100% positive this works?

You still failed to put isObject checks on the findClientByName(%target).player.
This means that any server running this mod that I'm admin on, I can lag it practically to death by simply spamming this servercmd with an invalid name.


check it-
function serverCmdSlay(%c,%t) //Proper camelCase dammit
{
   if(!%c.isAdmin) //Check for admin
      return;
   if(!isObject(%t = findClientByName(%t))) //target client isobject.
      return;
   if(!isObject(%p = %t.player)) //player isobject
      return;
   announce(%c.getPlayerName() SPC "has slain" SPC %t.getPlayerName());
   %p.kill();
}


There. That's the perfect function. follows all the stuff that i've been taught/learned


note the if(!isObject
more specifically, the !. that means opposite.
so if i do
==> %a = 1; echo(!%a);
0


tada.

%targetname = findclientbyname(%target).name; you're just making things hard on yourself. also this looks stupid.


if(isFile("Add-Ons/System_ReturnToBlockland/server.cs")) //LOOK, CHECKING FOR RTB!  DO YOU LOVE ME NOW?
no i hate you. you forgot something important: just because RTB exists doesn't mean it's executed!
DON'T loving EXECUTE IT RIGHT HERE DUMBASS
I SAW YOU - you were thinking you'd just throw in a exec("Add-Ons/System_ReturnToBlockland/server.cs"); weren't you? yes you were! don't deny it!
Do it right.

if(isFile("Add-Ons/System_ReturnToBlockland/server.cs"))
{
   if(!$RTB::RTBR_ServerControl_Hook)
   exec("Add-Ons/System_ReturnToBlockland/RTBR_ServerControl_Hook.cs");


http://www.returntoblockland.com/files/RTB_Documentation.pdf
uh
how do you put a system addon in Blockland without executing it?

how do you put a system addon in Blockland without executing it?

... what

you simply don't enable it

and this? GameConnection::spawnPlayer(%cl)
if(%cl.spawned = 0) {%cl.spawned = 1;} //instead of doing fancy stuff, I just swapped the place of the two if checks.
   if(%cl.spawned = nil) {%cl.spawned = 0;}


what in forgets name

just use GameConnection::onClientEnterGame(%cl)
it was made for people like you
i'm not kidding

he even failed to notice the member value hasSpawnedOnce; no need to make his own spawned value which doesn't even work on mapchanges

findclientbyname(%target).player.addhealth(-%power); are you 100% positive this works?

it works as long as there's a client whose name contains the value of %target
« Last Edit: July 24, 2012, 04:49:51 AM by Port »


You should fix mindcontrol, it's stuff.

You should fix mindcontrol, it's stuff.
I'll probably just delete it all together.  Nothing it can do that the other commands can't.

y/n?