projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4067f2a
)
Fix crash when entering a temporary channel when already in the channel.
author
fatbob313
<martin@fatbob.nu>
Sat, 27 Feb 2010 21:02:51 +0000
(21:02 +0000)
committer
fatbob313
<martin@fatbob.nu>
Sat, 27 Feb 2010 21:02:51 +0000
(21:02 +0000)
src/channel.c
patch
|
blob
|
history
diff --git
a/src/channel.c
b/src/channel.c
index 3524a966f9c958dfe52ca70eefc296596c0172ed..77ee4157dfe3fba941e29a76a6561c2d5b8e55b8 100644
(file)
--- a/
src/channel.c
+++ b/
src/channel.c
@@
-276,9
+276,12
@@
int Chan_userLeave(client_t *client)
int Chan_userJoin(channel_t *ch, client_t *client)
{
int leaving_id;
+
+ /* Do nothing if user already is in this channel */
+ if ((channel_t *)client->channel == ch)
+ return 0;
Log_debug("Add user %s to channel %s", client->username, ch->name);
-
/* Only allowed in one channel at a time */
leaving_id = Chan_userLeave(client);
list_add_tail(&client->chan_node, &ch->clients);