forked from thoj/go-ircevent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathirc_struct.go
44 lines (36 loc) · 1014 Bytes
/
irc_struct.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright 2009 Thomas Jager <[email protected]> All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package irc
import (
"net"
"time"
)
type IRCConnection struct {
socket net.Conn
pread, pwrite chan string
Error chan error
syncreader, syncwriter chan bool
nick string //The nickname we want.
nickcurrent string //The nickname we currently have.
user string
registered bool
server string
Password string
events map[string][]func(*IRCEvent)
lastMessage time.Time
ticker <-chan time.Time
ticker2 <-chan time.Time
VerboseCallbackHandler bool
quitting bool
}
type IRCEvent struct {
Code string
Message string
Raw string
Nick string //<nick>
Host string //<nick>!<usr>@<host>
Source string //<host>
User string //<usr>
Arguments []string
}