Commits

Ada Young committed fb199e4

Added a check for a valid name before committing to db

Comments (0)

Files changed (1)

 desc_text.append("%0")
 world.EnableTrigger("CaptureAll", True)
 world.EnableTrigger("DescriptionEnd", True)
-name = world.GetCommandList(1)[0].split(" ")[1].lower()
+try:
+    name = world.GetCommandList(1)[0].split(" ")
+    if len(name) == 2:
+        name = name[1].lower()
+    else:
+        name = None
+except:
+    name = None
   </send>
   </trigger>
   <trigger
 }
 
 def ProcessDescription(description):
+    if name is None: # bail out if we goofed up on getting a name while spamming
+        return
+
     split_desc = re.split("A rune.+?\.", description)
     description = "".join(split_desc)