Skip to content

Instantly share code, notes, and snippets.

import sys, socket, string, os, threading, time, random
from os import system
windowtitle = "IRC Bot"
system("title "+windowtitle)
host = raw_input("Hostname: ")
nickname = raw_input("Nickname: ")
password = raw_input("Password: ")
channel = raw_input("Channel: ")
PORT = 6667
realname = nickname
@Nezzerath
Nezzerath / gist:4498906
Created January 10, 2013 02:33
functions
def parse():
try:
IRC_PRIVMSG_Information = [
data.split( ":" )[ 1 ].split( "!" )[ 0 ], #nick
data.split( "!" )[ 1 ].split( "@" )[ 0 ], #user
data.split( " " )[ 0 ].split( "@" )[ 1 ], #host
data.split( " " )[ 2 ], #Channel, Message
":".join( data.split( ":" )[ 2: ] ), True ] # Channel or PM
if not IRC_PRIVMSG_Information[ 3 ][ 0 ] == "#":
IRC_PRIVMSG_Information[ 5 ] = False
@Nezzerath
Nezzerath / simple irc python bot
Created January 9, 2013 09:05
python simple irc bot
import sys
import socket
import string
import os
import threading
import time
import random
windowtitle = "Nezzbot IRC Client"
from os import system
system("title "+windowtitle)
import sys
import socket
import string
import os
import threading
windowtitle = "Nezzbot IRC Client"
from os import system
system("title "+windowtitle)
nickname = raw_input("Nickname: ")
password = raw_input("Password: ")