X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmodules%2Ffuncmd.mod%2Fcmd_funcmds.c;h=67b4153b77358d5d1eb7c1ead9f06dbd0e2a8dff;hb=78e040af3fcc36ab684611c0f98b4381ff420878;hp=dc3cb8be189533f7493b4069ea4350605256cd52;hpb=706e48b1e666054030c491d864f740071e390038;p=NeonServV5.git diff --git a/src/modules/funcmd.mod/cmd_funcmds.c b/src/modules/funcmd.mod/cmd_funcmds.c index dc3cb8b..67b4153 100644 --- a/src/modules/funcmd.mod/cmd_funcmds.c +++ b/src/modules/funcmd.mod/cmd_funcmds.c @@ -1,4 +1,4 @@ -/* cmd_funcmds.c - NeonServ v5.3 +/* cmd_funcmds.c - NeonServ v5.5 * Copyright (C) 2011-2012 Philipp Kreil (pk910) * * This program is free software: you can redistribute it and/or modify @@ -16,15 +16,15 @@ */ #include "../module.h" #include "cmd_funcmds.h" -#include "modcmd.h" -#include "mysqlConn.h" -#include "IRCParser.h" -#include "ClientSocket.h" -#include "UserNode.h" -#include "ChanNode.h" -#include "lang.h" -#include "tools.h" -#include "DBHelper.h" +#include "../../modcmd.h" +#include "../../mysqlConn.h" +#include "../../IRCParser.h" +#include "../../ClientSocket.h" +#include "../../UserNode.h" +#include "../../ChanNode.h" +#include "../../lang.h" +#include "../../tools.h" +#include "../../DBHelper.h" static const struct default_language_entry msgtab[] = { {"FUN_DICE", "$b%s$b: A $b%d$b shows on the %d-sided die."}, /* {ARGS: "TestUser", 5, 6} */ @@ -43,9 +43,9 @@ void init_funcmds() { void register_commands() { //Fun Commands register_command_alias(3, "FunCMD"); - #define USER_COMMAND(NAME,FUNCTION,PARAMCOUNT,FLAGS) register_command(3, NAME, FUNCTION, PARAMCOUNT, NULL, 0, FLAGS) + #define USER_COMMAND(NAME,FUNCTION,PARAMCOUNT,FLAGS) register_command(3, NAME, module_id, FUNCTION, PARAMCOUNT, NULL, 0, FLAGS) // NAME FUNCTION PARAMS FLAGS - USER_COMMAND("extscript", neonserv_cmd_extscript, 0, CMDFLAG_REQUIRE_CHAN | CMDFLAG_REGISTERED_CHAN | CMDFLAG_EMPTY_ARGS | CMDFLAG_CHAN_PARAM | CMDFLAG_FUNCMD); + //USER_COMMAND("extscript", neonserv_cmd_extscript, 0, CMDFLAG_REQUIRE_CHAN | CMDFLAG_REGISTERED_CHAN | CMDFLAG_EMPTY_ARGS | CMDFLAG_CHAN_PARAM | CMDFLAG_FUNCMD); USER_COMMAND("ping", funcmd_ping, 0, CMDFLAG_REQUIRE_CHAN | CMDFLAG_REGISTERED_CHAN | CMDFLAG_FUNCMD); USER_COMMAND("pong", funcmd_pong, 0, CMDFLAG_REQUIRE_CHAN | CMDFLAG_REGISTERED_CHAN | CMDFLAG_FUNCMD); USER_COMMAND("dice", funcmd_dice, 1, CMDFLAG_REQUIRE_CHAN | CMDFLAG_REGISTERED_CHAN | CMDFLAG_FUNCMD); @@ -64,7 +64,7 @@ struct current_funcmd_header { static struct current_funcmd_header current_funcmd; #define FUNCMD_HEADER \ -current_funcmd.client = getTextBot(); \ +current_funcmd.client = textclient; \ current_funcmd.user = user; \ current_funcmd.chan = chan; \ {\ @@ -74,7 +74,7 @@ current_funcmd.chan = chan; \ res = mysql_use(); \ row = mysql_fetch_row(res); \ if(!row || !strcmp(row[0], "0")) { \ - reply(getTextBot(), user, "NS_FUN_DISABLED", chan->name); \ + reply(textclient, user, "NS_FUN_DISABLED", chan->name); \ return; \ } else if(!strcmp(row[0], "1")) \ current_funcmd.send_notice = 1; \