summaryrefslogtreecommitdiff
path: root/modules/protocol/ratbox.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/ratbox.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/ratbox.cpp')
-rw-r--r--modules/protocol/ratbox.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/protocol/ratbox.cpp b/modules/protocol/ratbox.cpp
index a26ee9598..dc039682e 100644
--- a/modules/protocol/ratbox.cpp
+++ b/modules/protocol/ratbox.cpp
@@ -285,7 +285,7 @@ class RatboxProto : public IRCDTS6Proto
int anope_event_sjoin(const Anope::string &source, int ac, const char **av)
{
Channel *c = findchan(av[1]);
- 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;
bool keep_their_modes = true;
if (!c)
@@ -410,7 +410,7 @@ int anope_event_nick(const Anope::string &source, int ac, const char **av)
{
Server *s = Server::Find(source);
/* Source is always the server */
- user = do_nick("", av[0], av[4], av[5], s->GetName(), av[8], Anope::string(av[2]).is_number_only() ? convertTo<time_t>(av[2]) : 0, 0, "*", av[7]);
+ user = do_nick("", av[0], av[4], av[5], s->GetName(), av[8], Anope::string(av[2]).is_pos_number_only() ? convertTo<time_t>(av[2]) : 0, 0, "*", av[7]);
if (user)
{
UserSetInternalModes(user, 1, &av[3]);
@@ -426,7 +426,7 @@ int anope_event_nick(const Anope::string &source, int ac, const char **av)
}
}
else if (ac == 2)
- do_nick(source, av[0], "", "", "", "", Anope::string(av[1]).is_number_only() ? convertTo<time_t>(av[1]) : 0, 0, "", "");
+ do_nick(source, av[0], "", "", "", "", Anope::string(av[1]).is_pos_number_only() ? convertTo<time_t>(av[1]) : 0, 0, "", "");
return MOD_CONT;
}
@@ -483,7 +483,7 @@ int anope_event_tburst(const Anope::string &source, int ac, const char **av)
Anope::string setter = myStrGetToken(av[2], '!', 0);
c = findchan(av[0]);
- topic_time = Anope::string(av[1]).is_number_only() ? convertTo<time_t>(av[1]) : 0;
+ topic_time = Anope::string(av[1]).is_pos_number_only() ? convertTo<time_t>(av[1]) : 0;
if (!c)
{
@@ -606,9 +606,9 @@ int anope_event_whois(const Anope::string &source, int ac, const char **av)
int anope_event_server(const Anope::string &source, int ac, const char **av)
{
if (!stricmp(av[1], "1"))
- do_server(source, av[0], Anope::string(av[1]).is_number_only() ? convertTo<unsigned>(av[1]) : 0, av[2], TS6UPLINK);
+ do_server(source, av[0], Anope::string(av[1]).is_pos_number_only() ? convertTo<unsigned>(av[1]) : 0, av[2], TS6UPLINK);
else
- 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;
}
@@ -617,7 +617,7 @@ int anope_event_sid(const Anope::string &source, int ac, const char **av)
/* :42X SID trystan.nomadirc.net 2 43X :ircd-ratbox test server */
Server *s = Server::Find(source);
- do_server(s->GetName(), av[0], Anope::string(av[1]).is_number_only() ? convertTo<unsigned>(av[1]) : 0, av[3], av[2]);
+ do_server(s->GetName(), av[0], Anope::string(av[1]).is_pos_number_only() ? convertTo<unsigned>(av[1]) : 0, av[3], av[2]);
return MOD_CONT;
}