-
-
Save danielb2/5852938 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ 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", "")