Ejemplo n.º 1
0
def dotest(testnr):
    exs = examples.getexamples()
    random.shuffle(exs)
    teller = 0
    for i in exs:
        no = 0
        for zz in donot:
            if i.find(zz) != -1:
                no = 1
                break
        if no:
            continue
        teller += 1
        try:
            ievent = Ircevent()
            ievent.nick = 'test'
            ievent.userhost = 'test@test'
            q = Queue.Queue()
            ievent.queues.append(q)
            ievent.channel = '#dunkbots'
            ievent.txt = i
            queues.append((testnr, teller, i, q))
            if not plugins.trydispatch(bot, ievent):
                print "\ncan't execute %s\n" % i
                queues.remove((testnr, teller, i, q))
        except:
            handle_exception()
Ejemplo n.º 2
0
def dotest(testnr):
    exs = examples.getexamples()
    random.shuffle(exs)
    teller = 0
    for i in exs:
        no = 0
        for zz in donot:
            if i.find(zz) != -1:
                no = 1
                break
        if no:
            continue
        teller += 1
        try:
            ievent = Ircevent()
            ievent.nick = 'test'
            ievent.userhost = 'test@test'
            q = Queue.Queue()
            ievent.queues.append(q)
            ievent.channel = '#dunkbots'
            ievent.txt = i
            queues.append((testnr, teller, i, q))
            if not plugins.trydispatch(bot, ievent):
                print "\ncan't execute %s\n" % i
                queues.remove((testnr, teller, i, q))
        except:
            handle_exception()
Ejemplo n.º 3
0
def dohammer():
    for j in range(nrtimes):
        try:
            ievent = Ircevent()
            ievent.nick = 'test'
            ievent.userhost = 'test@test'
            q = Queue.Queue()
            ievent.queue = q
            ievent.channel = '#dunkbots'
            ievent.txt = nail
            queues.append((nail, q))
            if not plugins.trydispatch(ievent):
                print "\ncan't execute %s\n" % nail
                queues.remove((nail, q))
        except:
            handle_exception()
Ejemplo n.º 4
0
def dohammer():
    for j in range(nrtimes):
        try:
            ievent = Ircevent()
            ievent.nick = 'test'
            ievent.userhost = 'test@test'
            q = Queue.Queue()
            ievent.queue = q
            ievent.channel = '#dunkbots'
            ievent.txt = nail
            queues.append((nail, q))
            if not plugins.trydispatch(ievent):
                print "\ncan't execute %s\n" % nail
                queues.remove((nail, q))
        except:
            handle_exception()