Changes in irc.c [9b63df6:2f13222]
Legend:
- Unmodified
- Added
- Removed
-
irc.c
r9b63df6 r2f13222 657 657 c = conv_findchannel( channel ); 658 658 659 /* RFC 's say there is no error reply allowed on NAMES, so when the659 /* RFCs 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'; 737 738 irc_umode_set( irc, "+" UMODE, 1 ); 738 739 … … 842 843 char m[256], st = 1, *t; 843 844 int i; 845 char changes[512], *p, st2 = 2; 846 char badflag = 0; 844 847 845 848 memset( m, 0, sizeof( m ) ); … … 847 850 for( t = irc->umode; *t; t ++ ) 848 851 m[(int)*t] = 1; 849 852 853 p = changes; 850 854 for( t = s; *t; t ++ ) 851 855 { … … 853 857 st = *t == '+'; 854 858 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 } 855 866 m[(int)*t] = st; 856 } 867 } 868 else 869 badflag = 1; 870 } 871 *p = '\0'; 857 872 858 873 memset( irc->umode, 0, sizeof( irc->umode ) ); … … 862 877 irc->umode[strlen(irc->umode)] = i; 863 878 864 irc_reply( irc, 221, "+%s", irc->umode ); 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 ); 865 884 } 866 885
Note: See TracChangeset
for help on using the changeset viewer.