When did pmxbot last see <nick> speak?
9790
def where(channel, nick, rest):
	""
	onick = rest.strip()
	last = Logger.store.last_seen(onick)
	if last:
		tm, chan = last
		tmpl = "I last saw {onick} speak at {tm} in channel #{chan}"
		return tmpl.format(tm=tm, chan=chan, onick=onick)
	else:
		return "Sorry!  I don't have any record of %s speaking" % onick
401866
async def got_who_reply(self, nick=None, real_name=None, **kws):
        '''
            
        '''
        #logger.debug('who reply: %r' % kws)

        nick = nick[2:] if nick[0:2] == 'E_' else nick
        host, ports = real_name.split(' ', 1)

        self.servers.remove(nick)

        logger.debug("Found: '%s' at %s with port list: %s",nick, host, ports)
        self.results[host.lower()] = ServerInfo(nick, host, ports)

        if not self.servers:
            self.all_done.set()
840333
def badnick(self, me=None, nick=None, **kw):
        """"""
        if me == '*':
            self.bot.set_nick(self.bot.nick + '_')
        self.bot.log.debug('Trying to regain nickname in 30s...')
        self.nick_handle = self.bot.loop.call_later(
            30, self.bot.set_nick, self.bot.original_nick)
172186
protected function checkIfBot() {
    if($this->nodb) {
      return;
    }

    // BLP 2018-07-02 -- replace old logic with 'isMe()'
    if($this->isMe()) {
      return;
    }

    $this->query("select count(*) from information_schema.tables ".
                 "where (table_schema = '$this->masterdb') and (table_name = 'bots')");

    list($ok) = $this->fetchrow('num');

    if($ok == 1) {
      $agent = $this->escape($this->agent);

      $this->isBot = preg_match("~\+*https?://|Googlebot-Image|python|java|wget|nutch|perl|libwww|lwp-trivial|curl|PHP/|urllib|".
                                "GT::WWW|Snoopy|MFC_Tear_Sample|HTTP::Lite|PHPCrawl|URI::Fetch|Zend_Http_Client|".
                                "http client|PECL::HTTP~i", $this->agent)
                     || ($this->query("select ip from $this->masterdb.bots where ip='$this->ip'")) ? true : false;          
    }
  }
908432
def seen(self, event, nickname):
        
        try:
            self.joined[nickname]
        except KeyError:
            pass
        else:
            if nickname == self.get_nickname(event):
                prefix = "you are"
            else:
                prefix = "%s is" % nickname
            return "%s here right now" % prefix
        try:
            seen = self.timesince(self.quit[nickname])
        except KeyError:
            return "%s has never been seen" % nickname
        else:
            return "%s was last seen %s ago" % (nickname,  seen)
1008225
def issue_and_listen_to_command_history():
    """"""
    def tc_callback(rec):
        print('TC:', rec)

    command = processor.issue_command('/YSS/SIMULATOR/SWITCH_VOLTAGE_OFF', args={
        'voltage_num': 1,
    }, comment='im a comment')
    command.create_command_history_subscription(on_data=tc_callback)
198393
function gossipLastMessageAtFixedInterval(){
    if(p_phase_timeout >0 && Date.now() - p_phase_timeout > constants.BYZANTINE_PHASE_TIMEOUT){

        if(bByzantineUnderWay && last_prevote_gossip &&
            typeof last_prevote_gossip !== 'undefined' &&
            Object.keys(last_prevote_gossip).length > 0){
            if(last_prevote_gossip.type === constants.BYZANTINE_PREVOTE && h_p === last_prevote_gossip.h){
                // console.log("byllllogg gossipLastMessageAtFixedInterval broadcastPrevote" + JSON.stringify(last_prevote_gossip));
                broadcastPrevote(last_prevote_gossip.h, last_prevote_gossip.p, last_prevote_gossip.idv);
            }
        }
        if(bByzantineUnderWay && last_precommit_gossip &&
            typeof last_precommit_gossip !== 'undefined' &&
            Object.keys(last_precommit_gossip).length > 0){
            if(last_precommit_gossip.type === constants.BYZANTINE_PRECOMMIT && h_p === last_precommit_gossip.h){
                if(last_precommit_gossip.idv !== null && assocByzantinePhase[last_precommit_gossip.h].phase[last_precommit_gossip.p].proposal
                    && typeof assocByzantinePhase[last_precommit_gossip.h].phase[last_precommit_gossip.p].proposal !== 'undefined'){
                    var lastProposal = assocByzantinePhase[last_precommit_gossip.h].phase[last_precommit_gossip.p].proposal;
                    broadcastProposal(last_precommit_gossip.h, last_precommit_gossip.p, lastProposal, lastProposal.vp);
                }
                // console.log("byllllogg gossipLastMessageAtFixedInterval broadcastPrecommit" + JSON.stringify(last_precommit_gossip));
                broadcastPrecommit(last_precommit_gossip.h, last_precommit_gossip.p, last_precommit_gossip.sig, last_precommit_gossip.idv);
            }        
        }
    }
}
1060403
def state(self):
        
        state = self.get_ps('persona_state', False)
        return EPersonaState(state) if state else EPersonaState.Offline
984612
def last_month(self):
        
        if self._last_month is None:
            self._last_month = LastMonthList(self._version, account_sid=self._solution['account_sid'], )
        return self._last_month
709639
def fetch_last(response: Response) -> typing.Union[str, None]:
    

    recent_paths = environ.configs.fetch('recent_paths', [])

    if len(recent_paths) < 1:
        response.fail(
            code='NO_RECENT_PROJECTS',
            message='No projects have been opened recently'
        ).console()
        return None

    return recent_paths[0]
1302959
def meaculpa(nick, rest):
	""
	if rest:
		rest = rest.strip()

	if rest:
		return random.choice(phrases.direct_apologies) % dict(a=nick, b=rest)
	else:
		return random.choice(phrases.apologies) % dict(a=nick)
65413
def contacted(self):
        
        try:
            contacted_span = self._contacted_xpb.one_(self.profile_tree)
        except:
            return False
        else:
            timestamp = contacted_span.replace('Last contacted ', '')
            return helpers.parse_date_updated(timestamp)
616935
function (event) {
        var $target = $(event.currentTarget),
            nick,
            members = this.model.get('members'),
            member;

        event.stopPropagation();

        // Check this current element for a nick before resorting to the main message
        // (eg. inline nicks has the nick on its own element within the message)
        nick = $target.data('nick');
        if (!nick) {
            nick = $target.parent('.msg').data('message').nick;
        }

        // Make sure this nick is still in the channel
        member = members ? members.getByNick(nick) : null;
        if (!member) {
            return;
        }

        _kiwi.global.events.emit('nick:select', {
            target: $target,
            member: member,
            network: this.model.get('network'),
            source: 'message',
            $event: event
        })
        .then(_.bind(this.openUserMenuForNick, this, $target, member));
    }
135593
def _parse_nicknameinuse(client, command, actor, args):
    
    nick, _, _ = args.rpartition(" ")
    client.dispatch_event("NICKNAMEINUSE", nick)
533230
def sitemap_meta_lastmod
      return controller.sitemap_meta_data[:lastmod].blank? ? nil : tag(:meta, {name: "Last-Modified", content: controller.sitemap_meta_data[:lastmod]}, false, false)
    end
1315936
def _parse_nick(client, command, actor, args):
    
    old_nick, _, _ = actor.partition('!')
    new_nick = args

    if old_nick == client.user.nick:
        client.user.nick = new_nick

    modified_channels = set()
    for channel in client.server.channels.itervalues():
        user = channel.members.get(old_nick)
        if user:
            user.nick = new_nick
            channel.members[new_nick] = user
            del channel.members[old_nick]
            modified_channels.add(channel.name)

    client.dispatch_event("NICK", old_nick, new_nick)
    for channel in modified_channels:
        client.dispatch_event("MEMBERS", channel)
798642
def umode(self, nick, modes=''):
        
        with self.lock:
            if not modes:
                self.send('MODE %s' % nick)
                if self.readable():
                    msg = self._recv(expected_replies=('221',))
                    if msg[0] == '221':
                        modes = msg[2].replace('+', '').replace(':', '', 1)
                return modes

            self.send('MODE %s %s' % (nick, modes))

            if self.readable():
                msg = self._recv(expected_replies=('MODE',))
                if msg[0] == 'MODE':
                    if not self.hide_called_events:
                        self.stepback()
                    return msg[2].replace(':', '', 1)