]> jfr.im git - solanum.git/commitdiff
parse: implement reconstruct_parv()
authorWilliam Pitcock <redacted>
Tue, 12 Jan 2016 04:28:55 +0000 (22:28 -0600)
committerWilliam Pitcock <redacted>
Tue, 12 Jan 2016 04:28:55 +0000 (22:28 -0600)
extensions/m_identify.c
include/parse.h
ircd/parse.c

index f2450a6a8c6a4a6b5ef3d4445b70e9f3ed00d065..b2385408eda3c22f0773777d06f28e8c9da10d32 100644 (file)
@@ -49,8 +49,6 @@
 #define SVS_chanserv_NICK "ChanServ"
 #define SVS_nickserv_NICK "NickServ"
 
-char *reconstruct_parv(int parc, const char *parv[]);
-
 static int m_identify(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]);
 
 struct Message identify_msgtab = {
@@ -65,19 +63,6 @@ mapi_clist_av1 identify_clist[] = {
 
 DECLARE_MODULE_AV1(identify, NULL, NULL, identify_clist, NULL, NULL, "$Revision: 2729 $");
 
-char *reconstruct_parv(int parc, const char *parv[])
-{
-       static char tmpbuf[BUFSIZE]; int i;
-
-       rb_strlcpy(tmpbuf, parv[0], BUFSIZE);
-       for (i = 1; i < parc; i++)
-       {
-               rb_strlcat(tmpbuf, " ", BUFSIZE);
-               rb_strlcat(tmpbuf, parv[i], BUFSIZE);
-       }
-       return tmpbuf;
-}
-
 static int m_identify(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        const char *nick;
index 921bfe6fac195c12918187f80d19a9b50e8fe0a8..420c05d1f09140ca315d40d6984bfa944c7a81f3 100644 (file)
@@ -39,6 +39,7 @@ extern void clear_hash_parse(void);
 extern void mod_add_cmd(struct Message *msg);
 extern void mod_del_cmd(struct Message *msg);
 extern void report_messages(struct Client *);
+extern char *reconstruct_parv(int parc, const char *parv[])
 
 extern struct Dictionary *alias_dict;
 
index 84132c82d44d6ed9e277c61710f6422e8ae91ea0..9ddd73b72c0b38671ceb11a167438573e0c8fdc8 100644 (file)
@@ -61,6 +61,18 @@ static char buffer[1024];
 
 /* turn a string into a parc/parv pair */
 
+char *reconstruct_parv(int parc, const char *parv[])
+{
+       static char tmpbuf[BUFSIZE]; int i;
+
+       rb_strlcpy(tmpbuf, parv[0], BUFSIZE);
+       for (i = 1; i < parc; i++)
+       {
+               rb_strlcat(tmpbuf, " ", BUFSIZE);
+               rb_strlcat(tmpbuf, parv[i], BUFSIZE);
+       }
+       return tmpbuf;
+}
 
 static inline int
 string_to_array(char *string, char **parv)