started Kick support
This commit is contained in:
+3
-3
@@ -55,7 +55,7 @@ func tw_handle_emotes(text string, emote_data string) string {
|
||||
eend_int = textlen - 1
|
||||
}
|
||||
/* use rune conversion for correct offsets */
|
||||
replacements[string([]rune(text)[estart_int:eend_int + 1])] = "#EMOTE-" + emote_id + "#"
|
||||
replacements[string([]rune(text)[estart_int:eend_int + 1])] = "#TWEMOTE-" + emote_id + "#"
|
||||
}
|
||||
}
|
||||
for from, to := range replacements { /* iterate over replacements */
|
||||
@@ -144,7 +144,7 @@ func tw_process_message(rawmsg string) {
|
||||
func twitch_run(config map[string]interface{}) {
|
||||
token_path := "auth/twitch-token.txt"
|
||||
token, err := ioutil.ReadFile(token_path)
|
||||
token_err_msg := "No Twitch token file provided or it is empty. "
|
||||
token_err_msg := "[twitch] No Twitch token file provided or it is empty. "
|
||||
token_err_msg += "Please visit https://twitchapps.com/tmi/, generate a token there "
|
||||
token_err_msg += "and paste it into the auth/twitch-token.txt file!"
|
||||
if err != nil {
|
||||
@@ -158,7 +158,7 @@ func twitch_run(config map[string]interface{}) {
|
||||
/* Connect to the Twitch IRC server */
|
||||
conn, err := net.Dial("tcp", "irc.chat.twitch.tv:6667")
|
||||
if err != nil {
|
||||
log.Fatal("Error connecting to Twitch: ", err)
|
||||
log.Fatal("[twitch] Error connecting to Twitch: ", err)
|
||||
}
|
||||
|
||||
tcpwritestr(conn, fmt.Sprintf("PASS %s\n", config["tw_token"]))
|
||||
|
||||
Reference in New Issue
Block a user