Kill someone
        Required arguments:
        * nick - Nick to kill.
        Optional arguments:
        * reason='' - Reason for killing them.
356429
def kill(self, nick, reason=''):
        
        with self.lock:
            self.send('KILL ' + nick + ' :' + reason, error_check=True)
488481
def kick(user, reason = nil)
      API::Server.remove_member(@bot.token, @id, user.resolve_id, reason)
    end
1317990
def kick(self, channel, nick, comment=""):
        """"""
        self.send_items('KICK', channel, nick, comment and ':' + comment)
148557
def cmd(send, msg, args):
    
    if not msg:
        send("This tastes yummy!")
    elif msg == args['botnick']:
        send("wyang says Cannibalism is generally frowned upon.")
    else:
        send("%s tastes yummy!" % msg.capitalize())
792258
def stop(self, reason=''):
        
        key = '/status/sessions/terminate?sessionId=%s&reason=%s' % (self.session[0].id, quote_plus(reason))
        return self._server.query(key)
14103
private static String reasonToString(int reason) {
        if ((reason > 0) && (reason < REASON_STRINGS.length)) {
            return REASON_STRINGS[reason];
        }
        return "Unknown reason " + reason;
    }
324329
def _execute(self, *args: str, **kwargs: Any) -> tuple:
        ''''''
        return self.execute(args=args, options=merge_dict(self.options, kwargs)).communicate()
1245374
function execute(args) {
    try {
        const currentOptions = options.parse(args)
        return executeOptions(currentOptions)
    } catch (error) {
        console.error(error.message)
        return 1
    }
}
50926
def cmd(send, msg, args):
    
    parser = arguments.ArgParser(args['config'])
    parser.add_argument('--nick', action=arguments.NickParser)
    parser.add_argument('--ignore-case', '-i', action='store_true')
    parser.add_argument('string', nargs='*')
    try:
        cmdargs = parser.parse_args(msg)
    except arguments.ArgumentException as e:
        send(str(e))
        return
    if not cmdargs.string:
        send('Please specify a search term.')
        return
    cmdchar = args['config']['core']['cmdchar']
    term = ' '.join(cmdargs.string)
    if cmdargs.nick:
        query = args['db'].query(Log).filter(Log.type == 'pubmsg', Log.source == cmdargs.nick, ~Log.msg.startswith(cmdchar))
    else:
        query = args['db'].query(Log).filter(Log.type == 'pubmsg', ~Log.msg.startswith(cmdchar))
    if cmdargs.ignore_case:
        query = query.filter(Log.msg.ilike('%%%s%%' % escape(term)))
    else:
        query = query.filter(Log.msg.like('%%%s%%' % escape(term)))
    query = query.order_by(Log.time.desc())
    result = query.limit(1).first()
    count = query.count()
    if result is not None:
        logtime = result.time.strftime('%Y-%m-%d %H:%M:%S')
        send("%s was last said by %s at %s (%d occurrences)" % (result.msg, result.source, logtime, count))
    elif cmdargs.nick:
        send('%s has never said %s.' % (cmdargs.nick, term))
    else:
        send('%s has never been said.' % term)
1171593
def arg_name(self) -> T.Optional[str]:
        """"""
        if len(self.args) > 2:
            return self.args[2]
        elif len(self.args) > 1:
            return self.args[1]
        return None
737346
def cmd_terminate(self, argv, help):
        """"""
        from ploy.common import yesno
        parser = argparse.ArgumentParser(
            prog="%s terminate" % self.progname,
            description=help,
        )
        instances = self.get_instances(command='terminate')
        parser.add_argument("instance", nargs=1,
                            metavar="instance",
                            help="Name of the instance from the config.",
                            choices=sorted(instances))
        args = parser.parse_args(argv)
        instance = instances[args.instance[0]]
        if not yesno("Are you sure you want to terminate '%s'?" % instance.config_id):
            return
        instance.hooks.before_terminate(instance)
        instance.terminate()
        instance.hooks.after_terminate(instance)
679920
def do_kill(self, arg):
        
        if arg:
            if arg == '*':
                target_pids = self.debug.get_debugee_pids()
                target_tids = list()
            else:
                target_pids = set()
                target_tids = set()
                if self.cmdprefix:
                    pid, tid = self.get_process_and_thread_ids_from_prefix()
                    if tid is None:
                        target_tids.add(tid)
                    else:
                        target_pids.add(pid)
                for token in self.split_tokens(arg):
                    try:
                        pid = self.input_process(token)
                        target_pids.add(pid)
                    except CmdError:
                        try:
                            tid = self.input_process(token)
                            target_pids.add(pid)
                        except CmdError:
                            msg = "unknown process or thread (%s)" % token
                            raise CmdError(msg)
                target_pids = list(target_pids)
                target_tids = list(target_tids)
                target_pids.sort()
                target_tids.sort()
            msg = "You are about to kill %d processes and %d threads."
            msg = msg % ( len(target_pids), len(target_tids) )
            if self.ask_user(msg):
                for pid in target_pids:
                    self.kill_process(pid)
                for tid in target_tids:
                    self.kill_thread(tid)
        else:
            if self.cmdprefix:
                pid, tid = self.get_process_and_thread_ids_from_prefix()
                if tid is None:
                    if self.lastEvent is not None and pid == self.lastEvent.get_pid():
                        msg = "You are about to kill the current process."
                    else:
                        msg = "You are about to kill process %d." % pid
                    if self.ask_user(msg):
                        self.kill_process(pid)
                else:
                    if self.lastEvent is not None and tid == self.lastEvent.get_tid():
                        msg = "You are about to kill the current thread."
                    else:
                        msg = "You are about to kill thread %d." % tid
                    if self.ask_user(msg):
                        self.kill_thread(tid)
            else:
                if self.lastEvent is None:
                    raise CmdError("no current process set")
                pid = self.lastEvent.get_pid()
                if self.ask_user("You are about to kill the current process."):
                    self.kill_process(pid)
724941
def do_execute(self):
        
        result = None
        f = None
        try:
            if bool(self.resolve_option("append")):
                f = open(str(self.resolve_option("output")), "a")
            else:
                f = open(str(self.resolve_option("output")), "w")
            f.write(str(self.input.payload))
            f.write("\n")
        except Exception as e:
            result = self.full_name + "\n" + traceback.format_exc()
        finally:
            if f is not None:
                f.close()
        return result
1240898
function kill(req, res) {
  // TODO: implement filters
  var conn;
  // single ip:port
  if(req.args.length === 1) {
    conn = req.args[0];

    // shouldn't get here, however there is a possible
    // race condition whereby the target connection quits
    // between validate and execute
    if(!conn) return res.send(null, null);

    // suicide
    if(conn.id === req.conn.id) {
      conn.write(Constants.OK, function onWrite() {
        conn.close();
      })
    // killing another connection
    }else{
      //console.dir('closing another connection...');
      conn.close(function onClose() {
        res.send(null, Constants.OK);
      })
    }
  }
}
510215
def _simplify_arguments(arguments):
    
    if len(arguments.args) == 0:
        return arguments.kwargs
    elif len(arguments.kwargs) == 0:
        return arguments.args
    else:
        return arguments
449653
def kill(self, signal=None):
        

        return self.client.api.kill(self.id, signal=signal)
1230256
def end(target):
    
    if not isinstance(target, compat.greenlet):
        raise TypeError("argument must be a greenlet")
    if not target.dead:
        schedule(target)
        state.to_raise[target] = compat.GreenletExit()