示例#1
0
文件: services.py 项目: Pythonz/PIRB
def nick_identify(nick, uhost, target, arg):
	if nick == "NickServ":
		if arg.lower().find("wenn du ihn nicht innerhalb einer minute identifizierst") != -1:
			ns_pw = c.get("SERVICES", "nickserv")
			putf("PRIVMSG NickServ :IDENTIFY %s" % ns_pw)
		elif arg.lower().find("nickname is registered") != -1:
			ns_pw = c.get("SERVICES", "nickserv")
			putf("PRIVMSG NickServ :IDENTIFY %s" % ns_pw)
示例#2
0
文件: services.py 项目: Pythonz/PIRB
def nick_identify(nick, uhost, target, arg):
    if nick == "NickServ":
        if arg.lower().find(
                "wenn du ihn nicht innerhalb einer minute identifizierst"
        ) != -1:
            ns_pw = c.get("SERVICES", "nickserv")
            putf("PRIVMSG NickServ :IDENTIFY %s" % ns_pw)
        elif arg.lower().find("nickname is registered") != -1:
            ns_pw = c.get("SERVICES", "nickserv")
            putf("PRIVMSG NickServ :IDENTIFY %s" % ns_pw)
示例#3
0
def on_join_chan(nick, uhost, chan):
    whois(nick)
    hostmask = nick + "!" + uhost

    auth = getauth(nick)
    flag = getflag(chan, auth)
    hostflag = gethostflag(chan, hostmask)

    if flag == "n" or flag == "o" or hostflag == "o":
        putf("MODE %s +o %s" % (chan, nick))
    elif flag == "v" or hostflag == "v":
        putf("MODE %s +v %s" % (chan, nick))
示例#4
0
def deop(nick, host, chan, arg):
    auth = getauth(nick)
    flag = getflag(chan, auth)
    hostmask = nick + "!" + host
    hostflag = gethostflag(chan, hostmask)

    if flag == "n" or flag == "o" or hostflag == "o":
        if len(arg.split()) != 0:
            mode = "o" * len(arg.split())
            putf("MODE %s -%s %s" % (chan, mode, arg))
        else:
            putf("MODE %s -o %s" % (chan, nick))
示例#5
0
文件: channel.py 项目: Pythonz/PIRB
def voice(nick,host,chan,arg):
	auth = getauth(nick)
	flag = getflag(chan,auth)
	hostmask = nick+"!"+host
	hostflag = gethostflag(chan,hostmask)

	if flag == "n" or flag == "o" or hostflag == "o":
		if len(arg.split()) != 0:
			mode = "v"*len(arg.split())
			putf("MODE %s +%s %s" % (chan,mode,arg))
		else:
			putf("MODE %s +v %s" % (chan,nick))
示例#6
0
文件: channel.py 项目: Pythonz/PIRB
def on_join_chan(nick,uhost,chan):
	whois(nick)
	hostmask = nick + "!" + uhost

	auth = getauth(nick)
	flag = getflag(chan,auth)
	hostflag = gethostflag(chan,hostmask)

	if flag == "n" or flag == "o" or hostflag == "o":
		putf("MODE %s +o %s" % (chan,nick))
	elif flag == "v" or hostflag == "v":
		putf("MODE %s +v %s" % (chan,nick))
示例#7
0
文件: channel.py 项目: Pythonz/PIRB
def channel_auth(nick,host,chan,arg):
	whois(nick)
	put("NOTICE %s :[%s] Trying to auth ..." % (nick,chan))
	auth = getauth(nick)
	hostmask = nick+"!"+host
	put("NOTICE %s :[%s] Getting flag for %s (%s)..." % (nick,chan,auth,hostmask))
	flag = getflag(chan,auth)
	hostflag = gethostflag(chan,hostmask)
	put("NOTICE %s :[%s] Flag: %s, Hostflag: %s" % (nick,chan,flag,hostflag))

	if flag == "n" or flag == "o" or hostflag == "o":
		putf("MODE %s +o %s" % (chan,nick))
	elif flag == "v" or hostflag == "v":
		putf("MODE %s +v %s" % (chan,nick))
示例#8
0
def channel_auth(nick, host, chan, arg):
    whois(nick)
    put("NOTICE %s :[%s] Trying to auth ..." % (nick, chan))
    auth = getauth(nick)
    hostmask = nick + "!" + host
    put("NOTICE %s :[%s] Getting flag for %s (%s)..." %
        (nick, chan, auth, hostmask))
    flag = getflag(chan, auth)
    hostflag = gethostflag(chan, hostmask)
    put("NOTICE %s :[%s] Flag: %s, Hostflag: %s" %
        (nick, chan, flag, hostflag))

    if flag == "n" or flag == "o" or hostflag == "o":
        putf("MODE %s +o %s" % (chan, nick))
    elif flag == "v" or hostflag == "v":
        putf("MODE %s +v %s" % (chan, nick))
示例#9
0
文件: channel.py 项目: Pythonz/PIRB
def channel_msg_auth(nick,host,arg):
	if len(arg) == 0:
		irc_send(nick, "no channel specified")
	elif arg.startswith("#"):
		whois(nick)
		chan = arg.split()[0]
		put("NOTICE %s :[%s] Trying to auth ..." % (nick,chan))
		auth = getauth(nick)
		hostmask = nick+"!"+host
		put("NOTICE %s :[%s] Getting flag for %s (%s)..." % (nick,chan,auth,hostmask))
		flag = getflag(chan,auth)
		hostflag = gethostflag(chan,hostmask)
		put("NOTICE %s :[%s] Flag: %s, Hostflag: %s" % (nick,chan,flag,hostflag))

		if flag == "n" or flag == "o" or hostflag == "o":
			putf("MODE %s +o %s" % (chan,nick))
		elif flag == "v" or hostflag == "v":
			putf("MODE %s +v %s" % (chan,nick))
	else:
		irc_send(nick, "invalid channel")
示例#10
0
def channel_msg_auth(nick, host, arg):
    if len(arg) == 0:
        irc_send(nick, "no channel specified")
    elif arg.startswith("#"):
        whois(nick)
        chan = arg.split()[0]
        put("NOTICE %s :[%s] Trying to auth ..." % (nick, chan))
        auth = getauth(nick)
        hostmask = nick + "!" + host
        put("NOTICE %s :[%s] Getting flag for %s (%s)..." %
            (nick, chan, auth, hostmask))
        flag = getflag(chan, auth)
        hostflag = gethostflag(chan, hostmask)
        put("NOTICE %s :[%s] Flag: %s, Hostflag: %s" %
            (nick, chan, flag, hostflag))

        if flag == "n" or flag == "o" or hostflag == "o":
            putf("MODE %s +o %s" % (chan, nick))
        elif flag == "v" or hostflag == "v":
            putf("MODE %s +v %s" % (chan, nick))
    else:
        irc_send(nick, "invalid channel")
示例#11
0
文件: services.py 项目: Pythonz/PIRB
def quakenet_auth(text):
    if c.get("SERVICES", "quakenet") != "" and len(
            c.get("SERVICES", "quakenet").split()) == 2:
        putf("AUTH %s" % c.get("SERVICES", "quakenet"))
示例#12
0
def channel_join(text):
    putf("JOIN %s" % c.get("BOT", "channels"))

    for data in _chandb.execute("select channel from list"):
        put("JOIN %s" % data[0])
示例#13
0
文件: irc.py 项目: Pythonz/PIRB
def irc_botmode(text):
	for data in _cache.execute("select name from botnick"):
		putf("MODE %s +B" % str(data[0]))
示例#14
0
文件: services.py 项目: Pythonz/PIRB
def quakenet_mode_x(nick, host, target, arg):
    react = "are now logged in as " + c.get("SERVICES",
                                            "quakenet").split()[0] + "."

    if arg == react:
        putf("MODE %s +x" % target)
示例#15
0
文件: services.py 项目: Pythonz/PIRB
def quakenet_mode_x(nick,host,target,arg):
	react = "are now logged in as "+c.get("SERVICES","quakenet").split()[0]+"."

	if arg == react:
		putf("MODE %s +x" % target)
示例#16
0
文件: services.py 项目: Pythonz/PIRB
def quakenet_auth(text):
	if c.get("SERVICES", "quakenet") != "" and len(c.get("SERVICES", "quakenet").split()) == 2:
		putf("AUTH %s" % c.get("SERVICES", "quakenet"))
示例#17
0
def nick_in_use(text):
    for data in _cache.execute("select name from botnick"):
        putf("NICK %s_" % str(data[0]))
        _cache.execute("update botnick set name='%s_'" % str(data[0]))
示例#18
0
文件: user.py 项目: Pythonz/PIRB
def nick_in_use(text):
	for data in _cache.execute("select name from botnick"):
		putf("NICK %s_" % str(data[0]))
		_cache.execute("update botnick set name='%s_'" % str(data[0]))
示例#19
0
文件: irc.py 项目: Pythonz/PIRB
def irc_botmode(text):
    for data in _cache.execute("select name from botnick"):
        putf("MODE %s +B" % str(data[0]))
示例#20
0
文件: channel.py 项目: Pythonz/PIRB
def channel_join(text):
	putf("JOIN %s" % c.get("BOT", "channels"))

	for data in _chandb.execute("select channel from list"):
		put("JOIN %s" % data[0])