Changeset f55cfe9
- Timestamp:
- 2008-02-09T22:24:39Z (17 years ago)
- Branches:
- master
- Children:
- 52e6e17
- Parents:
- 5a71d9c
- Location:
- protocols
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/nogaim.c
r5a71d9c rf55cfe9 927 927 928 928 929 /* Misc. BitlBee stuff which shouldn't really be here */930 931 char *set_eval_away_devoice( set_t *set, char *value )932 {933 irc_t *irc = set->data;934 int st;935 936 if( ( g_strcasecmp( value, "true" ) == 0 ) || ( g_strcasecmp( value, "yes" ) == 0 ) || ( g_strcasecmp( value, "on" ) == 0 ) )937 st = 1;938 else if( ( g_strcasecmp( value, "false" ) == 0 ) || ( g_strcasecmp( value, "no" ) == 0 ) || ( g_strcasecmp( value, "off" ) == 0 ) )939 st = 0;940 else if( sscanf( value, "%d", &st ) != 1 )941 return( NULL );942 943 st = st != 0;944 945 /* Horror.... */946 947 if( st != set_getbool( &irc->set, "away_devoice" ) )948 {949 char list[80] = "";950 user_t *u = irc->users;951 int i = 0, count = 0;952 char pm;953 char v[80];954 955 if( st )956 pm = '+';957 else958 pm = '-';959 960 while( u )961 {962 if( u->ic && u->online && !u->away )963 {964 if( ( strlen( list ) + strlen( u->nick ) ) >= 79 )965 {966 for( i = 0; i < count; v[i++] = 'v' ); v[i] = 0;967 irc_write( irc, ":%s MODE %s %c%s%s",968 irc->myhost,969 irc->channel, pm, v, list );970 971 *list = 0;972 count = 0;973 }974 975 sprintf( list + strlen( list ), " %s", u->nick );976 count ++;977 }978 u = u->next;979 }980 981 /* $v = 'v' x $i */982 for( i = 0; i < count; v[i++] = 'v' ); v[i] = 0;983 irc_write( irc, ":%s MODE %s %c%s%s", irc->myhost,984 irc->channel, pm, v, list );985 }986 987 return( set_eval_bool( set, value ) );988 }989 990 991 992 993 929 /* The plan is to not allow straight calls to prpl functions anymore, but do 994 930 them all from some wrappers. We'll start to define some down here: */ -
protocols/nogaim.h
r5a71d9c rf55cfe9 321 321 322 322 /* Misc. stuff */ 323 char *set_eval_away_devoice( set_t *set, char *value );324 323 gboolean auto_reconnect( gpointer data, gint fd, b_input_condition cond ); 325 324 void cancel_auto_reconnect( struct account *a );
Note: See TracChangeset
for help on using the changeset viewer.