From 9940b7aad246022d8ae55016877534cce3740471 Mon Sep 17 00:00:00 2001
From: Swee <sweeistaken@gmail.com>
Date: Mon, 21 Oct 2024 16:48:25 -0700
Subject: [PATCH] Fix parsing PRIVMSG

---
 scparseirc/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scparseirc/__init__.py b/scparseirc/__init__.py
index 70674ff..67c19aa 100644
--- a/scparseirc/__init__.py
+++ b/scparseirc/__init__.py
@@ -140,7 +140,7 @@ class IRCSession: # Actual IRC session
                 elif spaced[1] == "PRIVMSG": # IRC messages
                     token1=spaced[0][1:]
                     channel = spaced[2]
-                    cache.append(Message(content=" ".join(spaced[3:][1:]), user=User(name=token1.split("!")[0], username=token1.split("!")[1].split("@")[0], host=token1.split("!")[1].split("@")[1]), target=Channel(name=channel) if channel[0] == "#" else self.yourself))
+                    cache.append(Message(content=" ".join(spaced[3:])[1:], user=User(name=token1.split("!")[0], username=token1.split("!")[1].split("@")[0], host=token1.split("!")[1].split("@")[1]), target=Channel(name=channel) if channel[0] == "#" else self.yourself))
         if len(cache) == 1:
             return cache[0]
         else: