Quantcast
Channel: ejabberd Community Site - Module development
Viewing all 56 articles
Browse latest View live

admin-extra doesn't work in Release 13.10

$
0
0

mod_admin_extra seems not working in ejabberd 13.10. Did I do something wrong? thanks!

1: Installed ejabberd-13.10 on CentOS 5.7
2: checked out ejabberd modules by:
svn co https://svn.process-one.net/ejabberd-modules
3: compiled admin-extra by:
/opt/ejabberd-13.10/bin/erlc -I ./ejabberd-modules/ejabberd-dev/trunk/include/ ejabberd-modules/mod_admin_extra/trunk/src/mod_admin_extra.erl
4: copied beam file to the ejabberd directory by:
mv mod_admin_extra.beam /opt/ejabberd-13.10/lib/ejabberd-13.10/ebin/
5: restarted ejabberd and issued the command:

read more


mod_logxml error

$
0
0

Hello,

I'm trying to build a module with similar functionality as mod_logxml, so first I'm trying to get mod_logxml to work.

It is failing with the following error:

=ERROR REPORT==== 2013-10-29 15:50:39 ===
E(<0.397.0>:ejabberd_hooks:294) : {badarg,
[{mod_logxml,send_packet,3},
{ejabberd_hooks,run1,3},
{ejabberd_c2s,session_established2,2},
{p1_fsm,handle_msg,10},

read more

Problem using lager

$
0
0

Hi.

Im trying to write a module for ejabberd but whe I add it I get de next error:

2013-12-02 15:28:24.196 [critical] <0.37.0>@gen_mod:start_module:78 Problem starting the module mod_mymod for host <<"XYZ">>
options: []
error: undef
[{p1_logger,info_msg,
[mod_mymod,28,"Iniciando modulo mymod",[]],
[]},
{mod_mymod,start,2,[{file,"src/mod_mymod.erl"},{line,28}]},
{gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,70}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1262}]},
{ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,67}]},

read more

mod_http_offline not working

$
0
0

Hi,

I have done with mod_http_offline module but its not running properly. I will showing below error in error log

c(<0.37.0>:gen_mod:75) : Problem starting the module mod_http_offline for host "localhost"
options: [{access_max_user_messages,max_user_offline_messages}]
error: function_clause

PLease help me out....

Correct xml library for ejabberd 13 module developement

$
0
0

I am having a bit of trouble understanding the correct library to deal with xml in a ejabberd 13 community edition module.

For instance, I would like to simply use ejabberd as a router, scoop the contents of a message from ejabberd and queue it to rabbitMQ to be parsed external to ejabberd.

This is the test module I have written trying to accomplish these goals:


-module(mod_xml_test).

-behavior(gen_server).

-behavior(gen_mod).

%%% API: gen_mod
-export([start_link/2, start/2, stop/1]).

%%% API: gen_server

read more

Mnesia table being deleted?

$
0
0

Hey I'm trying to make an ejabberd module which uses mnesia. I make a mnesia table with disk copies. I'm having this bug where any tables I make are lost on restart. When I do the call to create the tables, I check for {aborted, {already_exists, _}}, but it returns {atomic, ok} every single time. I gathered from the mnesia guide that I should call the function which waits until timeout for the tables to load. They always timeout, even with a timeframe of multiple minutes.

read more

can't parse packet/payload on ejabberd 13 (xmlelements)

$
0
0

I'm using the pubsub_publish_item hook (from mod_pubsub @master) and I'm unable to parse the payload/packet.

I've tried using xml:get_tag_attr_s("x", Payload) and other xml:functions with no luck.

This is what I get as payload:

read more

How to change required fields for mod_register in ejabberd

$
0
0

Going through http://xmpp.org/extensions/xep-0077.html#intro, section 3.1 I see that the client should request which fields are required for in-band registration from the host. In case of ejabberd mod_register is used for in-band registration. I would be thankful if someone could tell me what would be the best way to customize the required fields for registration in mod_register.


gen_mod:start_module:78 Problem starting the module my_module for host

$
0
0

Hi,

I run a small private group of users on an XMPP server and recently I have been wanting to write a custom module that that will timestamp all messages. I figure something like an ejabberd hook using filter_packets would work perfect (adding something like this to the message body 2014-04-11 12:30:00 and then parse it on the client side).

As I have not written a custom module before and being at an low intermediate level with Erlang I decided to go for the basics - following Jack Moffits mod_sunshine.erl example as well as Anders Conbere's examples.

read more

Compiling a module for dummies

$
0
0

Hello,

