def leave(text, irc, ex, nick, commands): c = text.split(":!leave ")[1].strip() rawsend(irc,'PART '+ c +'\r\n')
def join(text, irc, ex, nick, commands): c = text.split(":!join ")[1].strip() rawsend(irc,'JOIN '+ c +'\r\n')
def quit(text, irc, ex, nick, commands): sendm(irc,'see you, space cowboy', ex[2]) rawsend(irc,'QUIT :h\r\n') exit()
def PING(text, irc, ex, nick, commands): rawsend(irc,'PONG ' + text.split()[1] + '\r\n')
if operonly and nick not in GS["owners"]: sendm(irc, nick + ": you're not on the operator list.", ex[2]) else: print(" running: " + plugin) getattr(Modules, "%s" % plugin)(text, irc, ex, nick, commands) irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM) irc.connect((GS["connect"]["host"], GS["connect"]["port"])) rawsend( irc, "USER " + GS["connect"]["username"] + " " + GS["connect"]["hostname"] + " " + GS["connect"]["servername"] + " :" + GS["connect"]["realname"] + "\n", ) rawsend(irc, "NICK " + GS["connect"]["nick"] + "\n") rawsend(irc, "PRIVMSG NickServ :IDENTIFY " + GS["connect"]["nickpass"] + "\n") rawsend(irc, "JOIN " + GS["connect"]["channels"] + "\n") while 1: text = irc.recv(2040) if not text: break text = utf(text)