diff options
author | certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-03-01 10:39:29 +0000 |
---|---|---|
committer | certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b <certus certus@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2006-03-01 10:39:29 +0000 |
commit | 0afacb171d76c22b946c08150bcd9622d45718f1 (patch) | |
tree | 614c648ac5950823b2cf57b0d245cc47f8f142b6 /src/channels.c | |
parent | 79fbeb90c1ef6dbceb94100580ca6de36fbd8ffe (diff) |
BUILD : 1.7.13 (978) BUGS : 417 NOTES : fixed events on /join 0.
git-svn-id: svn://svn.anope.org/anope/trunk@978 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@703 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/channels.c')
-rw-r--r-- | src/channels.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/channels.c b/src/channels.c index f2614b799..ac48644d2 100644 --- a/src/channels.c +++ b/src/channels.c @@ -523,6 +523,7 @@ void do_join(const char *source, int ac, char **av) Channel *chan; char *s, *t; struct u_chanlist *c, *nextc; + char *channame; if (UseTS6 && ircd->ts6) { user = find_byuid(source); @@ -545,13 +546,15 @@ void do_join(const char *source, int ac, char **av) if (debug) alog("debug: %s joins %s", source, s); - send_event(EVENT_JOIN_CHANNEL, 3, EVENT_START, source, s); - if (*s == '0') { c = user->chans; while (c) { nextc = c->next; + channame = sstrdup(c->chan->name); + send_event(EVENT_PART_CHANNEL, 3, EVENT_START, user->nick, channame); chan_deluser(user, c->chan); + send_event(EVENT_PART_CHANNEL, 3, EVENT_STOP, user->nick, channame); + free(channame); free(c); c = nextc; } @@ -559,6 +562,9 @@ void do_join(const char *source, int ac, char **av) continue; } + /* how about not triggering the JOIN event on an actual /part :) -certus */ + send_event(EVENT_JOIN_CHANNEL, 3, EVENT_START, source, s); + /* Make sure check_kick comes before chan_adduser, so banned users * don't get to see things like channel keys. */ if (check_kick(user, s)) |