summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/bs_kick.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/bs_kick.c b/src/core/bs_kick.c
index 036364aa8..c6ec38106 100644
--- a/src/core/bs_kick.c
+++ b/src/core/bs_kick.c
@@ -117,6 +117,7 @@ int do_kickcmd(User * u)
if (!stricmp(option, "BADWORDS")) {
if (!stricmp(value, "ON")) {
if (ttb) {
+ errno = 0;
ci->ttb[TTB_BADWORDS] =
strtol(ttb, (char **) NULL, 10);
/* Only error if errno returns ERANGE or EINVAL or we are less then 0 - TSL */
@@ -147,6 +148,7 @@ int do_kickcmd(User * u)
} else if (!stricmp(option, "BOLDS")) {
if (!stricmp(value, "ON")) {
if (ttb) {
+ errno = 0;
ci->ttb[TTB_BOLDS] = strtol(ttb, (char **) NULL, 10);
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_BOLDS] < 0) {
@@ -175,6 +177,7 @@ int do_kickcmd(User * u)
char *percent = strtok(NULL, " ");
if (ttb) {
+ errno = 0;
ci->ttb[TTB_CAPS] = strtol(ttb, (char **) NULL, 10);
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_CAPS] < 0) {
@@ -217,6 +220,7 @@ int do_kickcmd(User * u)
} else if (!stricmp(option, "COLORS")) {
if (!stricmp(value, "ON")) {
if (ttb) {
+ errno = 0;
ci->ttb[TTB_COLORS] = strtol(ttb, (char **) NULL, 10);
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_COLORS] < 0) {
@@ -245,6 +249,7 @@ int do_kickcmd(User * u)
char *secs = strtok(NULL, " ");
if (ttb) {
+ errno = 0;
ci->ttb[TTB_FLOOD] = strtol(ttb, (char **) NULL, 10);
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_FLOOD] < 0) {
@@ -289,6 +294,7 @@ int do_kickcmd(User * u)
char *times = strtok(NULL, " ");
if (ttb) {
+ errno = 0;
ci->ttb[TTB_REPEAT] = strtol(ttb, (char **) NULL, 10);
if (errno == ERANGE || errno == EINVAL
|| ci->ttb[TTB_REPEAT] < 0) {
@@ -323,6 +329,7 @@ int do_kickcmd(User * u)
} else if (!stricmp(option, "REVERSES")) {
if (!stricmp(value, "ON")) {
if (ttb) {
+ errno = 0;
ci->ttb[TTB_REVERSES] =
strtol(ttb, (char **) NULL, 10);
if (errno == ERANGE || errno == EINVAL
@@ -349,6 +356,7 @@ int do_kickcmd(User * u)
} else if (!stricmp(option, "UNDERLINES")) {
if (!stricmp(value, "ON")) {
if (ttb) {
+ errno = 0;
ci->ttb[TTB_UNDERLINES] =
strtol(ttb, (char **) NULL, 10);
if (errno == ERANGE || errno == EINVAL