Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
1439:f989608964ec | 1440:d3117a6ad1bf |
---|---|
31 :up(); | 31 :up(); |
32 | 32 |
33 -- store for the future | 33 -- store for the future |
34 local user_data = data[bare]; | 34 local user_data = data[bare]; |
35 if disable then | 35 if disable then |
36 if user_data then user_data[node] = nil; end | 36 if user_data then |
37 if not next(user_data) then data[bare] = nil; end | 37 user_data[node] = nil; |
38 if not next(user_data) then data[bare] = nil; end | |
39 end | |
38 else | 40 else |
39 if not user_data then user_data = {}; data[bare] = user_data; end | 41 if not user_data then user_data = {}; data[bare] = user_data; end |
40 user_data[node] = stanza; | 42 user_data[node] = stanza; |
41 end | 43 end |
42 | 44 |