diff options
Diffstat (limited to 'modules/commands')
-rw-r--r-- | modules/commands/bs_kick.cpp | 44 | ||||
-rw-r--r-- | modules/commands/cs_access.cpp | 10 | ||||
-rw-r--r-- | modules/commands/cs_set_bantype.cpp | 2 | ||||
-rw-r--r-- | modules/commands/ms_set.cpp | 6 |
4 files changed, 31 insertions, 31 deletions
diff --git a/modules/commands/bs_kick.cpp b/modules/commands/bs_kick.cpp index 2c41b4b90..b53510c10 100644 --- a/modules/commands/bs_kick.cpp +++ b/modules/commands/bs_kick.cpp @@ -58,7 +58,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_BADWORDS] = convertTo<int16>(ttb); + ci->ttb[TTB_BADWORDS] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_BADWORDS] < 0) throw ConvertException(); } @@ -96,7 +96,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_BOLDS] = convertTo<int16>(ttb); + ci->ttb[TTB_BOLDS] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_BOLDS] < 0) throw ConvertException(); } @@ -132,7 +132,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_CAPS] = convertTo<int16>(ttb); + ci->ttb[TTB_CAPS] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_CAPS] < 0) throw ConvertException(); } @@ -149,7 +149,7 @@ class CommandBSKick : public Command ci->capsmin = 10; try { - ci->capsmin = convertTo<int16>(min); + ci->capsmin = convertTo<int16_t>(min); } catch (const ConvertException &) { } if (ci->capsmin < 1) @@ -158,7 +158,7 @@ class CommandBSKick : public Command ci->capspercent = 25; try { - ci->capspercent = convertTo<int16>(percent); + ci->capspercent = convertTo<int16_t>(percent); } catch (const ConvertException &) { } if (ci->capspercent < 1 || ci->capspercent > 100) @@ -187,7 +187,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_COLORS] = convertTo<int16>(ttb); + ci->ttb[TTB_COLORS] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_COLORS] < 1) throw ConvertException(); } @@ -224,7 +224,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_FLOOD] = convertTo<int16>(ttb); + ci->ttb[TTB_FLOOD] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_FLOOD] < 1) throw ConvertException(); } @@ -241,7 +241,7 @@ class CommandBSKick : public Command ci->floodlines = 6; try { - ci->floodlines = convertTo<int16>(lines); + ci->floodlines = convertTo<int16_t>(lines); } catch (const ConvertException &) { } if (ci->floodlines < 2) @@ -250,7 +250,7 @@ class CommandBSKick : public Command ci->floodsecs = 10; try { - ci->floodsecs = convertTo<int16>(secs); + ci->floodsecs = convertTo<int16_t>(secs); } catch (const ConvertException &) { } if (ci->floodsecs < 1) @@ -280,7 +280,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_REPEAT] = convertTo<int16>(ttb); + ci->ttb[TTB_REPEAT] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_REPEAT] < 0) throw ConvertException(); } @@ -297,7 +297,7 @@ class CommandBSKick : public Command ci->repeattimes = 3; try { - ci->repeattimes = convertTo<int16>(times); + ci->repeattimes = convertTo<int16_t>(times); } catch (const ConvertException &) { } if (ci->repeattimes < 2) @@ -326,7 +326,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_REVERSES] = convertTo<int16>(ttb); + ci->ttb[TTB_REVERSES] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_REVERSES] < 0) throw ConvertException(); } @@ -359,7 +359,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_UNDERLINES] = convertTo<int16>(ttb); + ci->ttb[TTB_UNDERLINES] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_REVERSES] < 0) throw ConvertException(); } @@ -393,7 +393,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_ITALICS] = convertTo<int16>(ttb); + ci->ttb[TTB_ITALICS] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_ITALICS] < 0) throw ConvertException(); } @@ -427,7 +427,7 @@ class CommandBSKick : public Command { try { - ci->ttb[TTB_AMSGS] = convertTo<int16>(ttb); + ci->ttb[TTB_AMSGS] = convertTo<int16_t>(ttb); if (ci->ttb[TTB_AMSGS] < 0) throw ConvertException(); } @@ -583,7 +583,7 @@ struct BanData : public ExtensibleItem { Anope::string mask; time_t last_use; - int16 ttb[TTB_SIZE]; + int16_t ttb[TTB_SIZE]; Data() { @@ -648,13 +648,13 @@ struct UserData : public ExtensibleItem time_t last_use; /* for flood kicker */ - int16 lines; + int16_t lines; time_t last_start; /* for repeat kicker */ Anope::string lastline; Anope::string lasttarget; - int16 times; + int16_t times; void OnDelete() { @@ -675,7 +675,7 @@ class BanDataPurger : public CallBack for (channel_map::iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it) { Channel *c = it->second; - + BanData *bd = c->GetExt<BanData *>("bs_main_bandata"); if (bd != NULL) { @@ -863,7 +863,7 @@ class BSKick : public Module if (ci->botflags.HasFlag(BS_KICK_CAPS) && realbuf.length() >= ci->capsmin) { int i = 0, l = 0; - + for (unsigned j = 0, end = realbuf.length(); j < end; ++j) { if (isupper(realbuf[j])) @@ -884,7 +884,7 @@ class BSKick : public Module return; } } - + /* Bad words kicker */ if (ci->botflags.HasFlag(BS_KICK_BADWORDS)) { @@ -962,7 +962,7 @@ class BSKick : public Module } UserData *ud = NULL; - + /* Flood kicker */ if (ci->botflags.HasFlag(BS_KICK_FLOOD)) { diff --git a/modules/commands/cs_access.cpp b/modules/commands/cs_access.cpp index 3e737b709..7cfbb303d 100644 --- a/modules/commands/cs_access.cpp +++ b/modules/commands/cs_access.cpp @@ -19,12 +19,12 @@ enum ACCESS_FOUNDER = 10001 }; -static std::map<Anope::string, int16, std::less<ci::string> > defaultLevels; +static std::map<Anope::string, int16_t, std::less<ci::string> > defaultLevels; static void reset_levels(ChannelInfo *ci) { ci->ClearLevels(); - for (std::map<Anope::string, int16, std::less<ci::string> >::iterator it = defaultLevels.begin(), it_end = defaultLevels.end(); it != it_end; ++it) + for (std::map<Anope::string, int16_t, std::less<ci::string> >::iterator it = defaultLevels.begin(), it_end = defaultLevels.end(); it != it_end; ++it) ci->SetLevel(it->first, it->second); } @@ -286,7 +286,7 @@ class CommandCSAccess : public Command Anope::string mask = params[2]; int level = ACCESS_INVALID; - + try { level = convertTo<int>(params[3]); @@ -736,7 +736,7 @@ class CommandCSLevels : public Command for (unsigned i = 0; i < privs.size(); ++i) { const Privilege &p = privs[i]; - int16 j = ci->GetLevel(p.name); + int16_t j = ci->GetLevel(p.name); if (j == ACCESS_INVALID) source.Reply(_(" %-*s (disabled)"), levelinfo_maxwidth, p.name.c_str()); @@ -918,7 +918,7 @@ class CSAccess : public Module if (group->ci == NULL) return EVENT_CONTINUE; /* Special case. Allows a level of < 0 to match anyone, and a level of 0 to match anyone identified. */ - int16 level = group->ci->GetLevel(priv); + int16_t level = group->ci->GetLevel(priv); if (level < 0) return EVENT_ALLOW; else if (level == 0 && group->nc) diff --git a/modules/commands/cs_set_bantype.cpp b/modules/commands/cs_set_bantype.cpp index afc15963b..90c94b5a4 100644 --- a/modules/commands/cs_set_bantype.cpp +++ b/modules/commands/cs_set_bantype.cpp @@ -40,7 +40,7 @@ class CommandCSSetBanType : public Command try { - int16 new_type = convertTo<int16>(params[1]); + int16_t new_type = convertTo<int16_t>(params[1]); if (new_type < 0 || new_type > 3) throw ConvertException("Invalid range"); ci->bantype = new_type; diff --git a/modules/commands/ms_set.cpp b/modules/commands/ms_set.cpp index ef3480fd5..7ce1960ed 100644 --- a/modules/commands/ms_set.cpp +++ b/modules/commands/ms_set.cpp @@ -75,7 +75,7 @@ class CommandMSSet : public Command Anope::string p2 = params.size() > 2 ? params[2] : ""; Anope::string p3 = params.size() > 3 ? params[3] : ""; Anope::string user, chan; - int16 limit; + int16_t limit; NickCore *nc = u->Account(); ChannelInfo *ci = NULL; bool is_servadmin = u->HasPriv("memoserv/set-limit"); @@ -136,7 +136,7 @@ class CommandMSSet : public Command limit = -1; try { - limit = convertTo<int16>(p1); + limit = convertTo<int16_t>(p1); } catch (const ConvertException &) { } } @@ -160,7 +160,7 @@ class CommandMSSet : public Command limit = -1; try { - limit = convertTo<int16>(p1); + limit = convertTo<int16_t>(p1); } catch (const ConvertException &) { } /* The first character is a digit, but we could still go negative |