Changeset ac2717b
- Timestamp:
- 2010-08-14T10:55:20Z (14 years ago)
- Branches:
- master
- Children:
- 136c2bb
- Parents:
- 4ffd757
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/user-guide/commands.xml
r4ffd757 rac2717b 1432 1432 <bitlbee-command name="blist"> 1433 1433 <syntax>blist [all|online|offline|away]</syntax> 1434 <short-description>List all the buddies in your contact list</short-description>1435 1436 <description> 1437 <para> 1438 You can get a betterreadable buddy list using the <emphasis>blist</emphasis> command. If you want a complete list (including the offline users) you can use the <emphasis>all</emphasis> argument.1434 <short-description>List all the buddies in the current channel</short-description> 1435 1436 <description> 1437 <para> 1438 You can get a more readable buddy list using the <emphasis>blist</emphasis> command. If you want a complete list (including the offline users) you can use the <emphasis>all</emphasis> argument. 1439 1439 </para> 1440 1440 </description> -
irc.h
r4ffd757 rac2717b 258 258 void irc_channel_update_ops( irc_channel_t *ic, char *value ); 259 259 char *set_eval_irc_channel_ops( struct set *set, char *value ); 260 gboolean irc_channel_wants_user( irc_channel_t *ic, irc_user_t *iu ); 260 261 261 262 /* irc_commands.c */ -
irc_channel.c
r4ffd757 rac2717b 726 726 } 727 727 728 /* Figure out if a channel is supposed to have the user, assuming s/he is 729 online or otherwise also selected by the show_users setting. Only works 730 for control channels, but does *not* check if this channel is of that 731 type. Beware! */ 732 gboolean irc_channel_wants_user( irc_channel_t *ic, irc_user_t *iu ) 733 { 734 struct irc_control_channel *icc = ic->data; 735 736 if( iu->bu == NULL ) 737 return FALSE; 738 739 switch( icc->type ) 740 { 741 case IRC_CC_TYPE_GROUP: 742 return iu->bu->group == icc->group; 743 case IRC_CC_TYPE_ACCOUNT: 744 return iu->bu->ic->acc == icc->account; 745 case IRC_CC_TYPE_PROTOCOL: 746 return iu->bu->ic->acc->prpl == icc->protocol; 747 case IRC_CC_TYPE_DEFAULT: 748 default: 749 return TRUE; 750 } 751 } 752 728 753 static gboolean control_channel_free( irc_channel_t *ic ) 729 754 { -
irc_im.c
r4ffd757 rac2717b 141 141 void bee_irc_channel_update( irc_t *irc, irc_channel_t *ic, irc_user_t *iu ) 142 142 { 143 struct irc_control_channel *icc;144 143 GSList *l; 145 gboolean match = FALSE;146 144 147 145 if( ic == NULL ) … … 168 166 } 169 167 170 icc = ic->data; 171 172 if( icc->type == IRC_CC_TYPE_DEFAULT ) 173 match = TRUE; 174 else if( icc->type == IRC_CC_TYPE_GROUP ) 175 match = iu->bu->group == icc->group; 176 else if( icc->type == IRC_CC_TYPE_ACCOUNT ) 177 match = iu->bu->ic->acc == icc->account; 178 else if( icc->type == IRC_CC_TYPE_PROTOCOL ) 179 match = iu->bu->ic->acc->prpl == icc->protocol; 180 181 if( !match ) 168 if( !irc_channel_wants_user( ic, iu ) ) 182 169 { 183 170 irc_channel_del_user( ic, iu, IRC_CDU_PART, NULL ); … … 185 172 else 186 173 { 174 struct irc_control_channel *icc = ic->data; 187 175 int mode = 0; 188 176 -
root_commands.c
r4ffd757 rac2717b 1008 1008 irc_usermsg( irc, format, "Nick", "Handle/Account", "Status" ); 1009 1009 1010 if( strcmp( set_getstr( &irc->root->last_channel->set, "type" ), "control" ) != 0 ) 1011 irc->root->last_channel = NULL; 1012 1010 1013 for( l = irc->users; l; l = l->next ) 1011 1014 { … … 1013 1016 bee_user_t *bu = iu->bu; 1014 1017 1015 if( !bu || ( bu->flags & ( BEE_USER_ONLINE | BEE_USER_AWAY ) ) != BEE_USER_ONLINE ) 1018 if( !bu || ( irc->root->last_channel && !irc_channel_wants_user( irc->root->last_channel, iu ) ) || 1019 ( bu->flags & ( BEE_USER_ONLINE | BEE_USER_AWAY ) ) != BEE_USER_ONLINE ) 1016 1020 continue; 1017 1021 … … 1035 1039 bee_user_t *bu = iu->bu; 1036 1040 1037 if( !bu || !( bu->flags & BEE_USER_ONLINE ) || !( bu->flags & BEE_USER_AWAY ) ) 1041 if( !bu || ( irc->root->last_channel && !irc_channel_wants_user( irc->root->last_channel, iu ) ) || 1042 !( bu->flags & BEE_USER_ONLINE ) || !( bu->flags & BEE_USER_AWAY ) ) 1038 1043 continue; 1039 1044 … … 1051 1056 bee_user_t *bu = iu->bu; 1052 1057 1053 if( !bu || bu->flags & BEE_USER_ONLINE ) 1058 if( !bu || ( irc->root->last_channel && !irc_channel_wants_user( irc->root->last_channel, iu ) ) || 1059 bu->flags & BEE_USER_ONLINE ) 1054 1060 continue; 1055 1061
Note: See TracChangeset
for help on using the changeset viewer.