Kicking a user
Posted: 17 April 2008 11:00 PM   [ Ignore ]
Newbie
Rank
Total Posts:  10
Joined  2007-07-24

In ejabberd 1.1.4 I had a module which had the ability to kick a user, this was accomplished by routing a broadcast “disconnect” packet to the user via.

force_disconnect(User, Server, Msg) ->
    
ejabberd_sm:route(
        
jlib:make_jid("", "", ""),
        
jlib:make_jid(User, Server, ""),
        
{xmlelement, "broadcast", [], [{disconnect, Msg}]}
    
).

This no longer seems to work with ejabberd 2.0, i was wondering if their was an easier way of possibly doing this.

Profile
 
 
Posted: 18 April 2008 12:34 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  10
Joined  2007-07-24

Replacing “disconnect” with “exit” did the trick.

Profile