Commit 1273d73e authored by nanahira's avatar nanahira Committed by GitHub

add kick room

parent 1440075e
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
<button class="btn btn-default" id="tips_button" data-toggle="tooltip" title="刷新提示信息">提示</button> <button class="btn btn-default" id="tips_button" data-toggle="tooltip" title="刷新提示信息">提示</button>
<button class="btn btn-default" id="dialogues_button" data-toggle="tooltip" title="刷新台词信息">台词</button> <button class="btn btn-default" id="dialogues_button" data-toggle="tooltip" title="刷新台词信息">台词</button>
<button class="btn btn-default" id="ban_button" data-toggle="tooltip" title="封禁玩家">封禁</button> <button class="btn btn-default" id="ban_button" data-toggle="tooltip" title="封禁玩家">封禁</button>
<button class="btn btn-default" id="kick_button" data-toggle="tooltip" title="中止指定房间的决斗,输入房间号为指定房间,输入 all 为全部房间">中止</button>
<button class="btn btn-default" id="death_button" data-toggle="tooltip" title="开始加时赛,输入房间号为指定房间,不输入为全部房间">加时赛</button> <button class="btn btn-default" id="death_button" data-toggle="tooltip" title="开始加时赛,输入房间号为指定房间,不输入为全部房间">加时赛</button>
<button class="btn btn-default" id="deathcancel_button" data-toggle="tooltip" title="取消加时赛,输入房间号为指定房间,不输入为全部房间">取消加时赛</button> <button class="btn btn-default" id="deathcancel_button" data-toggle="tooltip" title="取消加时赛,输入房间号为指定房间,不输入为全部房间">取消加时赛</button>
<span id="message_callback"></span> <span id="message_callback"></span>
...@@ -80,6 +81,7 @@ $(function(){ ...@@ -80,6 +81,7 @@ $(function(){
$("#tips_button").click(load_tips); $("#tips_button").click(load_tips);
$("#dialogues_button").click(load_dialogues); $("#dialogues_button").click(load_dialogues);
$("#ban_button").click(ban_player); $("#ban_button").click(ban_player);
$("#kick_button").click(kick_room);
$("#death_button").click(start_death); $("#death_button").click(start_death);
$("#deathcancel_button").click(cancel_death); $("#deathcancel_button").click(cancel_death);
var params=parseQueryString(); var params=parseQueryString();
...@@ -212,6 +214,13 @@ function ban_player() { ...@@ -212,6 +214,13 @@ function ban_player() {
$.getJSON(url, shoutcallback); $.getJSON(url, shoutcallback);
} }
} }
function kick_room() {
if (confirm("确实要中止这个房间的决斗吗?")) {
$("#message_callback").text('...');
var url=$("#http").val() + "://" + $("#ip").val() + ":" + $("#port").val() + "/api/message?kick=" + $("#shout").val() + "&pass=" + $("#password").val() + "&callback=?";
$.getJSON(url, shoutcallback);
}
}
function start_death() { function start_death() {
if (confirm("确实要开始加时赛吗?")) { if (confirm("确实要开始加时赛吗?")) {
if ($("#shout").val().length) { if ($("#shout").val().length) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment