voglio costruire un bot che fa sostanzialmente la seguente:IRC Python Bot: Modo migliore
- ascolta la stanza e interagisce con gli utenti e li incoraggia a PM bot.
- Una volta che un utente ha attivato PM il bot interagisce con il client utilizzando varie tecniche AI.
Dovrei semplicemente usare la libreria IRC o Socket in python o ho bisogno di più di un framework di bot.
Cosa vorresti fare?
Grazie!
Ecco il codice Attualmente sto usando, però, non ho ottenuto di lavorare.
#!/usr/bin/python
import socket
network = 'holmes.freenet.net'
port = 6667
irc = socket.socket (socket.AF_INET, socket.SOCK_STREAM)
irc.connect ((network, port))
irc.send ('NICK PyIRC\r\n')
irc.send ('USER PyIRC PyIRC PyIRC :Python IRC\r\n')
irc.send ('JOIN #pyirc\r\n')
irc.send ('PRIVMSG #pyirc :Can you hear me?\r\n')
irc.send ('PART #pyirc\r\n')
irc.send ('QUIT\r\n')
irc.close()
Sono vicino a finire un pacchetto IRC per Python che potrebbe essere in grado di aiutarti. Lo avrò disponibile qui: http://ircutils.evanfosmark.com/ –
Fantastico! Grazie! Terrò questo in mente! –