diff options
| author | Adam <Adam@anope.org> | 2010-08-27 13:44:30 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-08-27 13:44:30 -0400 |
| commit | 73fb94c55344b6ad788c925bf13325236402891f (patch) | |
| tree | 48ac3308448b8494074d8e6c326adf75ddbacdc0 /modules/protocol/inspircd11.cpp | |
| parent | ea9b945830166ff237799460aba6236e4132a075 (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/inspircd11.cpp')
| -rw-r--r-- | modules/protocol/inspircd11.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/protocol/inspircd11.cpp b/modules/protocol/inspircd11.cpp index cc2c99fa6..453be6965 100644 --- a/modules/protocol/inspircd11.cpp +++ b/modules/protocol/inspircd11.cpp @@ -372,7 +372,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; @@ -403,7 +403,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) @@ -717,7 +717,7 @@ int anope_event_nick(const Anope::string &source, int ac, const char **av) { if (ac == 8) { - time_t ts = Anope::string(av[0]).is_number_only() ? convertTo<time_t>(av[0]) : 0; + time_t ts = Anope::string(av[0]).is_pos_number_only() ? convertTo<time_t>(av[0]) : 0; user = do_nick("", av[1], av[4], av[2], source, av[7], ts, 0, av[3], ""); if (user) @@ -766,7 +766,7 @@ int anope_event_chghost(const Anope::string &source, int ac, const char **av) /* EVENT: SERVER */ int anope_event_server(const Anope::string &source, int ac, const char **av) { - do_server(source, av[0], Anope::string(av[1]).is_number_only() ? convertTo<unsigned>(av[1]) : 0, av[2], ""); + do_server(source, av[0], Anope::string(av[1]).is_pos_number_only() ? convertTo<unsigned>(av[1]) : 0, av[2], ""); return MOD_CONT; } @@ -983,7 +983,7 @@ int anope_event_capab(const Anope::string &source, int ac, const char **av) else if (capab.find("MAXMODES=") != std::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; } } } |
