Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Make ¶
Make CTCP message. You will need to send this manually either by sending ([irc.Chat]) or replying [irc.Notice].
// sending: ctcpmsg := ctcp.Make("SOURCE") irc.Chat(conn, "User", ctcpmsg) // replying: ctcpmsg := ctcp.Make("SOURCE https://www.example.com/source.tgz") irc.Notice(conn, "User", ctcpmsg)
func Parse ¶
Parse CTCP message. Message must be manually checked via IsCTCP before calling this.
user, cmd, flags, fullmsg := irc.ParseLine(line) if cmd == "PRIVMSG" && ctcp.Valid(fullmsg) { // this is ctcp ctcpcmd, ctcpparams, _ := ctcp.Parse(fullmsg) if ctcpcmd == "PING" { irc.Notice(conn, user.Nick, fullmsg) // just send the same PING message back. continue } }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.