#include "numeric.h"
#include "send.h"
#include "packet.h"
+#include "s_assert.h"
static const char alias_desc[] = "Provides the system for services aliases";
RB_DICTIONARY_FOREACH(alias, &iter, alias_dict)
{
struct Message *message = rb_malloc(sizeof(*message) + strlen(alias->name) + 1);
- char *cmd = (void*)message + sizeof(*message);
+ char *cmd = (char*)message + sizeof(*message);
/* copy the alias name as it will be freed early on a rehash */
strcpy(cmd, alias->name);
{
struct Client *target_p;
struct alias_entry *aptr = rb_dictionary_retrieve(alias_dict, msgbuf->cmd);
- char *p;
+ char *p, *str;
if(aptr == NULL)
{
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);
return;
}
- if(EmptyString(parv[1]))
+ str = reconstruct_parv(parc - 1, &parv[1]);
+ if(EmptyString(str))
{
sendto_one(client_p, form_str(ERR_NOTEXTTOSEND), me.name, target_p->name);
return;
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);
}