m_alias: restore old behaviour of joining all parameters.

There are two important caveats here, however:

1) Aliased commands have more than 8 parameters will be truncated;
there's nothing I can do about this.
2) Parameters with colons will not be handled as you expect. Again,
nothing I can do about this.
This commit is contained in:
Elizabeth Myers 2016-05-01 03:43:55 -05:00
parent 998b6ec513
commit f4d828ef96

View file

@ -113,7 +113,7 @@ m_alias(struct MsgBuf *msgbuf, struct Client *client_p, struct Client *source_p,
{
struct Client *target_p;
struct alias_entry *aptr = rb_dictionary_retrieve(alias_dict, msgbuf->cmd);
char *p;
char *p, *str;
if(aptr == NULL)
{
@ -124,14 +124,6 @@ m_alias(struct MsgBuf *msgbuf, struct Client *client_p, struct Client *source_p,
return;
}
else if(parc < 2)
{
sendto_one(client_p, form_str(ERR_NEEDMOREPARAMS),
me.name,
EmptyString(client_p->name) ? "*" : client_p->name,
msgbuf->cmd);
return;
}
if(!IsFloodDone(client_p) && client_p->localClient->receiveM > 20)
flood_endgrace(client_p);
@ -158,7 +150,8 @@ m_alias(struct MsgBuf *msgbuf, struct Client *client_p, struct Client *source_p,
return;
}
if(EmptyString(parv[1]))
str = reconstruct_parv(parc, parv);
if(EmptyString(str))
{
sendto_one(client_p, form_str(ERR_NOTEXTTOSEND), me.name, target_p->name);
return;
@ -167,5 +160,5 @@ m_alias(struct MsgBuf *msgbuf, struct Client *client_p, struct Client *source_p,
sendto_one(target_p, ":%s PRIVMSG %s :%s",
get_id(client_p, target_p),
p != NULL ? aptr->target : get_id(target_p, target_p),
parv[1]);
str);
}