go fmt
This commit is contained in:
parent
41c1c27b1f
commit
2cd84df2ba
5 changed files with 36 additions and 36 deletions
15
bot.go
15
bot.go
|
|
@ -1,15 +1,14 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"fmt"
|
||||
"net"
|
||||
"time"
|
||||
"bufio"
|
||||
"strings"
|
||||
"database/sql"
|
||||
configo "github.com/distributedio/configo"
|
||||
"flag"
|
||||
"fmt"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
"net"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
func sendmsg(conn net.Conn, channel string, msg string) {
|
||||
|
|
@ -18,7 +17,7 @@ func sendmsg(conn net.Conn, channel string, msg string) {
|
|||
conn.Write([]byte(mesg))
|
||||
}
|
||||
|
||||
func scanline_privmsg (msg string, irc *irc_msg) {
|
||||
func scanline_privmsg(msg string, irc *irc_msg) {
|
||||
LOG_ERR.Printf(msg)
|
||||
|
||||
msg = msg[1:]
|
||||
|
|
@ -30,7 +29,7 @@ func scanline_privmsg (msg string, irc *irc_msg) {
|
|||
(*irc).channel, (*irc).msg = t[0], t[1]
|
||||
t = strings.Split((*irc).msg, "\r\n")
|
||||
(*irc).msg = strings.TrimSpace(t[0])
|
||||
if ! strings.HasPrefix((*irc).channel, "#") {
|
||||
if !strings.HasPrefix((*irc).channel, "#") {
|
||||
(*irc).channel = (*irc).author
|
||||
}
|
||||
(*irc).retmsg = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue