コード例 #1
0
ファイル: decisiondriver.go プロジェクト: gundalow/sp0rkle
func Init() {
	bot.Rewrite(randPlugin)
	bot.Rewrite(decidePlugin)

	bot.Command(randCmd, "rand", "rand <range>  -- "+
		"choose a random number in range [lo-]hi")
	bot.Command(decideCmd, "decide", "decide <options>  -- "+
		"choose one of the (space, pipe, quote) delimited options at random")
	bot.Command(decideCmd, "choose", "choose <options>  -- "+
		"choose one of the (space, pipe, quote) delimited options at random")
}
コード例 #2
0
ファイル: factdriver.go プロジェクト: gundalow/sp0rkle
func Init() {
	fc = factoids.Init()

	bot.Handle(insert, client.PRIVMSG)
	bot.Handle(lookup, client.PRIVMSG, client.ACTION)

	bot.Rewrite(replaceIdentifiers)

	bot.Command(chance, "chance of that is",
		"chance  -- Sets trigger chance of the last displayed factoid value.")
	bot.Command(edit, "that =~",
		"=~ s/regex/replacement/ -- Edits the last factoid value using regex.")
	bot.Command(forget, "delete that",
		"delete  -- Forgets the last displayed factoid value.")
	bot.Command(forget, "forget that",
		"forget  -- Forgets the last displayed factoid value.")
	bot.Command(info, "fact info",
		"fact info <key>  -- Displays some stats about factoid <key>.")
	bot.Command(literal, "literal",
		"literal <key>  -- Displays the factoid values stored for <key>.")
	bot.Command(replace, "replace that with",
		"replace  -- Replaces the last displayed factoid value.")
	bot.Command(search, "fact search",
		"fact search <regexp>  -- Searches for factoids matching <regexp>.")
}
コード例 #3
0
ファイル: quotedriver.go プロジェクト: gundalow/sp0rkle
func Init() {
	qc = quotes.Init()

	bot.Rewrite(quotePlugin)
	bot.Command(add, "qadd", "qadd <quote>  -- Adds a quote to the db.")
	bot.Command(add, "quote add",
		"quote add <quote>  -- Adds a quote to the db.")
	bot.Command(add, "add quote",
		"add quote <quote>  -- Adds a quote to the db.")
	bot.Command(del, "qdel", "qdel #<qID>  -- Deletes a quote from the db.")
	bot.Command(del, "quote del",
		"quote del #<qID>  -- Deletes a quote from the db.")
	bot.Command(del, "del quote",
		"del quote #<qID>  -- Deletes a quote from the db.")
	bot.Command(fetch, "quote #", "quote #<qID>  -- Displays quote <qID>.")
	bot.Command(lookup, "quote",
		"quote <regex>  -- Displays quotes matching <regex>")
}
コード例 #4
0
ファイル: markovdriver.go プロジェクト: gundalow/sp0rkle
func Init() {
	mc = markov.Init()

	bot.Handle(recordMarkov, client.PRIVMSG, client.ACTION)
	bot.Rewrite(insultPlugin)

	bot.Command(enableMarkov, "markov me", "markov me  -- "+
		"Enable recording of your public messages to generate chains.")
	bot.Command(disableMarkov, "don't markov me", "don't markov me  -- "+
		"Disable (and delete) recording of your public messages.")
	bot.Command(disableMarkov, "don't markov me, bro", "don't markov me  -- "+
		"Disable (and delete) recording of your public messages.")
	bot.Command(randomCmd, "markov", "markov <nick>  -- "+
		"Generate random sentence for given <nick>.")
	bot.Command(insult, "insult", "insult <nick>  -- Insult <nick> at random.")
	bot.Command(learn, "learn", "learn <tag> <sentence>  -- "+
		"Learns a sentence for a particular.")
}