TODO: better commit messages :)
This commit is contained in:
Horscchtey 2021-01-28 22:18:52 +00:00
commit 503957970d
4 changed files with 46 additions and 2 deletions

View file

@ -167,6 +167,10 @@ func parsemsg(msg irc_msg, foo bot) bool {
LOG_WARN.Printf("no command provided.\n")
return false
}
if c.cmd == "pepe" && msg.author == "spaghetto" {
printPepe(msg.author, foo)
return false
}
sorter_row, err := db.Query(fmt.Sprintf("select id, tag_id, groups_allow, name_allow, has_groups from sorter where name = '%s'", c.cmd))
checkErr(err)
@ -218,7 +222,7 @@ func parsemsg(msg irc_msg, foo bot) bool {
defer statement.Close()
// get ID of content...
task := fmt.Sprintf("select l.id from line l where l.content = '%s'", c.suffix)
task := fmt.Sprintf("select l.id from line l where l.content = \"%s\"", strings.Replace(c.suffix, "'", "''", -1))
row, err := db.Query(task)
checkErr(err)
line_id := 0