Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(126)  |  Call(105)  |  Derive(0)  |  Import(21)

src/w/i/willie-4.3.0/willie/modules/seen.py   willie(Download)
import time
import datetime
from willie.tools import Ddict, Nick, get_timezone, format_time
from willie.module import commands, rule, priority
 
        bot.say(".seen <nick> - Reports when <nick> was last seen.")
        return
    nick = Nick(trigger.group(2).strip())
    if nick in seen_dict:
        timestamp = seen_dict[nick]['timestamp']
def note(bot, trigger):
    if not trigger.is_privmsg:
        nick = Nick(trigger.nick)
        seen_dict[nick]['timestamp'] = time.time()
        seen_dict[nick]['channel'] = trigger.sender

src/w/i/willie-HEAD/willie/modules/seen.py   willie(Download)
import time
import datetime
from willie.tools import Ddict, Nick, get_timezone, format_time
from willie.module import commands, rule, priority
 
        bot.say(".seen <nick> - Reports when <nick> was last seen.")
        return
    nick = Nick(trigger.group(2).strip())
    if nick in seen_dict:
        timestamp = seen_dict[nick]['timestamp']
def note(bot, trigger):
    if not trigger.is_privmsg:
        nick = Nick(trigger.nick)
        seen_dict[nick]['timestamp'] = time.time()
        seen_dict[nick]['channel'] = trigger.sender

src/w/i/willie-4.3.0/willie/modules/tell.py   willie(Download)
import willie.tools
import threading
from willie.tools import Nick, iterkeys
from willie.module import commands, nickname_commands, rule, priority, example
 
        return
 
    tellee = Nick(tellee)
 
    if not os.path.exists(bot.tell_filename):
        return bot.reply("I'm here now, you can tell me whatever you want!")
 
    if not tellee in (Nick(teller), bot.nick, 'me'):
        tz = willie.tools.get_timezone(bot.db, bot.config, None, tellee)
        timenow = willie.tools.format_time(bot.db, bot.config, tz, tellee)
 
        bot.reply(response)
    elif Nick(teller) == tellee:
        bot.say('You can %s yourself that.' % verb)
    else:

src/w/i/willie-HEAD/willie/modules/tell.py   willie(Download)
import willie.tools
import threading
from willie.tools import Nick, iterkeys
from willie.module import commands, nickname_commands, rule, priority, example
 
        return
 
    tellee = Nick(tellee)
 
    if not os.path.exists(bot.tell_filename):
        return bot.reply("I'm here now, you can tell me whatever you want!")
 
    if not tellee in (Nick(teller), bot.nick, 'me'):
        tz = willie.tools.get_timezone(bot.db, bot.config, None, tellee)
        timenow = willie.tools.format_time(bot.db, bot.config, tz, tellee)
 
        bot.reply(response)
    elif Nick(teller) == tellee:
        bot.say('You can %s yourself that.' % verb)
    else:

src/w/i/willie-4.3.0/willie/modules/find.py   willie(Download)
 
import re
from willie.tools import Nick, WillieMemory
from willie.module import rule, priority
 
    if trigger.sender not in bot.memory['find_lines']:
        bot.memory['find_lines'][trigger.sender] = WillieMemory()
    if Nick(trigger.nick) not in bot.memory['find_lines'][trigger.sender]:
        bot.memory['find_lines'][trigger.sender][Nick(trigger.nick)] = list()
 
    # Create a temporary list of the user's lines in a channel
    templist = bot.memory['find_lines'][trigger.sender][Nick(trigger.nick)]
    del templist[:-10]  # Keep the log to 10 lines per person
 
    bot.memory['find_lines'][trigger.sender][Nick(trigger.nick)] = templist
 
 

src/w/i/willie-HEAD/willie/modules/find.py   willie(Download)
 
import re
from willie.tools import Nick, WillieMemory
from willie.module import rule, priority
 
    if trigger.sender not in bot.memory['find_lines']:
        bot.memory['find_lines'][trigger.sender] = WillieMemory()
    if Nick(trigger.nick) not in bot.memory['find_lines'][trigger.sender]:
        bot.memory['find_lines'][trigger.sender][Nick(trigger.nick)] = list()
 
    # Create a temporary list of the user's lines in a channel
    templist = bot.memory['find_lines'][trigger.sender][Nick(trigger.nick)]
    del templist[:-10]  # Keep the log to 10 lines per person
 
    bot.memory['find_lines'][trigger.sender][Nick(trigger.nick)] = templist
 
 

src/w/i/willie-HEAD/willie/irc.py   willie(Download)
import codecs
import traceback
from willie.tools import stderr, Nick
try:
    import select
        match = Origin.source.match(source or '')
        self.nick, self.user, self.host = match.groups()
        self.nick = Nick(self.nick)
 
        # If we have more than one argument, the second one is the sender
        if len(args) > 1:
            target = Nick(args[1])
        self.buffer = ''
 
        self.nick = Nick(config.nick)
        """Willie's current ``Nick``. Changing this while Willie is running is
        untested."""
            # Otherwise, wait so it's been at least 0.8 seconds + penalty
 
            recipient_id = Nick(recipient)
 
            if recipient_id not in self.stack:

src/w/i/willie-4.3.0/willie/irc.py   willie(Download)
import codecs
import traceback
from willie.tools import stderr, Nick
try:
    import select
        match = Origin.source.match(source or '')
        self.nick, self.user, self.host = match.groups()
        self.nick = Nick(self.nick)
 
        # If we have more than one argument, the second one is the sender
        if len(args) > 1:
            target = Nick(args[1])
        self.buffer = ''
 
        self.nick = Nick(config.nick)
        """Willie's current ``Nick``. Changing this while Willie is running is
        untested."""
    def add_op(self, channel, name):
        if isinstance(name, Nick):
            self.ops[channel].add(name)
        else:
            self.ops[channel].add(Nick(name))

src/w/i/willie-4.3.0/willie/coretasks.py   willie(Download)
import time
import willie
from willie.tools import Nick, iteritems
import base64
 
    if not channels:
        return
    channel = Nick(channels.group(1))
    if channel not in bot.privileges:
        bot.privileges[channel] = dict()
            if prefix in name:
                priv = priv | value
        nick = Nick(name.lstrip(''.join(mapping.keys())))
        bot.privileges[channel][nick] = priv
 
def track_modes(bot, trigger):
    """Track usermode changes and keep our lists of ops up to date."""
    # Mode message format: <channel> *( ( "-" / "+" ) *<modes> *<modeparams> )
    channel = Nick(trigger.args[0])
    line = trigger.args[1:]
                    modes.append(sign + char)
        else:
            arg = Nick(arg)
            for mode in modes:
                priv = bot.privileges[channel].get(arg, 0)

src/w/i/willie-HEAD/willie/coretasks.py   willie(Download)
import time
import willie
from willie.tools import Nick, iteritems
import base64
 
    if not channels:
        return
    channel = Nick(channels.group(1))
    if channel not in bot.privileges:
        bot.privileges[channel] = dict()
            if prefix in name:
                priv = priv | value
        nick = Nick(name.lstrip(''.join(mapping.keys())))
        bot.privileges[channel][nick] = priv
 
def track_modes(bot, trigger):
    """Track usermode changes and keep our lists of ops up to date."""
    # Mode message format: <channel> *( ( "-" / "+" ) *<modes> *<modeparams> )
    channel = Nick(trigger.args[0])
    line = trigger.args[1:]
                    modes.append(sign + char)
        else:
            arg = Nick(arg)
            for mode in modes:
                priv = bot.privileges[channel].get(arg, 0)

  1 | 2 | 3  Next