/*
 *
 * This is an unconventional script
 * Adapted from the oringal from "Eleazor"
 * lets me get rid of troublemakers quickly
 *
 * V2 by hop (nelson@cs.uwp.edu)
 * Uses serial number -3139
 *
 */

on #-join -3139 "*" km2.joinhistory $0

@ km2.list = repeat(10 <none> )
alias km2.joinhistory { @ splice(km2.list 0 1 $0) }
alias km2.showjoins {
	echo *** Join history:
	@ cnt = -1
	fe ($js) ax { echo ${cnt++}. $[9]ax }
	@ cnt = []
}

bind meta1-j parse_command km2.showjoins
bind meta1-k parse_command kill $"Kill who?" $kill_comment()
bind meta2-k parse_command kick * $"Kick who?" $kick_comment()

for (@x=0,x<=9,@x++)
{
	bind meta1-$x PARSE_COMMAND kill $$word($x $js) $$kill_comment()
	bind meta2-$x PARSE_COMMAND kick * $$word($x $js) $$kick_comment()
}

alias kill_comment { @ function_return = [Kickmenu V2] }
alias kick_comment { @ function_return = [Kickmenu V2] }

#hop'96
