]> jfr.im git - solanum.git/blobdiff - modules/m_alias.c
chmode: Get elevated access for op-only queries
[solanum.git] / modules / m_alias.c
index f59ca2a6229e439ba39b9e9d07615226fceb4e53..b8f1b03551149b8f599abd48f104467763ef57d2 100644 (file)
@@ -31,6 +31,7 @@
 #include "numeric.h"
 #include "send.h"
 #include "packet.h"
+#include "s_assert.h"
 
 static const char alias_desc[] = "Provides the system for services aliases";
 
@@ -113,7 +114,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, *str;
+       char *p;
 
        if(aptr == NULL)
        {
@@ -150,8 +151,8 @@ m_alias(struct MsgBuf *msgbuf, struct Client *client_p, struct Client *source_p,
                return;
        }
 
-       str = reconstruct_parv(parc - 1, &parv[1]);
-       if(EmptyString(str))
+       msgbuf_reconstruct_tail(msgbuf, 1);
+       if(EmptyString(parv[1]))
        {
                sendto_one(client_p, form_str(ERR_NOTEXTTOSEND), me.name, target_p->name);
                return;
@@ -160,5 +161,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),
-                       str);
+                       parv[1]);
 }