Esempio n. 1
0
def handle_delete(bot, ievent):
    """ user-del <name> .. remove user """
    if len(ievent.args) == 0:
        ievent.missing('<name>')
        return
    name = ievent.args[0].lower()
    if name == 'owner':
        ievent.reply("can't delete owner")
        return
    result = 0
    try:
        result = users.delete(name)
    except Exception, ex:
        ievent.reply("ERROR: %s" % str(ex))
        return
Esempio n. 2
0
def stop(x, y):
    tmpstr =  '\nremaining: '
    teller = 0
    for i in queues:
        teller += 1
        tmpstr += "%s) %s " % (teller, i[2])
    print tmpstr
    die()

# register SIGTERM handler to stop
signal.signal(signal.SIGTERM, stop)
signal.signal(signal.SIGINT, stop)

try:
    users.delete('test')
except:
    pass

users.add('test', ['test@test', ], ['USER', 'OPER', 'ALIAS', 'FORGET', \
'QUOTE'])

bot = Bot('test@test')
bot.channels.data['#dunkbots'] = {}
bot.userhosts['dunker'] = 'test@test'
print "loading plugins"
plugins.regplugins()

queues = []

def qreader():
Esempio n. 3
0
    nail = ' '.join(sys.argv[2:])
except:
    print 'hammer.py <nrtimes> <command>'
    os._exit(0)


def stop(x, y):
    die()


# register SIGTERM handler to stop
signal.signal(signal.SIGTERM, stop)
signal.signal(signal.SIGINT, stop)

try:
    users.delete('test')
except:
    pass

users.add('test', ['test@test', ], ['USER', 'OPER', 'ALIAS', 'FORGET', \
'QUOTE'])

bot = Bot('test@test')
bot.channels.data['#dunkbots'] = {}
bot.userhosts['dunker'] = 'test@test'
plugins.regplugins()
time.sleep(5)

queues = []