Server Help

ASSS Questions - Your own squad

NightHawk - Wed Dec 01, 2004 3:03 am
Post subject: Your own squad
I suggest adding the squad of your current name to the LOGINOK:Name login resonse. This way, clients can easily put the right squad in when you press # to send a squad message.
SuSE - Wed Dec 01, 2004 4:40 am
Post subject:
CRAZY TALK! sa_tongue.gif
CypherJF - Wed Dec 01, 2004 11:01 am
Post subject:
Or simply have the end-user enter the information into the client. Although, I'd like to have squads listed with each player, Grel. had simply said that this is a "simple chat" protocol.
Smong - Thu Dec 02, 2004 10:04 am
Post subject:
If you want to add extra server dependant things to your client go ahead. The official distro will ignore messages it doesn't recognize. You can make a module to hook new message types. Simplified example:
Code: Show/Hide
chatnet->AddHandler("GETSQUAD", myhandler);
myhandler(p, line)
{
t = getplayerbyname(line)
sendmessage(p, t->squad)
}

If Grelminar adds python support to the chatnet module then this could be done in minutes.
NightHawk - Fri Dec 03, 2004 1:43 am
Post subject:
obviously you could do something like that, but this is a suggestion for the official version.
Mine GO BOOM - Fri Dec 03, 2004 9:17 am
Post subject:
NightHawk wrote:
obviously you could do something like that, but this is a suggestion for the official version.


In that case, I'd rather see squads listed in the ENTERING packet. Since you know your own name, you can figure out your own squad from them (how Subspace does it).
CypherJF - Fri Dec 03, 2004 1:23 pm
Post subject:
Back to Smong suggesting adding your own Chatnet commands; the last thing we need, is every zone making their own splinter of the protocol. Ya know what I mean?
Anonymous - Fri Dec 03, 2004 6:06 pm
Post subject:
Come on, 'simple chat'. Since when did IRC even have squads?

It doesn't matter if a zone does or does not support extra protocol, the client should handle this gracefully. A query (also handled by the custom module) can be sent by the client asking whether it implements a specific message type.

There's no reason why a client can't be closed to public. A zone could for example create a remote admin control panel using a custom chatnet client distributed to staff only or a website with scripted pages.
NightHawk - Fri Dec 03, 2004 8:14 pm
Post subject:
Mine GO BOOM wrote:
[..]

In that case, I'd rather see squads listed in the ENTERING packet. Since you know your own name, you can figure out your own squad from them (how Subspace does it).


this wont work with the current protocol because it doesn't send yourself. but i guess if that was changed, it would be a little more efficient. even if having the client know other peoples squads isn't really as important in my mind.
Mine GO BOOM - Fri Dec 03, 2004 9:12 pm
Post subject:
Ok then, a simple ?squad command would be fine. Hopefully Grelminar should see this thread, and maybe add it into playercmd.c. Until then, others should recommend a better outputting string that what I used.
Code: Show/Hide
local helptext_t squad_help =
"Targets: none or player\n"
"Args: none\n"
"Displays your or a target player's current squad.\n";

local void Csquad(const char *params, Player *p, const Target *target)
{
   Player *t = (target->type) == T_PLAYER ? target->u.p : p;

   chat->SendMessage(p,
      "Squad for %s: %s",
      t->name,
      t->squad[0] ? t->squad : ":none:");
}

NightHawk - Fri Dec 03, 2004 10:42 pm
Post subject:
?squad is already a billing command, i assume..
i guess you could use this, but it's kind of ugly design wise doing ?squad, hiding the result from the client's screen, etc.

resorting to parsing user commands, aghh, sounds like a bot on subgame2.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group