Announcement commands (annadd, anndel, annlist).
This commit is contained in:
		
							parent
							
								
									6b0e3a1dbf
								
							
						
					
					
						commit
						50e7e489c8
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -4,6 +4,7 @@ package announcements
 | 
			
		|||
 | 
			
		||||
import (
 | 
			
		||||
	"log"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	"github.com/sorcix/irc"
 | 
			
		||||
)
 | 
			
		||||
| 
						 | 
				
			
			@ -18,4 +19,17 @@ func Init(ch chan string) {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
func HandleMessage(m *irc.Message) {
 | 
			
		||||
	tok := strings.Split(m.Trailing, " ")
 | 
			
		||||
	if len(tok) < 1 {
 | 
			
		||||
		return
 | 
			
		||||
	}
 | 
			
		||||
	switch tok[0] {
 | 
			
		||||
	case "!annadd":
 | 
			
		||||
		/* add announcement */
 | 
			
		||||
	case "!anndel":
 | 
			
		||||
		/* delete announcement */
 | 
			
		||||
	case "!annlist":
 | 
			
		||||
		/* list announcement */
 | 
			
		||||
	default:
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue