def auth_notice_check(data, buffer, args):
    server = buffer.split(',')[0]
    if args.find("If this is your nickname, type /msg NickServ") != -1 or args.find("This nickname is registered") != -1 :
        passwd = auth_get(weechat.info_get("irc_nick", server), server)
        if passwd != None:
            weechat.command(server, "/quote nickserv identify %s" % (passwd))
            commands = auth_cmdget(server)
            if commands != '':
                for c in commands.split("|"):
                    weechat.command(server, c.strip().replace("%n", weechat.get_info('nick')))

    return weechat.WEECHAT_RC_OK
Esempio n. 2
0
def highlight_checker(serveur, args):
  null, channel, message = string.split(args, ":", 2)
  mask, null, channel = string.split(string.strip(channel), " ", 2)
  my_nick = weechat.get_info("nick", serveur)
  message_list = message.split()

  if get_host(mask) in people_not_allowed_to_hl:
    if message_list[0].strip(':,') == my_nick and len(message_list) > 1:
      if timer_dict.has_key(mask):
        timer_dict[mask] = int(time()) + PREVENT_DELAY
        return ":%s PRIVMSG %s :%s" % (mask, channel, " ".join(message_list[1:]))
      else:
        timer_dict[mask] = int(time()) + PREVENT_DELAY
  return args
Esempio n. 3
0
def auth_notice_check(data, buffer, args):
    server = buffer.split(',')[0]
    if args.find(
            "If this is your nickname, type /msg NickServ") != -1 or args.find(
                "This nickname is registered and protected.") != -1:
        passwd = auth_get(weechat.info_get("irc_nick", server), server)
        if passwd != None:
            weechat.command(server, "/quote nickserv identify %s" % (passwd))
            commands = auth_cmdget(server)
            if commands != '':
                for c in commands.split("|"):
                    weechat.command(
                        server,
                        c.strip().replace("%n", weechat.get_info('nick')))

    return weechat.WEECHAT_RC_OK