Update repository
This commit is contained in:
parent
e5a935a85b
commit
df2a986286
7 changed files with 35 additions and 24 deletions
15
boddle.go
15
boddle.go
|
|
@ -5,10 +5,11 @@ import (
|
|||
"fmt"
|
||||
"regexp"
|
||||
"database/sql"
|
||||
"math/rand"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
var begin_char = []byte{'-', '<'}
|
||||
var begin_char = []byte{'-'}
|
||||
var db *sql.DB
|
||||
var err error
|
||||
|
||||
|
|
@ -278,6 +279,18 @@ func parsemsg(msg *irc_msg, foo bot) bool {
|
|||
return false
|
||||
}
|
||||
if c.cmd == "help" {
|
||||
(*msg).retmsg = "There is no help in this hell..."
|
||||
return false
|
||||
}
|
||||
if c.cmd == "slap" {
|
||||
who := []string{(*msg).author, "\x01ACTION"}
|
||||
whom := []string{(*msg).author, foo.Conf.Name}
|
||||
LOG_WARN.Printf("suffix: " + c.suffix)
|
||||
if c.suffix != "" {
|
||||
who = append(who, strings.Split(c.suffix, " ")...)
|
||||
whom = append(whom, strings.Split(c.suffix, " ")...)
|
||||
}
|
||||
(*msg).retmsg = who[rand.Intn(len(who))] + " slaps " + whom[rand.Intn(len(whom))] + " around with a large trout."
|
||||
return false
|
||||
}
|
||||
// hard code 'groups' to add new groups to the groups-table
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue