-module twitchchat
+module fl-gui.name/twitchchat
go 1.22.3
-require golang.org/x/net v0.25.0 // indirect
+require golang.org/x/net v0.25.0
import (
"errors"
- "twitchchat/twitch/core/commands"
- "twitchchat/twitch/core/messages"
- "twitchchat/twitch/core/notice"
+
+ "fl-gui.name/twitchchat/twitch/core/commands"
+ "fl-gui.name/twitchchat/twitch/core/messages"
+ "fl-gui.name/twitchchat/twitch/core/notice"
)
// see https://dev.twitch.tv/docs/irc/authenticate-bot/#sending-the-pass-and-nick-messages.
import (
"fmt"
"strings"
- "twitchchat/twitch/core/messages"
+
+ "fl-gui.name/twitchchat/twitch/core/messages"
)
const (
import (
"strings"
- "twitchchat/twitch/core/messages"
+
+ "fl-gui.name/twitchchat/twitch/core/messages"
)
type Clearchat struct {
import (
"strings"
- "twitchchat/twitch/core/messages"
+
+ "fl-gui.name/twitchchat/twitch/core/messages"
)
type Clearmsg struct {
"bufio"
"fmt"
"io"
- "twitchchat/irc"
- "twitchchat/twitch/core/messages"
+
+ "fl-gui.name/twitchchat/irc"
+ "fl-gui.name/twitchchat/twitch/core/messages"
"golang.org/x/net/websocket"
)
package globaluserstate
-import "twitchchat/twitch/core/messages"
+import "fl-gui.name/twitchchat/twitch/core/messages"
type Globaluserstate struct {
messages.Message
import (
"strings"
- "twitchchat/twitch/core/messages"
+
+ "fl-gui.name/twitchchat/twitch/core/messages"
)
type Hosttarget struct {
import (
"fmt"
- "twitchchat/twitch/core/messages"
- "twitchchat/twitch/core/notice"
+
+ "fl-gui.name/twitchchat/twitch/core/messages"
+ "fl-gui.name/twitchchat/twitch/core/notice"
)
type ChannelMembers map[string][]string
import (
"fmt"
- "twitchchat/irc"
- "twitchchat/twitch/core/commands"
+
+ "fl-gui.name/twitchchat/irc"
+ "fl-gui.name/twitchchat/twitch/core/commands"
)
func Pass(nickname string) Message {
package messages
import (
- "twitchchat/irc"
- "twitchchat/twitch/core/commands"
+ "fl-gui.name/twitchchat/irc"
+ "fl-gui.name/twitchchat/twitch/core/commands"
)
func Capability(capability string) Message {
import (
"strings"
- "twitchchat/irc"
- "twitchchat/twitch/core/commands"
+
+ "fl-gui.name/twitchchat/irc"
+ "fl-gui.name/twitchchat/twitch/core/commands"
)
func Join(channels ...string) Message {
package messages
-import "twitchchat/irc"
+import "fl-gui.name/twitchchat/irc"
type Message irc.Message
package messages
import (
- "twitchchat/irc"
- "twitchchat/twitch/core/commands"
+ "fl-gui.name/twitchchat/irc"
+ "fl-gui.name/twitchchat/twitch/core/commands"
)
func IsPing(m Message) bool {
import (
"strings"
- "twitchchat/twitch/core/messages"
+
+ "fl-gui.name/twitchchat/twitch/core/messages"
)
type Notice struct {
package core
-import "twitchchat/twitch/core/messages"
+import "fl-gui.name/twitchchat/twitch/core/messages"
// Intercept received ping messages and respond to them with an appropriate pong
func (c *Conn) PingPong(msgs <-chan messages.Message) <-chan messages.Message {
import (
"strings"
- "twitchchat/twitch/core/messages"
+
+ "fl-gui.name/twitchchat/twitch/core/messages"
)
type Privmsg struct {
package reconnect
-import "twitchchat/twitch/core/messages"
+import "fl-gui.name/twitchchat/twitch/core/messages"
type Reconnect struct {
messages.Message
package roomstate
-import "twitchchat/twitch/core/messages"
+import "fl-gui.name/twitchchat/twitch/core/messages"
type Roomstate struct {
messages.Message
import (
"strings"
- "twitchchat/twitch/core/messages"
+
+ "fl-gui.name/twitchchat/twitch/core/messages"
)
type Usernotice struct {
package userstate
-import "twitchchat/twitch/core/messages"
+import "fl-gui.name/twitchchat/twitch/core/messages"
type Userstate struct {
messages.Message
import (
"strings"
- "twitchchat/twitch/core/messages"
+
+ "fl-gui.name/twitchchat/twitch/core/messages"
)
type Whisper struct {
"flag"
"fmt"
"strings"
- "twitchchat/twitch/core"
- "twitchchat/twitch/core/messages"
- "twitchchat/twitch/core/privmsg"
+
+ "fl-gui.name/twitchchat/twitch/core"
+ "fl-gui.name/twitchchat/twitch/core/messages"
+ "fl-gui.name/twitchchat/twitch/core/privmsg"
)
var channel = flag.String("channel", "fl_gui", "channel to read")
+++ /dev/null
-// generated by /tmp/go-build2868507172/b001/exe/message
-
-package clearchat
-
-import (
- "strings"
- "twitchchat/irc"
-)
-
-type Clearchat struct {
- irc.Message
-}
-
-func IsClearchat(m irc.Message) bool { return string(m.Command) == "CLEARCHAT" }
-
-func (m Clearchat) Channel() string { return m.Params.Params[0][1:] }
-
-func (m Clearchat) User() string { return strings.Split(m.Params.Trailing, " ")[0][0:] }
-
-func (m Clearchat) Duration() string {
- for _, t := range m.Tags {
- if t.Key == "ban-duration" {
- return t.Value
- }
- }
- return ""
-}
-
-func (m Clearchat) RoomId() string {
- for _, t := range m.Tags {
- if t.Key == "room-id" {
- return t.Value
- }
- }
- return ""
-}
-
-func (m Clearchat) UserId() string {
- for _, t := range m.Tags {
- if t.Key == "target-user-id" {
- return t.Value
- }
- }
- return ""
-}
-
-func (m Clearchat) Timestamp() string {
- for _, t := range m.Tags {
- if t.Key == "tmi-sent-ts" {
- return t.Value
- }
- }
- return ""
-}
"io"
"os"
"strings"
- "twitchchat/irc"
+
+ "fl-gui.name/twitchchat/irc"
)
func generateMessage(msg irc.Message, w io.Writer) (n int, err error) {
"io/fs"
"os"
"path"
- "twitchchat/irc"
+
+ "fl-gui.name/twitchchat/irc"
)
var prototype = flag.String("proto", "", "The prototype of the tags + message as a valid IRC message")