From f4d828ef96f60d51c29c9d15387d3fea6254d411 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Sun, 1 May 2016 03:43:55 -0500 Subject: [PATCH] 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. --- modules/m_alias.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/modules/m_alias.c b/modules/m_alias.c index 307caf4a..7b47e134 100644 --- a/modules/m_alias.c +++ b/modules/m_alias.c @@ -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); }