Created
June 24, 2013 19:45
-
-
Save anonymous/5852935 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import weechat | |
SCRIPT_NAME = "test" | |
SCRIPT_AUTHOR = "test" | |
SCRIPT_VERSION = "0.0" | |
SCRIPT_LICENSE = "GPL3" | |
SCRIPT_DESC = "test" | |
def connecting_cb(data, signal, signal_data): | |
global notice_hook | |
try: | |
if not notice_hook: | |
notice_hook = weechat.hook_signal("*,irc_raw_in_notice", "notice_cb", "") | |
except: | |
notice_hook = weechat.hook_signal("*,irc_raw_in_notice", "notice_cb", "") | |
return weechat.WEECHAT_RC_OK | |
def notice_cb(data, signal, signal_data): | |
if "Ident broken or disabled, to continue to connect you must type" in signal_data: | |
server = signal.split(',')[0] | |
passwd = signal_data.split(" ")[-1] | |
weechat.prnt('','Sending UnderNet quote pass') | |
corebuf = weechat.buffer_search_main() | |
weechat.command(corebuf, '/quote -server %s pass %s' % (server,passwd)) | |
global notice_hook | |
weechat.unhook(notice_hook) | |
notice_hook = "" | |
return weechat.WEECHAT_RC_OK | |
if weechat.register(SCRIPT_NAME, SCRIPT_AUTHOR, SCRIPT_VERSION, SCRIPT_LICENSE, SCRIPT_DESC, "", ""): | |
weechat.hook_signal("irc_server_connecting", "connecting_cb", "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment