Changeset 0b5cc72 for irc_channel.c
- Timestamp:
- 2010-04-05T00:39:04Z (15 years ago)
- Branches:
- master
- Children:
- 57c96f7
- Parents:
- 1d39159
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
irc_channel.c
r1d39159 r0b5cc72 82 82 int irc_channel_add_user( irc_channel_t *ic, irc_user_t *iu ) 83 83 { 84 if( g_slist_find( ic->users, iu ) != NULL)84 if( !irc_channel_has_user( ic, iu ) ) 85 85 return 0; 86 86 … … 98 98 int irc_channel_del_user( irc_channel_t *ic, irc_user_t *iu ) 99 99 { 100 if( g_slist_find( ic->users, iu ) == NULL)100 if( !irc_channel_has_user( ic, iu ) ) 101 101 return 0; 102 102 … … 110 110 111 111 return 1; 112 } 113 114 /* Currently a fairly stupid one-liner but I fear it's going to get worse. :-) */ 115 gboolean irc_channel_has_user( irc_channel_t *ic, irc_user_t *iu ) 116 { 117 return g_slist_find( ic->users, iu ) != NULL; 112 118 } 113 119
Note: See TracChangeset
for help on using the changeset viewer.