I installed Ejabberd on Debian "Out-Of-The-Box" and it worked well from the beginning. I started to configure it to my needs, which was no problem a all. I got brave an started to build an own Sign-Up-System with PHP and Shell-Scripting, which worked flawless, too. Unfortunately I had to realize, that there is no way to prevent users from altering their Vcard-Information, so I googled and found a little tweak for mod_vcard, which would perfectly solve my problem.

read more

mod_amp not taking effect

$
0
0

Dear Friends,

I am relatively new to Ejabberd, recently I had a requirement wherein I needed to implement Advanced Message Processing specification which is implemented by mod_amp. I downloaded the "mod_amp.tgz" from the following link:

https://support.process-one.net/browse/EJAB-449

I ran build.sh and got the .beam file done, placed the same in Ejabberd beam files directory, added the entry in modules section of config file. I even made changes as per the attached .diff file as on "06/10/11 16:17" the top-most link, "449-amp.diff" file.

read more

Handling of Requests in ejabberd_http (a.k.a. is ejabberd_http useful for large files)

$
0
0

Hi,

i would like to develop a module, that handles up- and downloads of large files. Therefor it would be necessary, that the body of the request is not loaded completely before the control is handed over to my module. If I understand the sources correctly, this is not the case in 'ejabberd_http' as the request has the field 'data' holding the entire body. Do I understand that correctly?

Cheers,
Tobias

When to use what and why

$
0
0

I want to know what is the exact difference between mod_roster and mod_shared_roster and in what cases to use it.

Thanks
Jeet

Deliver message to multiple JIDs atomically?

$
0
0

Hi guys. Is there a way to send a message to multiple JIDs atomically?
I don't think XEP 0033 guarantees atomicity.

Thanks

Newbie module development

$
0
0

Hi,

I’m trying to start with developing modules.

After compiling my module, I don’t seem to be able to produce a .beam file... Using the command:

erlc -I /path/to/my/installation/ebin/ mod_test.erl

I get only one warning:

Warning: behaviour gen_mod undefined

And that’s as far as I can get. Any advices please?


admin-extra doesn't work in Release 13.10

$
0
0

mod_admin_extra seems not working in ejabberd 13.10. Did I do something wrong? thanks!

1: Installed ejabberd-13.10 on CentOS 5.7
2: checked out ejabberd modules by:
svn co https://svn.process-one.net/ejabberd-modules
3: compiled admin-extra by:
/opt/ejabberd-13.10/bin/erlc -I ./ejabberd-modules/ejabberd-dev/trunk/include/ ejabberd-modules/mod_admin_extra/trunk/src/mod_admin_extra.erl
4: copied beam file to the ejabberd directory by:
mv mod_admin_extra.beam /opt/ejabberd-13.10/lib/ejabberd-13.10/ebin/
5: restarted ejabberd and issued the command:

read more

mod_logxml error

$
0
0

Hello,

I'm trying to build a module with similar functionality as mod_logxml, so first I'm trying to get mod_logxml to work.

It is failing with the following error:

=ERROR REPORT==== 2013-10-29 15:50:39 ===
E(<0.397.0>:ejabberd_hooks:294) : {badarg,
[{mod_logxml,send_packet,3},
{ejabberd_hooks,run1,3},
{ejabberd_c2s,session_established2,2},
{p1_fsm,handle_msg,10},

read more

Problem using lager

$
0
0

Hi.

Im trying to write a module for ejabberd but whe I add it I get de next error:

2013-12-02 15:28:24.196 [critical] <0.37.0>@gen_mod:start_module:78 Problem starting the module mod_mymod for host <<"XYZ">>
options: []
error: undef
[{p1_logger,info_msg,
[mod_mymod,28,"Iniciando modulo mymod",[]],
[]},
{mod_mymod,start,2,[{file,"src/mod_mymod.erl"},{line,28}]},
{gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,70}]},
{lists,foreach,2,[{file,"lists.erl"},{line,1262}]},
{ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,67}]},

read more

mod_http_offline not working

$
0
0

Hi,

I have done with mod_http_offline module but its not running properly. I will showing below error in error log

c(<0.37.0>:gen_mod:75) : Problem starting the module mod_http_offline for host "localhost"
options: [{access_max_user_messages,max_user_offline_messages}]
error: function_clause

PLease help me out....

Correct xml library for ejabberd 13 module developement

$
0
0

I am having a bit of trouble understanding the correct library to deal with xml in a ejabberd 13 community edition module.

For instance, I would like to simply use ejabberd as a router, scoop the contents of a message from ejabberd and queue it to rabbitMQ to be parsed external to ejabberd.

This is the test module I have written trying to accomplish these goals:


-module(mod_xml_test).

-behavior(gen_server).

-behavior(gen_mod).

%%% API: gen_mod
-export([start_link/2, start/2, stop/1]).

%%% API: gen_server

read more

Viewing all 56 articles
Browse latest View live