mirror of
				https://github.com/ergochat/ergo.git
				synced 2025-11-03 23:37:22 +01:00 
			
		
		
		
	fix ModeString
This commit is contained in:
		
							parent
							
								
									1787ac8ebf
								
							
						
					
					
						commit
						6367e4b654
					
				@ -130,6 +130,9 @@ func (channel *Channel) ModeString() (str string) {
 | 
			
		||||
	if channel.noOutside {
 | 
			
		||||
		str += NoOutside.String()
 | 
			
		||||
	}
 | 
			
		||||
	if len(str) > 0 {
 | 
			
		||||
		str = "+" + str
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -104,11 +104,15 @@ func (client *Client) InterestedClients() ClientSet {
 | 
			
		||||
	return clients
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *Client) UModeString() string {
 | 
			
		||||
// <mode>
 | 
			
		||||
func (c *Client) ModeString() (str string) {
 | 
			
		||||
	if c.invisible {
 | 
			
		||||
		return "i"
 | 
			
		||||
		str += Invisible.String()
 | 
			
		||||
	}
 | 
			
		||||
	return ""
 | 
			
		||||
	if len(str) > 0 {
 | 
			
		||||
		str = "+" + str
 | 
			
		||||
	}
 | 
			
		||||
	return
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *Client) UserHost() string {
 | 
			
		||||
 | 
			
		||||
@ -178,7 +178,7 @@ func RplMyInfo(server *Server) Reply {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RplUModeIs(server *Server, client *Client) Reply {
 | 
			
		||||
	return NewNumericReply(server, RPL_UMODEIS, client.UModeString())
 | 
			
		||||
	return NewNumericReply(server, RPL_UMODEIS, client.ModeString())
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RplNoTopic(channel *Channel) Reply {
 | 
			
		||||
 | 
			
		||||
@ -17,6 +17,10 @@ type ModeOp rune
 | 
			
		||||
// user mode flags
 | 
			
		||||
type UserMode rune
 | 
			
		||||
 | 
			
		||||
func (mode UserMode) String() string {
 | 
			
		||||
	return fmt.Sprintf("%c", mode)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// channel mode flags
 | 
			
		||||
type ChannelMode rune
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user