Skip to content
Permalink
Browse files

Setting up constants until config supported

  • Loading branch information...
k4k committed Sep 14, 2017
1 parent a117d9a commit e57823ac7c7487bb436a984335a5b050e3a6ec80
Showing with 8 additions and 3 deletions.
  1. +8 −3 main.go
11 main.go
@@ -10,10 +10,15 @@ import (
"golang.org/x/net/html"
)

func ircConnect(svr string, cnl string) {
// Define you server, port and channel here
const server = "irc.freenode.net" // IRC Server
const port = 6667 // IRC Server Port
const channel = "#somechannelhere" // IRC Channel

func ircConnect(svr string, port int, cnl string) {
c := libirc.NewClient("webby", "webby-bot", "Webby Bot")

connErr := c.ConnectAndListen(fmt.Sprintf("%s:6667", svr))
connErr := c.ConnectAndListen(fmt.Sprintf("%s:%d", svr, port))
if connErr != nil {
panic(connErr)
}
@@ -50,7 +55,7 @@ func GetHtmlTitle(r io.Reader) (string, bool) {

func main() {

ircConnect("irc.freenode.net", "#somechannelhere")
ircConnect(server, port, channel)
time.Sleep(time.Duration(5) * time.Second)

url := "http://google.com"

0 comments on commit e57823a

Please sign in to comment.
You can’t perform that action at this time.