Project

General

Profile

how to let a client offline from tigase

tiger zhang
Added over 5 years ago

how to let a client offline from tigase?


Replies (7)

Added by tiger zhang over 5 years ago

in server side

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 5 years ago

I am afraid there is no admin command for this task yet. Apparently there was no need to do such thing. Please have a look at current list of admin command and use them as an example to implement own command for disconnecting user. Among others the DeleteUser script might be the best example as it deletes user from DB and disconnects the user if he is connected to the server:

https://projects.tigase.org/projects/tigase-server/repository/revisions/master/show/src/main/groovy/tigase/admin

Added by tiger zhang over 5 years ago

how to execute it independently? must be combined with tigase.jar?

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 5 years ago

Yes, the admin ad-hoc commands can be executed independently. There are many ways, you can use an XMPP client, or our command line tool: https://projects.tigase.org/projects/tclmt

More about this you can read in XEP-0133

Added by tiger zhang over 5 years ago

by the way how to execute it in java code

Added by Wojciech Kapcia TigaseTeam over 5 years ago

what do you mean 'in java code'? Tigase scripting capabilities use JSR-223 and in Tigase all scripts are either loaded during startup (thus has to be in scripts/ directory or within path configured in init.properties: @--script-dir=path@) or can be loaded to running server using admin ad-hoc commands mentioned by Artur. If you want to run those scripts without running Tigase then you could use groovy console, but this isn't any kind of solution as those scripts are tightly coupled to Tigase internals (there are running within Tigase components) thus they will fail without Tigase running.

Added by tiger zhang over 5 years ago

My means is that i execute a script of running tigase, i found that i can execute it by smack but it was not run successfullly

    (1-7/7)