Merge branch 'ChaosChemnitz' of https://github.com/Stummi/CloudBot into ChaosChemnitz
This commit is contained in:
commit
0650046d18
|
@ -1,16 +1,16 @@
|
||||||
{
|
{
|
||||||
"connections": {
|
"connections": {
|
||||||
"esper": {
|
"hackint": {
|
||||||
"server": "irc.esper.net",
|
"server": "irc.hackint.eu",
|
||||||
"nick": "MyCloudBot",
|
"nick": "antibot",
|
||||||
"user": "cloudbot",
|
"user": "antibot",
|
||||||
"realname": "CloudBot - http://git.io/cloudbotirc",
|
"realname": "CloudBot - http://git.io/cloudbotirc",
|
||||||
"mode": "",
|
"mode": "",
|
||||||
"nickserv_password": "",
|
"_nickserv_password": "",
|
||||||
"nickserv_user": "",
|
"-nickserv_user": "",
|
||||||
"channels": [
|
"channels": [
|
||||||
"#cloudbot",
|
"#ChaosChemnitz",
|
||||||
"#cloudbot2"
|
"#logbot"
|
||||||
],
|
],
|
||||||
"invite_join": true,
|
"invite_join": true,
|
||||||
"auto_rejoin": false,
|
"auto_rejoin": false,
|
||||||
|
@ -58,7 +58,7 @@
|
||||||
"ignore"
|
"ignore"
|
||||||
],
|
],
|
||||||
"users": [
|
"users": [
|
||||||
"examplec!user@example.com"
|
"stummi!~Stummi@stummi.org"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from util import hook
|
||||||
|
from thread import start_new_thread
|
||||||
|
from time import sleep
|
||||||
|
|
||||||
|
def wait_and_send(conn, wait, msg):
|
||||||
|
sleep(wait)
|
||||||
|
conn.send(msg)
|
||||||
|
|
||||||
|
@hook.command("check")
|
||||||
|
def check_nick(inp, conn=None):
|
||||||
|
conn.send("PRIVMSG %s :\x01VERSION\x01" % inp)
|
||||||
|
|
||||||
|
|
||||||
|
@hook.event("JOIN")
|
||||||
|
def handle_join(info, input=None, conn=None):
|
||||||
|
start_new_thread(wait_and_send, (conn, 5, "PRIVMSG %s :\x01VERSION\x01" % input.nick))
|
||||||
|
|
||||||
|
@hook.event("NOTICE")
|
||||||
|
def handle_ctcp_rply(info, input=None, conn=None, nick=None):
|
||||||
|
print "notice..."
|
||||||
|
print "-%s-" % input.lastparam
|
||||||
|
if input.lastparam == ("\1VERSION %s\1" % "mIRC v7.22 Khaled Mardam-Bey"):
|
||||||
|
for chan in conn.channels:
|
||||||
|
if chan != "#logbot":
|
||||||
|
conn.send("KICK %s %s :bad version" % (chan, nick))
|
||||||
|
conn.send("MODE %s +b %s!*@*$#logbot" % (chan, nick))
|
||||||
|
|
Reference in New Issue