]> jfr.im git - irc/quakenet/newserv.git/commitdiff
add version command + #define for version number
authorPaul <redacted>
Sat, 2 Jun 2007 19:51:32 +0000 (19:51 +0000)
committerPaul <redacted>
Sat, 2 Jun 2007 19:51:32 +0000 (19:51 +0000)
chanserv/chanserv.c
chanserv/chanserv.h
chanserv/chanservstdcmds.c

index a36e5a4a63ff61f725452090f0f52586562f1965..af977f405fe6cbbb588f28ac26a8f69371f3b89a 100644 (file)
@@ -98,7 +98,8 @@ void _init() {
     chanservaddcommand("rename", QCMD_DEV, 1, cs_dorename, "Changes the bot's name.");
     chanservaddcommand("rehash", QCMD_DEV, 0, cs_dorehash, "Reloads all text from database.");
     chanservaddcommand("help", 0, 1, cs_dohelp, "Displays help on a specific command.");
-    
+    chanservaddcommand("version", 0, 1, cs_doversion, "Show Version.");
+
     chanservaddctcpcommand("ping",cs_doctcpping);
     chanservaddctcpcommand("version",cs_doctcpversion);
     chanservaddctcpcommand("gender",cs_doctcpgender);
@@ -198,6 +199,7 @@ void _fini() {
   chanservremovecommand("rename", cs_dorename);
   chanservremovecommand("rehash", cs_dorehash);
   chanservremovecommand("help", cs_dohelp);
+  chanservremovecommand("version", cs_doversion);
   chanservremovectcpcommand("ping",cs_doctcpping);
   chanservremovectcpcommand("version",cs_doctcpversion);
   chanservremovectcpcommand("gender",cs_doctcpgender);
index deaa77acd3e30f306e5663f999686dc4628ceaa5..515955fdb56f2a531973e371c913c837188019ac 100644 (file)
@@ -22,6 +22,9 @@
 #include <assert.h>
 #endif
 
+/* Q9 Version */
+#define QVERSION "0.80"
+
 /* Mini-hash of known users on channels to make lookups faster;
  * how big do we make it?  */
 #define   REGCHANUSERHASHSIZE 5
index 50daaa0b76fad23744e9df95a82e462c3c1dae18..65cac3d4cdf1d4277cc7252d42f819430414fe7f 100644 (file)
@@ -158,12 +158,19 @@ int cs_doctcpping(void *source, int cargc, char **cargv) {
 }
   
 int cs_doctcpversion(void *source, int cargc, char **cargv) {
-  sendnoticetouser(chanservnick, source, "\01VERSION Q9 version 0.75.  (C) 2002-3 David Mansell (splidge)\01");
+  sendnoticetouser(chanservnick, source, "\01VERSION Q9 version %s (Compiled on " __DATE__ ")  (C) 2002-3 David Mansell (splidge)\01", QVERSION);
   sendnoticetouser(chanservnick, source, "\01VERSION Built on newserv version 1.00.  (C) 2002-3 David Mansell (splidge)\01");
 
   return CMD_OK;
 }
 
+int cs_doversion(void *source, int cargc, char **cargv) {
+  chanservsendmessage((nick *)source, "Q9 version %s (Compiled on " __DATE__ ") (C) 2002-3 David Mansell (splidge)", QVERSION);
+  chanservsendmessage((nick *)source, "Built on newserv version 1.00.  (C) 2002-3 David Mansell (splidge)");
+  return CMD_OK;
+}
+
+
 int cs_doctcpgender(void *source, int cargc, char **cargv) {
   sendnoticetouser(chanservnick, source, "\1GENDER Anyone who has a bitch mode has to be female ;)\1");