summaryrefslogtreecommitdiff
path: root/contrib/ip_cloaking.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ip_cloaking.c')
-rw-r--r--contrib/ip_cloaking.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/contrib/ip_cloaking.c b/contrib/ip_cloaking.c
index 2b2cf48..b091ae5 100644
--- a/contrib/ip_cloaking.c
+++ b/contrib/ip_cloaking.c
@@ -65,7 +65,6 @@
#include "modules.h"
#include "memory.h"
#include "log.h"
-#include "sprintf_irc.h"
#include "userhost.h"
static unsigned int umode_vhost = 0;
@@ -272,15 +271,15 @@ make_virthost(char *curr, char *host, char *new)
if (strchr("0123456789", parv2[3][len - 1]) || parc2 < 2)
{
- ircsprintf(mask, "%s.%s.%s.%lx",
- parv2[parc2 - 4], parv2[parc2 - 3],
- parv2[parc2 - 2], hash[3]);
+ snprintf(mask, sizeof(mask), "%s.%s.%s.%lx",
+ parv2[parc2 - 4], parv2[parc2 - 3],
+ parv2[parc2 - 2], hash[3]);
}
else
{
/* isp.tld */
- ircsprintf(mask, "%lx-%lx.%s.%s",
- hash[0], hash[3], parv2[parc2 - 2], parv2[parc2 - 1]);
+ snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s",
+ hash[0], hash[3], parv2[parc2 - 2], parv2[parc2 - 1]);
}
}
else
@@ -288,28 +287,28 @@ make_virthost(char *curr, char *host, char *new)
if (parc2 >= 4)
{
/* isp.sub.tld or district.isp.tld */
- ircsprintf(mask, "%lx-%lx.%s.%s.%s",
+ snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s.%s",
hash[3], hash[1], parv2[parc2 - 3], parv2[parc2 - 2],
parv2[parc2 - 1]);
}
else
{
/* isp.tld */
- ircsprintf(mask, "%lx-%lx.%s.%s",
+ snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s",
hash[0], hash[3], parv2[parc2 - 2], parv2[parc2 - 1]);
}
if (parc2 >= 5)
{
/* zone.district.isp.tld or district.isp.sub.tld */
- ircsprintf(mask, "%lx-%lx.%s.%s.%s.%s",
+ snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s.%s.%s",
hash[1], hash[0], parv2[parc2 - 4], parv2[parc2 - 3],
parv2[parc2 - 2], parv2[parc2 - 1]);
}
else
{
/* isp.tld */
- ircsprintf(mask, "%lx-%lx.%s.%s",
+ snprintf(mask, sizeof(mask), "%lx-%lx.%s.%s",
hash[0], hash[3], parv2[parc2 - 2], parv2[parc2 - 1]);
}
}