Changes in irc.c [2f13222:9b63df6]
Legend:
- Unmodified
- Added
- Removed
-
irc.c
r2f13222 r9b63df6 657 657 c = conv_findchannel( channel ); 658 658 659 /* RFC s say there is no error reply allowed on NAMES, so when the659 /* RFC's say there is no error reply allowed on NAMES, so when the 660 660 channel is invalid, just give an empty reply. */ 661 661 … … 671 671 s = ""; 672 672 673 irc_reply( irc, 353, " =%s :%s%s", channel, s, u->nick );673 irc_reply( irc, 353, "@ %s :%s%s", channel, s, u->nick ); 674 674 } 675 675 else if( !u->gc ) … … 682 682 s = ""; 683 683 684 irc_reply( irc, 353, " =%s :%s%s", channel, s, u->nick );684 irc_reply( irc, 353, "@ %s :%s%s", channel, s, u->nick ); 685 685 } 686 686 } … … 697 697 for( l = c->in_room; l; l = l->next ) 698 698 if( ( u = user_findhandle( c->gc, l->data ) ) ) 699 irc_reply( irc, 353, " =%s :%s%s", channel, "", u->nick );699 irc_reply( irc, 353, "@ %s :%s%s", channel, "", u->nick ); 700 700 } 701 701 … … 735 735 irc_reply( irc, 5, "PREFIX=(ov)@+ CHANTYPES=#& CHANMODES=,,,%s NICKLEN=%d NETWORK=BitlBee CASEMAPPING=rfc1459 MAXTARGETS=1 WATCH=128 :are supported by this server", CMODES, MAX_NICK_LENGTH - 1 ); 736 736 irc_motd( irc ); 737 irc->umode[0] = '\0';738 737 irc_umode_set( irc, "+" UMODE, 1 ); 739 738 … … 843 842 char m[256], st = 1, *t; 844 843 int i; 845 char changes[512], *p, st2 = 2;846 char badflag = 0;847 844 848 845 memset( m, 0, sizeof( m ) ); … … 850 847 for( t = irc->umode; *t; t ++ ) 851 848 m[(int)*t] = 1; 852 853 p = changes; 849 854 850 for( t = s; *t; t ++ ) 855 851 { … … 857 853 st = *t == '+'; 858 854 else if( st == 0 || ( strchr( UMODES, *t ) || ( allow_priv && strchr( UMODES_PRIV, *t ) ) ) ) 859 {860 if( m[(int)*t] != st)861 {862 if( st != st2 )863 st2 = st, *p++ = st ? '+' : '-';864 *p++ = *t;865 }866 855 m[(int)*t] = st; 867 } 868 else 869 badflag = 1; 870 } 871 *p = '\0'; 856 } 872 857 873 858 memset( irc->umode, 0, sizeof( irc->umode ) ); … … 877 862 irc->umode[strlen(irc->umode)] = i; 878 863 879 if( badflag ) 880 irc_reply( irc, 501, ":Unknown MODE flag" ); 881 /* Deliberately no !user@host on the prefix here */ 882 if( *changes ) 883 irc_write( irc, ":%s MODE %s %s", irc->nick, irc->nick, changes ); 864 irc_reply( irc, 221, "+%s", irc->umode ); 884 865 } 885 866
Note: See TracChangeset
for help on using the changeset viewer.