Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Did print to check if imports are the problem, but output is good. Printing an empty line when all output is done and not connection.
- print ("working")
- import sys
- print ("sys")
- import socket
- print ("socket")
- import string
- print ("string")
- import time
- print ("time")
- from time import gmtime, strftime, sleep
- print ("from time")
- import math
- print ("math")
- import re
- print ("re")
- from string import ascii_letters
- print ("ascii")
- from sys import argv
- print ("argv")
- def main():
- print ("working")
- operators = ["FreeProGamer"]
- server = "irc.openredstone.org"
- channel = "#openredstone"
- botnick = "FPGBot"
- readbuffer = ""
- irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) #defines the socket
- print("connecting to: "+server)
- irc.connect((server, 6667)) #connects to the server
- irc.send("PASS password\r\n")
- irc.send("USER "+ botnick +" "+ botnick +" "+ botnick + " :FPGBot\n") #user authentication
- irc.send("NICK "+ botnick +"\n") #sets nick
- sleep(5)
- irc.send("JOIN " + channel + "\r\n") #join the chan
- irc.send("PRIVMSG OREBuild :/msg " + operators[0] + " Hello!\r\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement