Changeset 52e6e17
- Timestamp:
- 2008-02-10T13:36:43Z (17 years ago)
- Branches:
- master
- Children:
- 8521b02
- Parents:
- f55cfe9
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
irc.c
rf55cfe9 r52e6e17 113 113 set_add( &irc->set, "display_namechanges", "false", set_eval_bool, irc ); 114 114 set_add( &irc->set, "handle_unknown", "root", NULL, irc ); 115 set_add( &irc->set, "halfop_buddies", "false", set_eval_halfop_buddies, irc ); 115 116 set_add( &irc->set, "lcnicks", "true", set_eval_bool, irc ); 116 117 set_add( &irc->set, "op_buddies", "false", set_eval_op_buddies, irc ); -
otr.c
rf55cfe9 r52e6e17 982 982 int otr_update_modeflags(irc_t *irc, user_t *u) 983 983 { 984 char *vo = set_getstr(&irc->set, "voice_buddies"); 985 char *oo = set_getstr(&irc->set, "op_buddies"); 986 char eflag=0, tflag=0; 987 int e = u->encrypted; 988 int t = (u->encrypted > 1); 989 990 if(!strcmp(vo, "encrypted")) 991 eflag='v'; 992 else if(!strcmp(oo, "encrypted")) 993 eflag='o'; 994 if(!strcmp(vo, "trusted")) 995 tflag='v'; 996 else if(!strcmp(oo, "trusted")) 997 tflag='o'; 998 999 if(!eflag) 984 char *vb = set_getstr(&irc->set, "voice_buddies"); 985 char *hb = set_getstr(&irc->set, "halfop_buddies"); 986 char *ob = set_getstr(&irc->set, "op_buddies"); 987 int encrypted = u->encrypted; 988 int trusted = u->encrypted > 1; 989 char flags[7]; 990 int nflags; 991 char *p = flags; 992 int i; 993 994 if(!strcmp(vb, "encrypted")) { 995 *(p++) = encrypted ? '+' : '-'; 996 *(p++) = 'v'; 997 nflags++; 998 } else if(!strcmp(vb, "trusted")) { 999 *(p++) = trusted ? '+' : '-'; 1000 *(p++) = 'v'; 1001 nflags++; 1002 } 1003 if(!strcmp(hb, "encrypted")) { 1004 *(p++) = encrypted ? '+' : '-'; 1005 *(p++) = 'h'; 1006 nflags++; 1007 } else if(!strcmp(hb, "trusted")) { 1008 *(p++) = trusted ? '+' : '-'; 1009 *(p++) = 'h'; 1010 nflags++; 1011 } 1012 if(!strcmp(ob, "encrypted")) { 1013 *(p++) = encrypted ? '+' : '-'; 1014 *(p++) = 'o'; 1015 nflags++; 1016 } else if(!strcmp(ob, "trusted")) { 1017 *(p++) = trusted ? '+' : '-'; 1018 *(p++) = 'o'; 1019 nflags++; 1020 } 1021 *p = '\0'; 1022 1023 p = g_malloc(nflags * (strlen(u->nick)+1) + 1); 1024 *p = '\0'; 1025 if(!p) 1000 1026 return 0; 1001 1002 if(tflag) { 1003 irc_write( irc, ":%s!%s@%s MODE %s %c%c%c%c %s %s", irc->mynick, irc->mynick, irc->myhost, 1004 irc->channel, e?'+':'-', eflag, t?'+':'-', tflag, u->nick, u->nick ); 1005 } else { 1006 irc_write( irc, ":%s!%s@%s MODE %s %c%c %s", irc->mynick, irc->mynick, irc->myhost, 1007 irc->channel, e?'+':'-', eflag, u->nick ); 1008 } 1027 for(i=0; i<nflags; i++) { 1028 strcat(p, " "); 1029 strcat(p, u->nick); 1030 } 1031 irc_write( irc, ":%s!%s@%s MODE %s %s%s", irc->mynick, irc->mynick, irc->myhost, 1032 irc->channel, flags, p ); 1033 g_free(p); 1009 1034 1010 1035 return 1; -
protocols/nogaim.c
rf55cfe9 r52e6e17 620 620 if(!strcmp(set_getstr(&ic->irc->set, "voice_buddies"), "notaway")) { 621 621 irc_write( ic->irc, ":%s MODE %s %cv %s", from, ic->irc->channel, 622 u->away?'-':'+', u->nick ); 623 } 624 if(!strcmp(set_getstr(&ic->irc->set, "halfop_buddies"), "notaway")) { 625 irc_write( ic->irc, ":%s MODE %s %ch %s", from, ic->irc->channel, 622 626 u->away?'-':'+', u->nick ); 623 627 } -
set.c
rf55cfe9 r52e6e17 345 345 } 346 346 347 char *set_eval_halfop_buddies( set_t *set, char *value ) 348 { 349 return set_eval_mode_buddies(set, value, 'h'); 350 } 351 347 352 char *set_eval_voice_buddies( set_t *set, char *value ) 348 353 { -
set.h
rf55cfe9 r52e6e17 99 99 char *set_eval_op_user( set_t *set, char *value ); 100 100 char *set_eval_op_buddies( set_t *set, char *value ); 101 char *set_eval_halfop_buddies( set_t *set, char *value ); 101 102 char *set_eval_voice_buddies( set_t *set, char *value ); 102 103 char *set_eval_charset( set_t *set, char *value );
Note: See TracChangeset
for help on using the changeset viewer.