Exemplo n.º 1
0
def handle_getstatus(bot, ievent):
    """ user-getstatus <name> .. get status of name """
    try:
        name = ievent.args[0]
    except IndexError:
        ievent.missing('<name>')
        return
    name = name.lower()
    if not users.exist(name):
        ievent.reply("can't find user %s" % name)
        return
    status = users.getuserstatuses(name)
    if status:
        ievent.reply("status of %s: " % name, status, dot=True)
    else:
        ievent.reply('%s has no status set' % name)
Exemplo n.º 2
0
def handle_match(bot, ievent):
    """ user-match <userhost> .. get data of <userhost> """
    try:
        userhost = ievent.args[0]
    except IndexError:
        ievent.missing('<userhost>')
        return
    name = users.getname(userhost)
    if not name:
        ievent.reply("can't find user with userhost %s" % userhost)
        return
    userhosts = users.getuserhosts(name)
    perms = users.getuserperms(name)
    email = users.getuseremail(name)
    permits = users.getuserpermits(name)
    status = users.getuserstatuses(name)
    ievent.reply('userrecord of %s = userhosts: %s perms: %s email: %s \
permits: %s status: %s' % (name, str(userhosts), str(perms), \
str(email), str(permits), str(status)))
Exemplo n.º 3
0
def handle_show(bot, ievent):
    """ user-show <name> .. get data of <name> """
    try:
        name = ievent.args[0]
    except IndexError:
        ievent.missing('<name>')
        return
    name = name.lower()
    if not users.exist(name):
        ievent.reply("can't find user %s" % name)
        return
    userhosts = users.getuserhosts(name)
    perms = users.getuserperms(name)
    email = users.getuseremail(name)
    permits = users.getuserpermits(name)
    status = users.getuserstatuses(name)
    ievent.reply('userrecord of %s = userhosts: %s perms: %s email: %s \
permits: %s status: %s' % (name, str(userhosts), str(perms), \
str(email), str(permits), str(status)))
Exemplo n.º 4
0
def handle_check(bot, ievent):
    """ user-check <nick> .. get user data of <nick> """
    try:
        nick = ievent.args[0]
    except IndexError:
        ievent.missing('<nick>')
        return
    userhost = getwho(bot, nick)
    if not userhost:
        ievent.reply("can't find userhost of %s" % nick)
        return
    name = users.getname(userhost)
    if not name:
        ievent.reply("can't find user")
        return
    userhosts = users.getuserhosts(name)
    perms = users.getuserperms(name)
    email = users.getuseremail(name)
    permits = users.getuserpermits(name)
    status = users.getuserstatuses(name)
    ievent.reply('userrecord of %s = userhosts: %s perms: %s email: %s \
permits: %s status: %s' % (name, str(userhosts), str(perms), \
str(email), str(permits), str(status)))