diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-06 01:33:33 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-06-06 01:33:33 +0100 |
commit | 18da20bf7690ca3c1e9cf4b70c2749a11c75b339 (patch) | |
tree | ba6998f3923c2ce1d8ab041da4c3f5f7a0fa4ed0 /irc_channel.c | |
parent | c1a8a163703a903c7a69e06286013f12d6bf865e (diff) |
Added /part msgs, and the ability to silently remove users from channels
(when sending a /quit instead, for example).
Diffstat (limited to 'irc_channel.c')
-rw-r--r-- | irc_channel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/irc_channel.c b/irc_channel.c index bceb067c..b3904d22 100644 --- a/irc_channel.c +++ b/irc_channel.c @@ -80,7 +80,7 @@ int irc_channel_free( irc_channel_t *ic ) irc_t *irc = ic->irc; if( ic->flags & IRC_CHANNEL_JOINED ) - irc_channel_del_user( ic, irc->user ); + irc_channel_del_user( ic, irc->user, FALSE, "Cleaning up channel" ); irc->channels = g_slist_remove( irc->channels, ic ); while( ic->users ) @@ -141,7 +141,7 @@ int irc_channel_add_user( irc_channel_t *ic, irc_user_t *iu ) return 1; } -int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu ) +int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu, gboolean silent, const char *msg ) { irc_channel_user_t *icu; @@ -151,8 +151,8 @@ int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu ) ic->users = g_slist_remove( ic->users, icu ); g_free( icu ); - if( ic->flags & IRC_CHANNEL_JOINED ) - irc_send_part( ic, iu, "" ); + if( ic->flags & IRC_CHANNEL_JOINED && !silent ) + irc_send_part( ic, iu, msg ); if( iu == ic->irc->user ) ic->flags &= ~IRC_CHANNEL_JOINED; |