25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-10-31 15:21:38 +01:00
Commit Graph

82 Commits

Author SHA1 Message Date
Evgeniy Khramtsov
fd8e07af47 Get rid of ejabberd.hrl header
The header consisted of too many unrelated stuff and macros misuse.
Some stuff is moved into scram.hrl and type_compat.hrl.
All macros have been replaced with the corresponding function calls.

TODO: probably type_compat.hrl is not even needed anymore since
we support only Erlang >= OTP 17.5
2018-06-14 14:00:47 +03:00
Badlop
cb3bb710bd Handle muc_register_nick success correctly (#2415) 2018-05-14 12:24:56 +02:00
Badlop
ad0fd1eac1 Simplify result of get_room_affiliation command (#2301) 2018-03-01 19:45:16 +01:00
Yusro Tsaqova
8a41cfc0f5 add ejabberd_command to get affiliation of a user in MUC room 2018-02-28 20:22:27 +07:00
Christophe Romain
9dbdeba6c1 Add case on create_room, avoid useless call 2018-02-13 11:08:13 +01:00
Evgeniy Khramtsov
ba2b650464 Introduce new gen_mod callback: mod_options/1
The callback is supposed to provide known options and their default
values, as long as the documentation. Passing default values into
get_mod functions is now deprecated: all defaults should be provided
by the Mod:mod_options/1 callback.
2018-01-23 10:54:52 +03:00
Evgeniy Khramtsov
cdc7c1d1ed Update copyright dates 2018-01-05 23:18:58 +03:00
Holger Weiss
5e4c547856 mod_muc_admin: Fix last timestamp retrieval 2017-12-22 14:32:47 +01:00
Badlop
50b19b47e0 Fix commands rooms_unused_list and _destroy 2017-12-21 17:00:43 +01:00
badlop
212d44f419
Merge pull request #2164 from angelo-chan/master
add muc_online_rooms_by_regex to mod_muc_admin to filter list online r…
2017-12-19 23:10:20 +01:00
Christophe Romain
051e1be832 send_direct_invitations accepts only user jids 2017-12-19 10:24:07 +01:00
Angelo Chan
b204f9349f add muc_online_room_by_regex to mod_muc_admin to filter list online rooms 2017-12-13 11:07:12 +08:00
Badlop
b2680a776b Prepare user and host arguments in get_user_rooms command (#2064) 2017-11-17 13:23:27 +01:00
Badlop
cbbfe32d8b Unregister commands when stopping node only if it's last one (#2083) 2017-11-06 16:53:49 +01:00
Badlop
d87151aee6 Simple optimization in get_room_occupants_number command (#1964) 2017-09-07 18:32:26 +02:00
Badlop
1d396b4716 Rewrite muc_register_nick and muc_unregister_nick to be DB independent (#1954)
Notice: The arguments expected have changed, instead of
  muc_register_nick Tim tim@example.org muc.example.org
  muc_unregister_nick Tim
it expects now:
  muc_register_nick Tim tim@example.org example.org
  muc_unregister_nick tim@example.org example.org
2017-08-24 10:40:54 +02:00
Badlop
05c2995c7a When creating room, set option to ensure config is set in muc_room table (#1954) 2017-08-21 15:58:10 +02:00
Evgeniy Khramtsov
92532a0d66 Replace gen_fsm with p1_fsm to avoid warnings in OTP20+ 2017-08-05 20:58:21 +03:00
Marc Philipp
976a8c9cc9 Fix mod_muc_admin:set_room_affiliation 2017-06-21 17:20:58 +02:00
Paweł Chmielowski
62ee051c6e Fix invalid {args,result}_examples in mod_muc_admin 2017-06-19 16:31:07 +02:00
Badlop
f6767ed061 Fix rooms list in WebAdmin (#1753) 2017-06-01 19:27:41 +02:00
Badlop
0982a9bc3c Parse correctly presence_broadcast option in change_room_option command 2017-05-29 12:49:53 +02:00
Badlop
908bedeaa6 Describe command arguments and results in mod_muc_admin 2017-05-22 12:55:32 +02:00
Evgeniy Khramtsov
fddd6110e0 Don't validate an option in gen_mod:get*opt() functions
The changes are very similar to those from previous commit:
* Now there is no need to pass validating function in
  gen_mod:get_opt() and gen_mod:get_module_opt() functions,
  because the modules' configuration keeps already validated values.
* New functions gen_mod:get_opt/2 and gen_mod:get_module_opt/3 are
  introduced.
* Functions gen_mod:get_opt/4 and get_module_opt/5 are deprecated.
  If the functions are still called, the "function" argument is
  simply ignored.
* Validating callback Mod:listen_opt_type/1 is introduced to validate
  listening options at startup.
2017-04-30 19:01:47 +03:00
Holger Weiss
87ae2d7996 mod_muc_room: Replace deprecated function call
Use jid:decode/1 instead of jlib:string_to_jid/1.
2017-04-11 13:38:33 +02:00
Christophe Romain
b1acd1183f Rename aux.erl as misc.erl
Thanks Microsoft Windows to not support some filenames
2017-04-11 12:13:58 +02:00
Badlop
1e82db5655 New muc_register_nick command (thanks to Peter Marheine)(#1407) 2017-04-10 12:23:14 +02:00
Evgeniy Khramtsov
7bcbea2108 Deprecate jlib.erl in favor of aux.erl
Since the main goal of jlib.erl is lost, all auxiliary functions
are now moved to aux.erl, and the whole jlib.erl is now deprecated.
2017-03-30 14:17:13 +03:00
Evgeniy Khramtsov
e30d41e5f0 Merge branch 'new_queue'
Conflicts:
	rebar.config
	src/mod_muc_admin.erl
2017-03-24 13:27:56 +03:00
Paweł Chmielowski
f819272b88 Fix crash in mod_muc_admin, we operate on integers here not lists 2017-03-21 15:36:42 +01:00
Edward Chow
c5af421cee Fixed wrong parameter values in mod_muc_admin
Corrected wrong parameter values passing to register_online_room(Room, Host, Pid) of mod_muc
2017-03-18 03:07:23 +08:00
Evgeniy Khramtsov
02064ae12a Add support for file-based queues
It's now possible to use files as internal packet queues.
The following options are introduced:

* queue_type: the option can be set to `ram` (default) or `file`.
  The option can be set per virtual host.
* queue_dir: path to the directory where queues will be allocated.
  The default is 'queue' directory inside Mnesia directory.
  This is a global option and cannot be set per virtual host.
2017-03-10 15:12:43 +03:00
Evgeniy Khramtsov
c1439ddd5b Get rid of jid:to_string/1 and jid:from_string/1 2017-02-26 10:07:12 +03:00
Evgeniy Khramtsov
603ec9cb19 Don't pass empty resource to jid:make() 2017-02-25 10:01:01 +03:00
Evgeniy Khramtsov
3c4057ff55 Reload modules when reloading configuration file 2017-02-22 19:46:47 +03:00
Evgeniy Khramtsov
8b2d308498 Change routing API
Now 'From' and 'To' arguments must be omitted in functions
and structures related to routing.
The commit deprecates the following functions:
     ejabberd_router:route/3 in favor of ejabberd_router:route/1
     ejabberd_router:route_error/4 in favor of ejabberd_router:route_error/2
     ejabberd_local:route_iq/4 in favor of ejabberd_local:route_iq/2
     ejabberd_local:route_iq/5 in favor of ejabberd_local:route_iq/3
The format of {route, From, To, Packet} is changed in favor of {route, Packet}
2017-02-16 11:10:24 +03:00
Badlop
b2a2e0f135 Support non-JID lines in command create_rooms_file 2017-01-31 17:50:04 +01:00
Evgeniy Khramtsov
d5d906184f Merge branch 'new_stream'
Conflicts:
	src/cyrsasl.erl
	src/ejabberd_c2s.erl
	src/ejabberd_cluster.erl
	src/ejabberd_frontend_socket.erl
	src/ejabberd_node_groups.erl
	src/ejabberd_router.erl
	src/mod_bosh.erl
	src/mod_ip_blacklist.erl
	src/mod_muc_mnesia.erl
	src/mod_offline.erl
	src/mod_proxy65_sm.erl
2017-01-20 19:35:46 +03:00
Evgeniy Khramtsov
0baaad30b1 Implement database backend interface for MUC, BOSH and auth_anonyous 2017-01-13 12:03:39 +03:00
Badlop
5fdd1c39fe Update copyright date automatically (#1442) 2017-01-02 21:42:06 +01:00
Christophe Romain
ed679279fd Cleanup file headers 2016-12-27 10:57:50 +01:00
Badlop
1a4f63f058 Copy recent make_opts function from mod_muc_room.erl 2016-12-09 13:07:48 +01:00
Evgeniy Khramtsov
b8f22ff538 Deprecate most of the functions from jlib.erl 2016-11-13 10:44:53 +03:00
Evgeniy Khramtsov
78a44e0176 Merge branch 'master' into xml-ng
Conflicts:
	src/adhoc.erl
	src/cyrsasl_oauth.erl
	src/ejabberd_c2s.erl
	src/ejabberd_config.erl
	src/ejabberd_service.erl
	src/gen_mod.erl
	src/mod_admin_extra.erl
	src/mod_announce.erl
	src/mod_carboncopy.erl
	src/mod_client_state.erl
	src/mod_configure.erl
	src/mod_echo.erl
	src/mod_mam.erl
	src/mod_muc.erl
	src/mod_muc_room.erl
	src/mod_offline.erl
	src/mod_pubsub.erl
	src/mod_stats.erl
	src/node_flat_sql.erl
	src/randoms.erl
2016-11-12 13:27:15 +03:00
Badlop
49d3b7ec1d Throw error if room name or host has invalid characters (#1360) 2016-11-04 17:28:28 +01:00
Badlop
5e723bc90e Fix reading room jids from file for create and destroy_rooms_file commands 2016-11-04 16:54:31 +01:00
Evgeniy Khramtsov
fa31e3ef23 Deprecate jlib:integer_to_binary/1 and jlib:binary_to_integer/1 2016-09-24 23:34:28 +03:00
Christophe Romain
c3543e002d Allow to create room with custom config 2016-09-13 11:52:59 +02:00
Evgeniy Khramtsov
417284a921 Add get_subscribers command to list MUC subscribers 2016-09-06 17:55:18 +03:00
Holger Weiss
23d9fb0592 mod_muc_admin: Accept 'allow_subscription' option
Allow for setting the new 'allow_subscription' option using the
'change_room_option' command.
2016-08-22 01:17:32 +02:00