Best if it actually loads the addon with the appropriate name check

Wobin [04-13-14 - 17:50]
Best if it actually loads the addon with the appropriate name check
Filename
BorrowerAndLender.lua
diff --git a/BorrowerAndLender.lua b/BorrowerAndLender.lua
index 2e9a7d2..4554eee 100644
--- a/BorrowerAndLender.lua
+++ b/BorrowerAndLender.lua
@@ -1,5 +1,5 @@
 BorrowerAndLender = {}
-local function EndsWith(String,End)
+function EndsWith(String,End)
    return End=='' or string.sub(String,-string.len(End))==End
 end

@@ -8,7 +8,7 @@ local inBank

 local function WhoAmI(eventCode, options)
 	if EndsWith(ZO_ChatterOption1:GetText(), GetString(SI_INTERACT_OPTION_BANK)) then
-		inBank = true
+		inBank = true
 		local control = ZO_OptionsWindow.controlTable[2][9]
 		originalLevel = control.currentChoice
 		control.value = 1
@@ -28,7 +28,7 @@ local function WhoIWas(eventCode)
 end
 local function BorrowerAndLenderLoaded(eventCode, addOnName)

-	if(addOnName ~= "Borrower And Lender") then
+	if(addOnName ~= "BorrowerAndLender") then
         return
     end