clanchat plugin: add option to confirm kicks

This commit is contained in:
TheStonedTurtle
2019-12-13 07:50:10 -08:00
committed by Adam
parent dddd76fb8d
commit a3ef09b433
5 changed files with 106 additions and 6 deletions

View File

@@ -0,0 +1 @@
9B3B448D76D57F6D63C9CDA06E58695F6DEBE91F9EDF2D2C4876E064D1067FD6

View File

@@ -0,0 +1,34 @@
.id 215
.int_stack_count 0
.string_stack_count 1
.int_var_count 0
.string_var_count 1
; callback "confirmClanKick"
; Used by the ClanChat plugin to show a chatbox panel confirming the requested kick
; Also requires the "confirmKicks" option of ClanChatConfig to be enabled
invoke 1942
iconst 1
if_icmpeq LABEL4
jump CONFIRM_KICK ; Jump to our new label instead
LABEL4:
sconst "You can't kick players from your team during Wilderness Wars."
mes
return
LABEL7:
sconst "-Attempting to kick player from friends chat..."
iconst 2
invoke 96
sload 0
clan_kickuser
jump LABEL73
LABEL73:
return
CONFIRM_KICK:
sload 0 ; Username we are trying to kick
iconst 0 ; Modified if we are confirming the kick inside the plugin
sconst "confirmClanKick"
runelite_callback
pop_string ; Pop username
iconst 0 ; Compare against zero
if_icmpgt LABEL73 ; Early return for chatbox panel confirmation
jump LABEL7