summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
authorcertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-03-01 14:08:00 +0000
committercertus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-03-01 14:08:00 +0000
commit88b67f00f7c5036990492e6b64f2f7caa5b98583 (patch)
tree5b52b3c13c5c4e8e1445d423f0edae2feaf65288 /src/protocol
parent3a61b5a6064e2cd260af9d35e9f288c089bfc2f6 (diff)
git-svn-id: svn://svn.anope.org/anope/trunk@981 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@706 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/charybdis.c12
-rw-r--r--src/protocol/ptlink.c9
-rw-r--r--src/protocol/ratbox.c12
-rw-r--r--src/protocol/shadowircd.c12
4 files changed, 40 insertions, 5 deletions
diff --git a/src/protocol/charybdis.c b/src/protocol/charybdis.c
index 5add45073..a04653e27 100644
--- a/src/protocol/charybdis.c
+++ b/src/protocol/charybdis.c
@@ -676,11 +676,16 @@ int anope_event_tburst(char *source, int ac, char **av)
alog("debug: TOPIC %s for nonexistent channel %s",
merge_args(ac - 1, av + 1), av[0]);
}
+ if (setter)
+ free(setter);
return MOD_CONT;
}
- if (check_topiclock(c, topic_time))
+ if (check_topiclock(c, topic_time)) {
+ if (setter)
+ free(setter);
return MOD_CONT;
+ }
if (c->topic) {
free(c->topic);
@@ -693,6 +698,8 @@ int anope_event_tburst(char *source, int ac, char **av)
c->topic_time = topic_time;
record_topic(av[0]);
+ if (setter)
+ free(setter);
return MOD_CONT;
}
@@ -1702,7 +1709,10 @@ int anope_event_bmask(char *source, int ac, char **av)
if (!stricmp(av[2], "I")) {
add_invite(c, b);
}
+ if (b)
+ free(b);
}
+ free(bans);
}
return MOD_CONT;
}
diff --git a/src/protocol/ptlink.c b/src/protocol/ptlink.c
index 13f1ba7b3..8b7039941 100644
--- a/src/protocol/ptlink.c
+++ b/src/protocol/ptlink.c
@@ -418,6 +418,7 @@ int anope_event_newmask(char *source, int ac, char **av)
{
User *u;
char *newhost = NULL, *newuser = NULL;
+ int tofree = 0;
if (ac != 1)
return MOD_CONT;
@@ -445,7 +446,9 @@ int anope_event_newmask(char *source, int ac, char **av)
newuser = myStrGetOnlyToken(av[0], '@', 0);
if (newuser) {
newhost = myStrGetTokenRemainder(av[0], '@', 1);
+ tofree = 1;
change_user_username(u, newuser);
+ free(newuser);
} else {
newhost = av[0];
}
@@ -455,9 +458,11 @@ int anope_event_newmask(char *source, int ac, char **av)
u->mode |= UMODE_VH;
- if (newhost) {
+ if (newhost)
change_user_host(u, newhost);
- }
+
+ if (tofree)
+ free(newhost);
return MOD_CONT;
}
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index 47b1b68f9..ea591a0ce 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -667,11 +667,16 @@ int anope_event_tburst(char *source, int ac, char **av)
alog("debug: TOPIC %s for nonexistent channel %s",
merge_args(ac - 1, av + 1), av[0]);
}
+ if (setter)
+ free(setter);
return MOD_CONT;
}
- if (check_topiclock(c, topic_time))
+ if (check_topiclock(c, topic_time)) {
+ if (setter)
+ free(setter);
return MOD_CONT;
+ }
if (c->topic) {
free(c->topic);
@@ -684,6 +689,8 @@ int anope_event_tburst(char *source, int ac, char **av)
c->topic_time = topic_time;
record_topic(av[0]);
+ if (setter)
+ free(setter);
return MOD_CONT;
}
@@ -1679,7 +1686,10 @@ int anope_event_bmask(char *source, int ac, char **av)
if (!stricmp(av[2], "I")) {
add_invite(c, b);
}
+ if (b)
+ free(b);
}
+ free(bans);
}
return MOD_CONT;
}
diff --git a/src/protocol/shadowircd.c b/src/protocol/shadowircd.c
index 6d3410073..0c2741f93 100644
--- a/src/protocol/shadowircd.c
+++ b/src/protocol/shadowircd.c
@@ -706,11 +706,16 @@ int anope_event_tburst(char *source, int ac, char **av)
alog("debug: TOPIC %s for nonexistent channel %s",
merge_args(ac - 1, av + 1), av[0]);
}
+ if (setter)
+ free(setter);
return MOD_CONT;
}
- if (check_topiclock(c, topic_time))
+ if (check_topiclock(c, topic_time)) {
+ if (setter)
+ free(setter);
return MOD_CONT;
+ }
if (c->topic) {
free(c->topic);
@@ -723,6 +728,8 @@ int anope_event_tburst(char *source, int ac, char **av)
c->topic_time = topic_time;
record_topic(av[0]);
+ if (setter)
+ free(setter);
return MOD_CONT;
}
@@ -1627,7 +1634,10 @@ int anope_event_bmask(char *source, int ac, char **av)
if (!stricmp(av[2], "I")) {
add_invite(c, b);
}
+ if (b)
+ free(b);
}
+ free(bans);
}
return MOD_CONT;
}