Gogs module.
This commit is contained in:
		
							parent
							
								
									3ac6bf2393
								
							
						
					
					
						commit
						7e20b957cb
					
				
					 1 changed files with 26 additions and 0 deletions
				
			
		
							
								
								
									
										26
									
								
								modules/gogs.go
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								modules/gogs.go
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
// vi:ts=4:sts=4:sw=4:noet:tw=72
 | 
			
		||||
 | 
			
		||||
package modules
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"log"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	"github.com/sorcix/irc"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
	MsgHandlers["fuzzytime"] = gogsHandleMessage
 | 
			
		||||
	log.Println("Initializing gogs module")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func gogsHandleMessage(m *irc.Message) {
 | 
			
		||||
	tok := strings.Split(m.Trailing, " ")
 | 
			
		||||
	if len(tok) < 1 {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	switch tok[0] {
 | 
			
		||||
	case "!gogs":
 | 
			
		||||
	default:
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue