Preparations for clustering ability
This commit is contained in:
		
							parent
							
								
									5e43ee5d38
								
							
						
					
					
						commit
						00cb057120
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -305,6 +305,7 @@ func (sv *Server) recvMsg(msg *irc.Message) {
 | 
				
			||||||
	hook.HookFn(sv, msg)
 | 
						hook.HookFn(sv, msg)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Local delivery of an irc message to channel or client
 | 
				
			||||||
func (sv *Server) sendMsg(msg *irc.Message) {
 | 
					func (sv *Server) sendMsg(msg *irc.Message) {
 | 
				
			||||||
	if strings.HasPrefix(msg.Args[0], "#") {
 | 
						if strings.HasPrefix(msg.Args[0], "#") {
 | 
				
			||||||
		chid := strings.ToLower(msg.Args[0])
 | 
							chid := strings.ToLower(msg.Args[0])
 | 
				
			||||||
| 
						 | 
					@ -331,6 +332,13 @@ func (sv *Server) sendMsg(msg *irc.Message) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Forward an irc message to cluster and deliver locally
 | 
				
			||||||
 | 
					func (sv *Server) forwardMsg(msg *irc.Message) {
 | 
				
			||||||
 | 
						sv.sendMsg(msg)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Send irc reply to local client; drop, if server if client doesnt
 | 
				
			||||||
 | 
					// exists locally
 | 
				
			||||||
func (sv *Server) sendReply(nick, cmd, args, trail string) {
 | 
					func (sv *Server) sendReply(nick, cmd, args, trail string) {
 | 
				
			||||||
	clid := strings.ToLower(nick)
 | 
						clid := strings.ToLower(nick)
 | 
				
			||||||
	if _, exists := sv.clients[clid]; !exists {
 | 
						if _, exists := sv.clients[clid]; !exists {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue