diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/botserv.c | 39 | ||||
-rw-r--r-- | src/chanserv.c | 6 | ||||
-rw-r--r-- | src/memoserv.c | 5 | ||||
-rw-r--r-- | src/misc.c | 3 | ||||
-rw-r--r-- | src/modules.c | 14 | ||||
-rw-r--r-- | src/mysql.c | 4 | ||||
-rw-r--r-- | src/nickserv.c | 5 | ||||
-rw-r--r-- | src/unreal32.c | 2 |
8 files changed, 39 insertions, 39 deletions
diff --git a/src/botserv.c b/src/botserv.c index bc35c5101..28245c7c8 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -608,8 +608,8 @@ void load_bs_dbase(void) { dbFILE *f; int c, ver; - int16 tmp16; - int32 tmp32; + uint16 tmp16; + uint32 tmp32; BotInfo *bi; int failed = 0; @@ -1891,8 +1891,9 @@ static int do_kickcmd(User * u) if (!stricmp(option, "BADWORDS")) { if (!stricmp(value, "ON")) { if (ttb) { - ci->ttb[TTB_BADWORDS] = atol(ttb); - if (ci->ttb[TTB_BADWORDS] < 0) { + ci->ttb[TTB_BADWORDS] = + strtol(ttb, (char **) NULL, 10); + if (errno) { notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb); return MOD_CONT; } @@ -1911,8 +1912,8 @@ static int do_kickcmd(User * u) } else if (!stricmp(option, "BOLDS")) { if (!stricmp(value, "ON")) { if (ttb) { - ci->ttb[TTB_BOLDS] = atol(ttb); - if (ci->ttb[TTB_BOLDS] < 0) { + ci->ttb[TTB_BOLDS] = strtol(ttb, (char **) NULL, 10); + if (errno) { notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb); return MOD_CONT; } @@ -1934,8 +1935,8 @@ static int do_kickcmd(User * u) char *percent = strtok(NULL, " "); if (ttb) { - ci->ttb[TTB_CAPS] = atol(ttb); - if (ci->ttb[TTB_CAPS] < 0) { + ci->ttb[TTB_CAPS] = strtol(ttb, (char **) NULL, 10); + if (errno) { notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb); return MOD_CONT; } @@ -1971,8 +1972,8 @@ static int do_kickcmd(User * u) } else if (!stricmp(option, "COLORS")) { if (!stricmp(value, "ON")) { if (ttb) { - ci->ttb[TTB_COLORS] = atol(ttb); - if (ci->ttb[TTB_COLORS] < 0) { + ci->ttb[TTB_COLORS] = strtol(ttb, (char **) NULL, 10); + if (errno) { notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb); return MOD_CONT; } @@ -1994,8 +1995,8 @@ static int do_kickcmd(User * u) char *secs = strtok(NULL, " "); if (ttb) { - ci->ttb[TTB_FLOOD] = atol(ttb); - if (ci->ttb[TTB_FLOOD] < 0) { + ci->ttb[TTB_FLOOD] = strtol(ttb, (char **) NULL, 10); + if (errno) { notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb); return MOD_CONT; } @@ -2033,8 +2034,8 @@ static int do_kickcmd(User * u) char *times = strtok(NULL, " "); if (ttb) { - ci->ttb[TTB_REPEAT] = atol(ttb); - if (ci->ttb[TTB_REPEAT] < 0) { + ci->ttb[TTB_REPEAT] = strtol(ttb, (char **) NULL, 10); + if (errno) { notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb); return MOD_CONT; } @@ -2062,8 +2063,9 @@ static int do_kickcmd(User * u) } else if (!stricmp(option, "REVERSES")) { if (!stricmp(value, "ON")) { if (ttb) { - ci->ttb[TTB_REVERSES] = atol(ttb); - if (ci->ttb[TTB_REVERSES] < 0) { + ci->ttb[TTB_REVERSES] = + strtol(ttb, (char **) NULL, 10); + if (errno) { notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb); return MOD_CONT; } @@ -2082,8 +2084,9 @@ static int do_kickcmd(User * u) } else if (!stricmp(option, "UNDERLINES")) { if (!stricmp(value, "ON")) { if (ttb) { - ci->ttb[TTB_UNDERLINES] = atol(ttb); - if (ci->ttb[TTB_UNDERLINES] < 0) { + ci->ttb[TTB_UNDERLINES] = + strtol(ttb, (char **) NULL, 10); + if (errno) { notice_lang(s_BotServ, u, BOT_KICK_BAD_TTB, ttb); return MOD_CONT; } diff --git a/src/chanserv.c b/src/chanserv.c index 64c092c1f..3a5a7e166 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -624,7 +624,7 @@ void chanserv(User * u, char *buf) void load_cs_dbase(void) { dbFILE *f; - int ver, i, j, c, m; + int ver, i, j, c; ChannelInfo *ci, **last, *prev; int failed = 0; @@ -634,8 +634,8 @@ void load_cs_dbase(void) ver = get_file_version(f); for (i = 0; i < 256 && !failed; i++) { - int16 tmp16; - int32 tmp32; + uint16 tmp16; + uint32 tmp32; int n_levels; char *s; NickAlias *na; diff --git a/src/memoserv.c b/src/memoserv.c index c4e0aacbf..e54f554bc 100644 --- a/src/memoserv.c +++ b/src/memoserv.c @@ -291,7 +291,6 @@ void memo_send(User * u, char *name, char *text, int z) time_t now = time(NULL); char *source = u->na->nc->display; int is_servoper = is_services_oper(u); - int j; if (readonly) { notice_lang(s_MemoServ, u, MEMO_SEND_DISABLED); @@ -310,7 +309,7 @@ void memo_send(User * u, char *name, char *text, int z) notice_lang(s_MemoServ, u, NICK_IDENTIFY_REQUIRED, s_NickServ); } else if (!(mi = getmemoinfo(name, &ischan, &isforbid))) { - if (z == 0 || z == 3) + if (z == 0 || z == 3) { if (isforbid) { notice_lang(s_MemoServ, u, ischan ? CHAN_X_FORBIDDEN : @@ -320,7 +319,7 @@ void memo_send(User * u, char *name, char *text, int z) ischan ? CHAN_X_NOT_REGISTERED : NICK_X_NOT_REGISTERED, name); } - + } } else if (z != 2 && MSSendDelay > 0 && u && u->lastmemosend + MSSendDelay > now && !is_servoper) { u->lastmemosend = now; diff --git a/src/misc.c b/src/misc.c index d1db39f18..4820a9fae 100644 --- a/src/misc.c +++ b/src/misc.c @@ -751,7 +751,7 @@ static void arc4_init(void) rs.j = 0; } -static inline void arc4_addrandom(void *dat, int datlen) +static void arc4_addrandom(void *dat, int datlen) { int n; u_int8_t si; @@ -907,4 +907,3 @@ char *host_resolve(char *host) } } - diff --git a/src/modules.c b/src/modules.c index ad5da8034..f764fab1d 100644 --- a/src/modules.c +++ b/src/modules.c @@ -2003,18 +2003,18 @@ void moduleCleanStruct(ModuleData **moduleData) { **/ boolean moduleMinVersion(int major,int minor,int patch,int build) { boolean ret=false; - if(VERSION_MAJOR>major) { // Def. new + if(VERSION_MAJOR>major) { /* Def. new */ ret = true; - } else if(VERSION_MAJOR == major) { // Might be newer - if(minor == -1) { return true; } // They dont care about minor - if(VERSION_MINOR > minor) { // Def. newer + } else if(VERSION_MAJOR == major) { /* Might be newer */ + if(minor == -1) { return true; } /* They dont care about minor */ + if(VERSION_MINOR > minor) { /* Def. newer*/ ret = true; - } else if(VERSION_MINOR == minor) { // Might be newer - if(patch == -1) { return true; } // They dont care about patch + } else if(VERSION_MINOR == minor) { /* Might be newer */ + if(patch == -1) { return true; } /* They dont care about patch */ if(VERSION_PATCH > patch) { ret = true; } else if(VERSION_PATCH == patch) { - if(build == -1) { return true; } // They dont care about build + if(build == -1) { return true; } /* They dont care about build */ if(VERSION_BUILD >= build) { ret = true; } diff --git a/src/mysql.c b/src/mysql.c index 0153493ea..aeab71668 100644 --- a/src/mysql.c +++ b/src/mysql.c @@ -1167,7 +1167,7 @@ void db_mysql_load_cs_dbase(void) { char sqlcmd[MAX_SQL_BUF], *tempstr; ChannelInfo *ci; - int n_levels, j, m; + int n_levels, j; MYSQL_RES *res; MYSQL_ROW row; @@ -1436,7 +1436,7 @@ void db_mysql_load_ns_dbase(void) NickAlias *na; MYSQL_RES *res; MYSQL_ROW row; - int i, j, m; + int i, j; if (!do_mysql) return; diff --git a/src/nickserv.c b/src/nickserv.c index 44a4e1bb6..d14472099 100644 --- a/src/nickserv.c +++ b/src/nickserv.c @@ -367,7 +367,7 @@ void nickserv(User * u, char *buf) void load_old_ns_dbase(void) { dbFILE *f; - int ver, i, j, c, m; + int ver, i, j, c; NickAlias *na, *na2, *next; NickCore *nc; int failed = 0; @@ -657,7 +657,7 @@ void load_ns_req_db(void) void load_ns_dbase(void) { dbFILE *f; - int ver, i, j, c, m; + int ver, i, j, c; NickAlias *na, **nalast, *naprev; NickCore *nc, **nclast, *ncprev; int failed = 0; @@ -3328,7 +3328,6 @@ static int do_info(User * u) NickAlias *na; NickRequest *nr = NULL; int is_servadmin = is_services_admin(u); - char *vHost; if (!nick) { syntax_error(s_NickServ, u, "INFO", NICK_INFO_SYNTAX); diff --git a/src/unreal32.c b/src/unreal32.c index b5dfd87d6..406629570 100644 --- a/src/unreal32.c +++ b/src/unreal32.c @@ -1935,7 +1935,7 @@ void anope_cmd_svid_umode2(User * u, char *ts) void anope_cmd_svid_umode3(User * u, char *ts) { - // not used + /* not used */ } int anope_event_error(char *source, int ac, char **av) |