summaryrefslogtreecommitdiff
path: root/modules/protocol/unreal32.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/unreal32.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/unreal32.cpp')
-rw-r--r--modules/protocol/unreal32.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/protocol/unreal32.cpp b/modules/protocol/unreal32.cpp
index ff04e87eb..cb1949cb7 100644
--- a/modules/protocol/unreal32.cpp
+++ b/modules/protocol/unreal32.cpp
@@ -865,11 +865,11 @@ int anope_event_nick(const Anope::string &source, int ac, const char **av)
<codemastr> it's sent when a nick collision occurs
- so we have to leave it around for now -TSL
*/
- do_nick(source, av[0], av[3], av[4], av[5], av[6], Anope::string(av[2]).is_number_only() ? convertTo<time_t>(av[2]) : 0, 0, "*", "");
+ do_nick(source, av[0], av[3], av[4], av[5], av[6], Anope::string(av[2]).is_pos_number_only() ? convertTo<time_t>(av[2]) : 0, 0, "*", "");
}
else if (ac == 11)
{
- user = do_nick(source, av[0], av[3], av[4], av[5], av[10], Anope::string(av[2]).is_number_only() ? convertTo<time_t>(av[2]) : 0, ntohl(decode_ip(av[9])), av[8], "");
+ user = do_nick(source, av[0], av[3], av[4], av[5], av[10], Anope::string(av[2]).is_pos_number_only() ? convertTo<time_t>(av[2]) : 0, ntohl(decode_ip(av[9])), av[8], "");
if (user)
{
UserSetInternalModes(user, 1, &av[7]);
@@ -888,7 +888,7 @@ int anope_event_nick(const Anope::string &source, int ac, const char **av)
else
{
/* NON NICKIP */
- user = do_nick(source, av[0], av[3], av[4], av[5], av[9], Anope::string(av[2]).is_number_only() ? convertTo<time_t>(av[2]) : 0, 0, av[8], "");
+ user = do_nick(source, av[0], av[3], av[4], av[5], av[9], Anope::string(av[2]).is_pos_number_only() ? convertTo<time_t>(av[2]) : 0, 0, av[8], "");
if (user)
{
UserSetInternalModes(user, 1, &av[7]);
@@ -906,7 +906,7 @@ int anope_event_nick(const Anope::string &source, int ac, const char **av)
}
}
else
- 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;
}
@@ -936,10 +936,10 @@ int anope_event_server(const Anope::string &source, int ac, const char **av)
Anope::string vl = myStrGetToken(av[2], ' ', 0);
Anope::string upnumeric = myStrGetToken(vl, '-', 2);
Anope::string desc = myStrGetTokenRemainder(av[2], ' ', 1);
- do_server(source, av[0], Anope::string(av[1]).is_number_only() ? convertTo<unsigned>(av[1]) : 0, desc, upnumeric);
+ do_server(source, av[0], Anope::string(av[1]).is_pos_number_only() ? convertTo<unsigned>(av[1]) : 0, desc, upnumeric);
}
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], "");
ircdproto->SendPing(Config->ServerName, av[0]);
return MOD_CONT;
@@ -992,7 +992,7 @@ int anope_event_sdesc(const Anope::string &source, int ac, const char **av)
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)