* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#include "../ChangeLog"
#include "chanserv.h"
#include "conf.h"
#include "compat.h"
#include "opserv.h"
#include "saxdb.h"
#include "timeq.h"
+#include "version.h"
struct pending_template {
if (arg[1] == '$') {
new_argv[new_argc++] = arg + 1;
} else if (isdigit(arg[1])) {
- unsigned int lbound, ubound, jj;
+ unsigned int lbound = 0;
+ unsigned int ubound = 0;
+ unsigned int jj = 0;
char *end_num;
lbound = strtoul(arg+1, &end_num, 10);
struct svccmd *cmd;
unsigned int cmd_arg, perms, flags, options, result;
char channel_name[CHANNELLEN+1];
+ char *new_argv[MAXNUMPARAMS]; /* for aliases */
options = (server_qualified ? SVCCMD_QUALIFIED : 0) | SVCCMD_DEBIT | SVCCMD_NOISY;
/* Find the command argument. */
/* Expand the alias arguments, if there are any. */
if (cmd->alias.used) {
- char *new_argv[MAXNUMPARAMS];
int res;
res = svccmd_expand_alias(cmd, user, argc, argv, new_argv);
safestrncpy(channel_name, channel->name, sizeof(channel_name));
else
channel_name[0] = 0;
- if (!(result = cmd->command->func(user, channel, argc, argv, cmd)))
+
+ /* Call the function here */
+ if (!(result = cmd->command->func(user, channel, argc, argv, cmd)))
return 0;
+
if (!(flags & MODCMD_NO_LOG)) {
enum log_severity slvl;
if (result & CMD_LOG_OVERRIDE)
return argc ? svccmd_invoke_argv(user, service, channel, argc, argv, server_qualified) : 0;
}
-char *cvs_verstring() {
- static char verstring[MAXLEN] = { 0 };
-
- if(!*verstring) {
- char *svn = NULL, *svnver = NULL, *svndate = NULL, *v = 0, ver[MAXLEN];
- int vc = 0;
-
- strcpy(ver, CVS_VERSION);
- for (svn = x3_strtok(&v, ver, " "); svn;
- svn = x3_strtok(&v, 0, " ")) {
- if (vc == 2)
- svnver = svn;
- else if (vc == 3)
- svndate = svn;
- vc++;
- }
- sprintf(verstring, "%s %s", svnver, svndate);
- }
- return verstring;
-}
-
-
void
modcmd_privmsg(struct userNode *user, struct userNode *bot, const char *text, int server_qualified) {
struct service *service;
snprintf(response, sizeof(response), "\x01USERINFO %s\x01", bot->info);
irc_notice_user(bot, user, response);
} else if (!irccasecmp(text, "VERSION")) {
- snprintf(response, sizeof(response), "\x01VERSION %s+[%s]\x01", PACKAGE_STRING, cvs_verstring());
+ snprintf(response, sizeof(response), "\x01VERSION %s+[%s]\x01", PACKAGE_STRING, cvs_version);
irc_notice_user(bot, user, response);
} else if (!irccasecmp(text, "GENDER")) {
snprintf(response, sizeof(response), "\x01GENDER ummm im still deciding\x01");
}
static MODCMD_FUNC(cmd_version) {
- send_message_type(4, user, cmd->parent->bot, "$b"PACKAGE_STRING"+[%s]$b (Based on srvx 1.3.x), Built: "__DATE__", "__TIME__".", cvs_verstring());
+ send_message_type(4, user, cmd->parent->bot, "$b"PACKAGE_STRING"+[%s]$b (Based on srvx 1.3.x), Built: "__DATE__", "__TIME__".", cvs_version);
send_message_type(4, user, cmd->parent->bot, "See $bCREDITS$b for more information.");
return 1;
}
send_message_type(4, user, cmd->parent->bot, "OSI Certified is a certification mark of the Open Source Initiative.");
send_message_type(4, user, cmd->parent->bot, "$b$b");
send_message_type(4, user, cmd->parent->bot, "The srvx 1.3.x Development Team includes Paul Chang, Adrian Dewhurst, Miles Peterson, Michael Poole and others.");
- send_message_type(4, user, cmd->parent->bot, "The X3 Development Team includes Alex Schumann, Reed Loden, Neil Spierling.");
+ send_message_type(4, user, cmd->parent->bot, "The X3 Development Team includes Alex Schumann, Reed Loden, Neil Spierling, Matthew Beeching.");
send_message_type(4, user, cmd->parent->bot, "The X3 Development Team can be reached at http://evilnet.sourceforge.net or in #evilnet on irc.afternet.org.");
send_message_type(4, user, cmd->parent->bot, "$b$b");
send_message_type(4, user, cmd->parent->bot, "Thanks goes to ThiefMaster, Joe Hansche (joeatrr), Martijn Smit (wasted), and to any other people who have contributed to X3.");