1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 18:43:13 +02:00

Fixed compile errors within src/modules/*.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2001 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2009-02-11 00:07:53 +00:00
parent 6f9f2617e7
commit 87c8744724
5 changed files with 31 additions and 22 deletions
+2 -2
View File
@@ -94,7 +94,7 @@ class CommandCSEnforce : public Command
ChannelInfo *ci;
int16 old_nojoin_level;
char mask[BUFSIZE];
char *reason;
const char *reason;
const char *av[3];
User *u;
@@ -136,7 +136,7 @@ class CommandCSEnforce : public Command
struct c_userlist *next;
ChannelInfo *ci;
char mask[BUFSIZE];
char *reason;
const char *reason;
const char *av[3];
User *u;
CBMode *cbm;
+5 -5
View File
@@ -22,7 +22,7 @@
#define VERSION "$Id$"
void myHelp(User *u);
void mySendResponse(User *u, char *channel, char *mask, char *time);
void mySendResponse(User *u, const char *channel, char *mask, const char *time);
void addBan(Channel *c, time_t timeout, char *banmask);
int delBan(int argc, char **argv);
@@ -51,9 +51,9 @@ class CommandCSTBan : public Command
Channel *c;
User *u2 = NULL;
char *chan = params[0].c_str();
char *nick = params[1].c_str();
char *time = params[2].c_str();
const char *chan = params[0].c_str();
const char *nick = params[1].c_str();
const char *time = params[2].c_str();
if (!(c = findchan(chan)))
notice_lang(s_ChanServ, u, CHAN_X_NOT_IN_USE, chan);
@@ -165,7 +165,7 @@ void myHelp(User *u)
me->NoticeLang(s_ChanServ, u, TBAN_HELP);
}
void mySendResponse(User *u, char *channel, char *mask, char *time)
void mySendResponse(User *u, const char *channel, char *mask, const char *time)
{
me->NoticeLang(s_ChanServ, u, TBAN_RESPONSE, mask, channel, time);
}
+18 -10
View File
@@ -326,9 +326,9 @@ class CommandHSReject : public Command
}
};
class CommandHSList : public Command
class HSListBase : public Command
{
private:
protected:
CommandReturn DoList(User *u, std::vector<std::string> &params)
{
struct tm *tm;
@@ -359,7 +359,20 @@ class CommandHSList : public Command
return MOD_CONT;
}
public:
CommandHSList() : Command("LIST", 1, 1)
HSListBase(const std::string &cmd, int min, int max) : Command("LIST", 1, 1)
{
}
void OnSyntaxError(User *u)
{
// no-op
}
};
class CommandHSList : public HSListBase
{
public:
CommandHSList() : HSListBase("LIST", 1, 1)
{
}
@@ -372,17 +385,12 @@ class CommandHSList : public Command
return this->DoList(u, params);
}
void OnSyntaxError(User *u)
{
// no-op
}
};
class CommandHSWaiting : public CommandHSList
class CommandHSWaiting : public HSListBase
{
public:
CommandHSWaiting() : Command("WAITING", 0, 0)
CommandHSWaiting() : HSListBase("WAITING", 0, 0)
{
}
+4 -3
View File
@@ -21,6 +21,7 @@
void my_load_config();
void my_add_languages();
int my_event_reload(int argc, char **argv);
CommandReturn check_email_limit_reached(const char *email, User * u);
int NSEmailMax = 0;
@@ -37,7 +38,7 @@ class CommandNSRegister : public Command
{
}
CommandReturn(User *u, std::vector<std::string> &params)
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
return check_email_limit_reached(params[1].c_str(), u);
}
@@ -147,7 +148,7 @@ class NSMaxEmail : public Module
};
int count_email_in_use(char *email, User * u)
int count_email_in_use(const char *email, User * u)
{
NickCore *nc;
int i;
@@ -168,7 +169,7 @@ int count_email_in_use(char *email, User * u)
return count;
}
int check_email_limit_reached(char *email, User * u)
CommandReturn check_email_limit_reached(const char *email, User * u)
{
if (NSEmailMax < 1 || !email || is_services_admin(u))
return MOD_CONT;
+2 -2
View File
@@ -220,7 +220,7 @@ class CommandCSOInfo : public Command
return MOD_CONT;
}
public:
CommandCSOInfo : Command("OINFO", 2, 3)
CommandCSOInfo() : Command("OINFO", 2, 3)
{
}
@@ -261,7 +261,7 @@ class CommandCSInfo : public Command
CommandReturn Execute(User *u, std::vector<std::string> &params)
{
char *chan = params[0].c_str();
const char *chan = params[0].c_str();
ChannelInfo *ci = NULL;
if (is_oper(u)) /* Only show our goodies to opers */