Quantcast

Updated ChatManager to only display an error message if it's not nil.

F16Gaming [05-08-12 - 16:36]
Updated ChatManager to only display an error message if it's not nil.
Filename
ChatManager.lua
diff --git a/ChatManager.lua b/ChatManager.lua
index 357857e..f95cb85 100644
--- a/ChatManager.lua
+++ b/ChatManager.lua
@@ -1,18 +1,18 @@
 --[[
 	* Copyright (c) 2011-2012 by Adam Hellberg.
-	*
+	*
 	* This file is part of Command.
-	*
+	*
 	* Command is free software: you can redistribute it and/or modify
 	* it under the terms of the GNU General Public License as published by
 	* the Free Software Foundation, either version 3 of the License, or
 	* (at your option) any later version.
-	*
+	*
 	* Command is distributed in the hope that it will be useful,
 	* but WITHOUT ANY WARRANTY; without even the implied warranty of
 	* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 	* GNU General Public License for more details.
-	*
+	*
 	* You should have received a copy of the GNU General Public License
 	* along with Command. If not, see <http://www.gnu.org/licenses/>.
 --]]
@@ -230,7 +230,7 @@ function CM:HandleMessage(msg, sender, channel, target, sourceChannel, isBN, pID
 			end
 			self:SendMessage(s, channel, target, isBN)
 		end
-	else
+	elseif arg then
 		local s = l[arg]
 		if type(errArg) == "table" then
 			s = s:format(unpack(errArg))