1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 13:43:12 +02:00

BUILD : 1.7.9 (795) BUGS : 379 NOTES : Fixed the channelname issue in do_part once and for all with sstrdup(tm) power

git-svn-id: svn://svn.anope.org/anope/trunk@795 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@554 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b
2005-05-13 19:58:49 +00:00
parent f50b00cdb6
commit e024944b6d
3 changed files with 14 additions and 4 deletions
+8 -3
View File
@@ -653,6 +653,7 @@ void do_part(const char *source, int ac, char **av)
User *user;
char *s, *t;
struct u_chanlist *c;
char *channame;
user = finduser(source);
if (!user) {
@@ -676,8 +677,10 @@ void do_part(const char *source, int ac, char **av)
alog("user: BUG parting %s: channel entry found but c->chan NULL", s);
return;
}
channame = sstrdup(c->chan->name);
send_event(EVENT_PART_CHANNEL, 3, EVENT_START, user->nick,
c->chan->name);
channame);
chan_deluser(user, c->chan);
if (c->next)
c->next->prev = c->prev;
@@ -685,9 +688,11 @@ void do_part(const char *source, int ac, char **av)
c->prev->next = c->next;
else
user->chans = c->next;
send_event(EVENT_PART_CHANNEL, 3, EVENT_STOP, user->nick,
c->chan->name);
free(c);
send_event(EVENT_PART_CHANNEL, 3, EVENT_STOP, user->nick,
channame);
free(channame);
}
}
}