Browse Source

Fixed crash issue when no callid is given.

master
atom0s 8 years ago
parent
commit
fee10f117a
  1. 9
      changecall.lua

9
changecall.lua

@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
_addon.author = 'atom0s';
_addon.name = 'ChangeCall';
_addon.version = '1.0.0';
_addon.version = '1.0.1';
require 'common'
@ -47,7 +47,12 @@ ashita.register_event('command', function(command, ntype) @@ -47,7 +47,12 @@ ashita.register_event('command', function(command, ntype)
end
-- Pull the new call id to use..
settings.callid = tonumber(string.gsub(command, '/changecall', ''):trim());
local callid = string.gsub(command, '/changecall', ''):trim();
if (callid == nil or string.len(callid) == 0) then
settings.callid = 0;
else
settings.callid = tonumber(callid);
end
local newid = '';
if (settings.callid > 0) then

Loading…
Cancel
Save