Bis hier hin alles gut, er verbindet macht alles was ich will ABER der bekommt bei ca. 10 minuten einen fehler und hört auf zu arbeiten wieso???
Fehler ist angeblich diese Zeile:
Code: Alles auswählen
user = data.split(':')[1]
Code: Alles auswählen
import socket #imports module allowing connection to IRC
import threading #imports module allowing timing functions
#sets variables for connection to chat
bot_owner = ''
nick = ''
channel = '#'
server = ''
password = ''
queue = 13 #sets variable for anti-spam queue functionality
irc = socket.socket()
irc.connect((server, 6667)) #connects to the server
#sends variables for connection to twitch chat
irc.send('PASS ' + password + '\r\n')
irc.send('USER ' + nick + ' 0 * :' + bot_owner + '\r\n')
irc.send('NICK ' + nick + '\r\n')
irc.send('JOIN ' + channel + '\r\n')
while True:
data = irc.recv(1204) #gets output from IRC server
user = data.split(':')[1]
user = user.split('!')[0] #determines the sender of the messages
print data