diff --git a/Makefile b/Makefile index 465aa7bc..d33fa631 100644 --- a/Makefile +++ b/Makefile @@ -277,6 +277,7 @@ DBUS_OBJ= \ ./src/dbus/methods/room_say.o \ ./src/dbus/methods/room_start.o \ ./src/dbus/methods/room_take_class.o \ +./src/dbus/methods/clan_leave.o \ $(DBUS_API_GENERATED).o manager: | options diff --git a/include/wb_dbus_methods.h b/include/wb_dbus_methods.h index 19c942d5..c075fe06 100644 --- a/include/wb_dbus_methods.h +++ b/include/wb_dbus_methods.h @@ -131,6 +131,9 @@ gboolean on_handle_room_take_class(Warfacebot *object, GDBusMethodInvocation *invocation, const gchar *arg_ClassName); +gboolean on_handle_clan_leave(Warfacebot *object, + GDBusMethodInvocation *invocation); + gboolean on_handle_chat_room_join(Warfacebot *object, GDBusMethodInvocation *invocation, const gchar *arg_Jid); diff --git a/src/dbus/methods/clan_leave.c b/src/dbus/methods/clan_leave.c new file mode 100755 index 00000000..bf634842 --- /dev/null +++ b/src/dbus/methods/clan_leave.c @@ -0,0 +1,40 @@ +/** + * WarfaceBot, a blind XMPP client for Warface (FPS) + * Copyright (C) 2015-2017 Levak Borok + * + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +#include + +#include + +#include + + +/* +** DBus method call: "ClanLeave" +*/ +gboolean on_handle_clan_leave(Warfacebot *object, + GDBusMethodInvocation *invocation) +{ + + cmd_clan_leave(); + + warfacebot_complete_clan_leave( + object, + invocation); + + return TRUE; +} diff --git a/src/dbus/org.levak.Warfacebot.xml b/src/dbus/org.levak.Warfacebot.xml index 054ff440..307afd78 100644 --- a/src/dbus/org.levak.Warfacebot.xml +++ b/src/dbus/org.levak.Warfacebot.xml @@ -145,6 +145,10 @@ + + + +