]> jfr.im git - solanum.git/blobdiff - modules/m_version.c
modules: chase MsgBuf API change
[solanum.git] / modules / m_version.c
index 05d8bdf09364a91a63e185180f46f5e65b209802..2a12ffb9c674b81e19aaee2fca56a01a63ac9abe 100644 (file)
 #include "parse.h"
 #include "modules.h"
 
-static char *confopts(struct Client *source_p);
+static char *confopts(void);
 
-static int m_version(struct Client *, struct Client *, int, const char **);
-static int mo_version(struct Client *, struct Client *, int, const char **);
+static int m_version(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
+static int mo_version(struct MsgBuf *, struct Client *, struct Client *, int, const char **);
 
 struct Message version_msgtab = {
        "VERSION", 0, 0, 0, MFLG_SLOW,
@@ -51,11 +51,10 @@ DECLARE_MODULE_AV1(version, NULL, NULL, version_clist, NULL, NULL, "$Revision: 1
 
 /*
  * m_version - VERSION command handler
- *      parv[0] = sender prefix
  *      parv[1] = remote server
  */
 static int
-m_version(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+m_version(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        static time_t last_used = 0L;
 
@@ -77,7 +76,10 @@ m_version(struct Client *client_p, struct Client *source_p, int parc, const char
 
        sendto_one_numeric(source_p, RPL_VERSION, form_str(RPL_VERSION),
                           ircd_version, serno,
-                          me.name, confopts(source_p), TS_CURRENT,
+#ifdef CUSTOM_BRANDING
+                          PACKAGE_NAME "-" PACKAGE_VERSION,
+#endif
+                          me.name, confopts(), TS_CURRENT,
                           ServerInfo.sid);
 
        show_isupport(source_p);
@@ -87,17 +89,19 @@ m_version(struct Client *client_p, struct Client *source_p, int parc, const char
 
 /*
  * mo_version - VERSION command handler
- *      parv[0] = sender prefix
  *      parv[1] = remote server
  */
 static int
-mo_version(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+mo_version(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
 {
        if(hunt_server(client_p, source_p, ":%s VERSION :%s", 1, parc, parv) == HUNTED_ISME)
        {
                sendto_one_numeric(source_p, RPL_VERSION, form_str(RPL_VERSION),
-                                  ircd_version, serno, 
-                                  me.name, confopts(source_p), TS_CURRENT,
+                                  ircd_version, serno,
+#ifdef CUSTOM_BRANDING
+                                  PACKAGE_NAME "-" PACKAGE_VERSION,
+#endif
+                                  me.name, confopts(), TS_CURRENT,
                                   ServerInfo.sid);
                show_isupport(source_p);
        }
@@ -106,12 +110,12 @@ mo_version(struct Client *client_p, struct Client *source_p, int parc, const cha
 }
 
 /* confopts()
- * input  - client pointer
+ * input  - none
  * output - ircd.conf option string
  * side effects - none
  */
 static char *
-confopts(struct Client *source_p)
+confopts(void)
 {
        static char result[15];
        char *p;