Author Topic: Add your Co-Host! - Failed due being a unless add-on  (Read 3575 times)

This mod gives you the option to add your co-host.

When you add your co-host, it will automatically remove them from the admin and the super admin list while they are the host as well. There can only be 1 co-host at a time, it will not let you add another co-host unless you don't have one.

Commands:
/setCoHost - Sets the co-host
/removeCoHost - Removes the co-host

This can be risky, so be careful who you put as your Co-Host!

Link no here, go away.
« Last Edit: July 02, 2013, 10:50:59 PM by Visolator »

Do co-hosts get any new ability's, like kicking/banning SA?

Do co-hosts get any new ability's, like kicking/banning SA?
They are just like the host, I think they can. I have tried this mod, but I haven't tried out the kicking or banning, since no one was on to test with me. Besides, the host can't ban super admins anyway, they have to de-admin to do it.
« Last Edit: July 02, 2013, 03:18:41 PM by Visolator »

The question is.
Can they use eval though?

They are just like the host, I think they can. I have tried this mod, but I haven't tried out the kicking or banning, since no one was on to test with me. Besides, the host can't ban super admins anyway, they have to de-admin to do it.
The real way to check for the host is by comparing the clients blid to getnumkeyid()
Also config/server/prefs.cs contains more than $Pref::Server::*

They are just like the host, I think they can. I have tried this mod, but I haven't tried out the kicking or banning, since no one was on to test with me. Besides, the host can't ban super admins anyway, they have to de-admin to do it.

isHost is not a default value and will not allow you to kick SA's or lower if its true. basically this mod is pointless. only thing it seems to do is set isHost to 1 (which some mods use) and and has that "you got co-host" message.

Warning - while you were typing a new reply has been posted. You may wish to review your post.
assddf



Essentially what this does (in a method which is not great for some of the reasons stated above) is basically just change the message displayed when the "co host" joins the server. I recommend you take into consideration the points Wrapperup and Zeblote made to you. Also to improve the mod you could work with function serverCmdRTB_deAdminPlayer(%client,%victim) to allow the co host to be able to deadmin Super Admins, essentially making the player a proper co host. Just remember to check to see if %victim is not the host.


Already made by Wrapperup
http://forum.blockland.us/index.php?topic=191198.0
why re-make this co-host?

Because mine is stuffty and broken, and i never remade it. I deleted the DL a long while ago.
« Last Edit: July 02, 2013, 04:13:00 PM by Wrapperup »

Essentially what this does (in a method which is not great for some of the reasons stated above) is basically just change the message displayed when the "co host" joins the server. I recommend you take into consideration the points Wrapperup and Zeblote made to you. Also to improve the mod you could work with function serverCmdRTB_deAdminPlayer(%client,%victim) to allow the co host to be able to deadmin Super Admins, essentially making the player a proper co host. Just remember to check to see if %victim is not the host.

Okay, I will add this.

EDIT: Ok, I updated it with the code.

Code: [Select]
function serverCmdRTB_deAdminPlayer(%client,%victim)
{
if(!%client.isSuperAdmin)
return;
if(%victim == %client)
{ messageClient(%cl,'',"<color:FF00FF>You can't de-admin yourself. Ask the host to do so."); return; }
if(%victim.isHost)
{ messageClient(%cl,'',"<color:FF00FF>You can't de-admin the host."); return; }
parent::serverCmdRTB_deAdminPlayer(%client,%victim);
}
Forgot to indent, I will update that in the script to be more organized.
« Last Edit: July 02, 2013, 05:40:51 PM by Visolator »

1. It doesn't do anything in relation to the co host
2. The command uses %client and when you message the client you use %cl
3. You are still using %victim.isHost

Infact I have decided not to spoon feed you. I will help though

You need to check if %client is co host is using the command and you need to check to see if %victim is super admin and then set %victim.isSuperAdmin to false and then parent the command. You also should fix the things stated above.
« Last Edit: July 02, 2013, 06:13:52 PM by Danny Boy »

I think this should go in the fail bin. There's no good reason to have a co-host. Your co-host should be a super admin and the rest of your admins should be standard admins. There's no reason to introduce yet another level of privilege for the hell of it.

I think the sole purpose of this addon is to make yourself feel special by being a host without actually hosting.