5
"""Handle non-ident connection on undernet"""
7
__copyright__ = 'this file is in the public domain'
8
__author__ = 'aafshar@gmail.com'
10
from gozerbot.callbacks import callbacks
12
def pre_underauth_cb(bot, ievent):
14
Only respond to the message like:
16
NOTICE AUTH :*** Your ident is disabled or broken, to continue
17
to connect you must type /QUOTE PASS 16188
19
args = ievent.arguments
21
return (args[0] == u'AUTH' and
22
args[-3] == u'/QUOTE' and
27
def underauth_cb(bot, ievent):
29
Send the raw command to the server
31
# last two elements of the arguments list are PASS <id>
32
bot.sendraw(' '.join(ievent.arguments[-2:]))
35
callbacks.add('NOTICE', underauth_cb, pre_underauth_cb)