From 7b9eaaf85002013c8d179d0e5c8f6f9b8439c415 Mon Sep 17 00:00:00 2001 From: raspbeguy Date: Mon, 30 May 2016 17:35:59 +0200 Subject: [PATCH] =?UTF-8?q?enfin=20commenc=C3=A9=20le=20code,=20pas=20trop?= =?UTF-8?q?=20t=C3=B4t=20hein=20=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sexiibot/core.py | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/sexiibot/core.py b/sexiibot/core.py index 8fafa89..147ed33 100644 --- a/sexiibot/core.py +++ b/sexiibot/core.py @@ -1,3 +1,30 @@ #!/bin/env python -#TODO +import os +import subprocess + +class Sexiibot(object): + """Core sexiibot class""" + + def __init__(self, new=True, server, port=None, ssl=False, channel, nick, realname=None, extensions, iipath=None) + if new: + self.__server = server + else: + self.__server = None + self.__port = port + self.__ssl = ssl + self.__channel = channel + self.__nick = nick + if realname = None: + self.__realname = nick + else: + self.__realname = realname + self.__extensions = extensions + self.__mode = None + self.__ircdir = "%s/irc/%s" % (os.environ['HOME'], server) + self.__iipath = iipath + + def start(self, new=True): + if new: + + subprocess.Popen([iipath, "-s", self.__server, "-n", self.__nick, "-f", self.__realname, "-e", "ssl"])