139 end |
139 end |
140 |
140 |
141 local arg = ...; |
141 local arg = ...; |
142 local help = "/? -? ? /h -h /help -help --help"; |
142 local help = "/? -? ? /h -h /help -help --help"; |
143 if not arg or help:find(arg, 1, true) then |
143 if not arg or help:find(arg, 1, true) then |
144 print([[ejabberd SQL db dump importer for Prosody |
144 print([[ejabberd SQL DB dump importer for Prosody |
145 |
145 |
146 Usage: ejabberdsql2prosody.lua filename.txt |
146 Usage: ejabberdsql2prosody.lua filename.txt |
147 |
147 |
148 The file can be generated from ejabberd using: |
148 The file can be generated using mysqldump: |
149 sudo ./bin/ejabberdctl dump filename.txt |
149 mysqldump db_name > filename.txt |
150 |
150 ]]); |
151 Note: The path of ejabberdctl depends on your ejabberd installation, and ejabberd needs to be running for ejabberdctl to work.]]); |
|
152 os.exit(1); |
151 os.exit(1); |
153 end |
152 end |
154 local map = { |
153 local map = { |
155 ["last"] = {"username", "seconds", "state"}; |
154 ["last"] = {"username", "seconds", "state"}; |
156 ["privacy_default_list"] = {"username", "name"}; |
155 ["privacy_default_list"] = {"username", "name"}; |