summaryrefslogtreecommitdiff
path: root/modules/protocol/inspircd12.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2010-08-27 13:44:30 -0400
committerAdam <Adam@anope.org>2010-08-27 13:44:30 -0400
commit73fb94c55344b6ad788c925bf13325236402891f (patch)
tree48ac3308448b8494074d8e6c326adf75ddbacdc0 /modules/protocol/inspircd12.cpp
parentea9b945830166ff237799460aba6236e4132a075 (diff)
Added an Anope::string::is_pos_number_only function to use everywhere we convertTo unsigned values, and
fixed the mail delay error message to give the correct time.
Diffstat (limited to 'modules/protocol/inspircd12.cpp')
-rw-r--r--modules/protocol/inspircd12.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/protocol/inspircd12.cpp b/modules/protocol/inspircd12.cpp
index 55a371700..987590034 100644
--- a/modules/protocol/inspircd12.cpp
+++ b/modules/protocol/inspircd12.cpp
@@ -397,7 +397,7 @@ int anope_event_fmode(const Anope::string &source, int ac, const char **av)
/* Checking the TS for validity to avoid desyncs */
if ((c = findchan(av[0])))
{
- time_t ts = Anope::string(av[1]).is_number_only() ? convertTo<time_t>(av[1]) : 0;
+ time_t ts = Anope::string(av[1]).is_pos_number_only() ? convertTo<time_t>(av[1]) : 0;
if (c->creation_time > ts)
/* Our TS is bigger, we should lower it */
c->creation_time = ts;
@@ -436,7 +436,7 @@ int anope_event_fmode(const Anope::string &source, int ac, const char **av)
int anope_event_fjoin(const Anope::string &source, int ac, const char **av)
{
Channel *c = findchan(av[0]);
- time_t ts = Anope::string(av[1]).is_number_only() ? convertTo<time_t>(av[1]) : 0;
+ time_t ts = Anope::string(av[1]).is_pos_number_only() ? convertTo<time_t>(av[1]) : 0;
bool keep_their_modes = true;
if (!c)
@@ -809,7 +809,7 @@ int anope_event_chghost(const Anope::string &source, int ac, const char **av)
*/
int anope_event_server(const Anope::string &source, int ac, const char **av)
{
- do_server(source, av[0], Anope::string(av[2]).is_number_only() ? convertTo<unsigned>(av[2]) : 0, av[4], av[3]);
+ do_server(source, av[0], Anope::string(av[2]).is_pos_number_only() ? convertTo<unsigned>(av[2]) : 0, av[4], av[3]);
return MOD_CONT;
}
@@ -1144,7 +1144,7 @@ int anope_event_capab(const Anope::string &source, int ac, const char **av)
else if (capab.find("MAXMODES=") != Anope::string::npos)
{
Anope::string maxmodes(capab.begin() + 9, capab.end());
- ircd->maxmodes = maxmodes.is_number_only() ? convertTo<unsigned>(maxmodes) : 3;
+ ircd->maxmodes = maxmodes.is_pos_number_only() ? convertTo<unsigned>(maxmodes) : 3;
}
}
}