From b775a28dec4eb7b7c1de036253472ab2fff6ef94 Mon Sep 17 00:00:00 2001
From: Swee <sweeistaken@gmail.com>
Date: Sat, 19 Oct 2024 19:25:37 -0700
Subject: [PATCH] Update __init__.py

---
 scparseirc/__init__.py | 31 ++++++++++++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/scparseirc/__init__.py b/scparseirc/__init__.py
index 44c2d4d..d3ee2f1 100644
--- a/scparseirc/__init__.py
+++ b/scparseirc/__init__.py
@@ -1 +1,30 @@
-import socket
\ No newline at end of file
+import socket
+class message: # Message object
+    def __init__(self, content:str, channel:str, nick:str):
+        self.content = content
+        self.channel = channel
+        self.nick = nick
+class channel: # Channel object
+    is_init = False
+    topic = ""
+    modes = "+nt"
+    def __init__(self, name:str):
+        self.name = name
+    def info_set(self, topic:str, modes:str): # Socket will automatically initialize the channel object
+        self.is_init = True
+        self.topic, self.modes = topic, modes
+class IRCSession: # Actual IRC session
+    messages = None
+    connecting = False
+    socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
+    def __init__(self, address:str, port:int, nick:str, user:str, *args, **kwargs): # Contains the configuration
+        self.server, self.port, self.nick, self.user = address,port,nick,user
+        print("Defined IRC session with server " + address + " port " + str(port))
+    def connect(self): # Attempt to connect
+        self.socket.connect((self.server, self.port))
+        self.connecting = True
+        return False
+    def alive(self): # NOT FINISHED: To minimize exceptions, the client can ask the object if the socket connection is still alive.
+        return False
+    def whois(self, nick:str): # Try to /whois the user, will return a user() object or None.
+        return None
\ No newline at end of file