Software /
code /
prosody
Diff
plugins/mod_pep.lua @ 1440:d3117a6ad1bf
mod_pep: Fixed a nil access error
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Sun, 28 Jun 2009 22:23:06 +0500 |
parent | 1439:f989608964ec |
child | 1451:cc0aa9470775 |
line wrap: on
line diff
--- a/plugins/mod_pep.lua Sun Jun 28 21:49:31 2009 +0500 +++ b/plugins/mod_pep.lua Sun Jun 28 22:23:06 2009 +0500 @@ -33,8 +33,10 @@ -- store for the future local user_data = data[bare]; if disable then - if user_data then user_data[node] = nil; end - if not next(user_data) then data[bare] = nil; end + if user_data then + user_data[node] = nil; + if not next(user_data) then data[bare] = nil; end + end else if not user_data then user_data = {}; data[bare] = user_data; end user_data[node] = stanza;