dracorex
·
November 15, 2026, 1:04 a.m.
·
76 views
Python
import hexchat
import time
__module_name__ = "AutoNickServ"
__module_version__ = "1.12"
__module_description__ = "Smart notice-triggered auto-identifier with zero help menu interference"
# ==============================================================================
# CONFIGURATION: Map your exact HexChat Network names to your passwords.
# Case-sensitive. Matches what shows in your HexChat Network List.
# ==============================================================================
PASSWORDS = {
# "NetworkName": "password",
# "NetworkName": "password",
# "NetworkName": "password",
}
last_authenticated = {}
def notice_callback(word, word_eol, userdata):
if len(word) < 1 or len(word_eol) < 4:
return hexchat.EAT_NONE
sender = str(word[0]).lstrip(":").split("!", 1)[0].lower()
message = str(word_eol[3]).lstrip(":").lower()
network = hexchat.get_info("network")
# Cooldown to prevent any auth loops (30 seconds per network)
now = time.time()
if network in last_authenticated and (now - last_authenticated[network] < 30):
return hexchat.EAT_NONE
if network in PASSWORDS:
password = PASSWORDS[network]
# STRICT AUTH PROMPTS ONLY:
# These are the exact phrases services send when you are unrecognized/unidentified.
# Help menus, command lists, and info text will not match these, so they flow through untouched.
is_auth_prompt = any(phrase in message for phrase in [
"please identify using",
"to identify yourself, type",
"identify via",
"status: unrecognized",
"you are not identified"
])
if is_auth_prompt:
if "nickop" in sender and network.lower() == "austnet":
hexchat.command(f"QUOTE PRIVMSG NickOP :IDENTIFY {password}")
hexchat.command(f'echo \x0304[AutoNickServ]\x03 Auto-identified via NickOP prompt on {network}')
last_authenticated[network] = now
elif "nickserv" in sender:
hexchat.command(f"ns identify {password}")
hexchat.command(f'echo \x0304[AutoNickServ]\x03 Auto-identified via NickServ prompt on {network}')
last_authenticated[network] = now
# CRITICAL: Always return EAT_NONE so the notice (including help menus)
# is never swallowed or blocked from displaying in your window!
return hexchat.EAT_NONE
def manual_identify_command(word, word_eol, userdata):
network = hexchat.get_info("network")
if network in PASSWORDS:
password = PASSWORDS[network]
if network.lower() == "austnet":
hexchat.command(f"QUOTE PRIVMSG NickOP :IDENTIFY {password}")
else:
hexchat.command(f"ns identify {password}")
hexchat.command(f'echo \x0303[AutoNickServ]\x03 Manually triggered identification for: {network}')
else:
print(f'\x0304[AutoNickServ]\x03 No password found for network: {network}')
return hexchat.EAT_ALL
# Hook notices to catch live service prompts, returning EAT_NONE to let everything else through
hexchat.hook_server("NOTICE", notice_callback, priority=hexchat.PRI_LOW)
hexchat.hook_command("nsident", manual_identify_command, help="Manually sends saved password")
print(f"\x0303[{__module_name__} v{__module_version__} loaded]\x03")
marc@destiny:~$
We use cookies to run the site, measure traffic, and (with your permission) show more relevant content and ads.
You can change your preferences at any time.
Choose what you allow. Strictly necessary cookies may still be used even if you decline.
The numbers below reflect only first-party cookies detected in your browser.
Current status—
Cookies detected (first-party)0
This counter only lists first-party cookies visible via document.cookie.
Depending on your browser or ad blocker, it may stay at 0 until cookies are set (usually after consent + reload).
Third-party cookies are not detectable here.
Last updated—
Analytics
0 detected • 0 known
Measures site traffic (page views, visit duration, errors) to help improve the site. Example: Google Analytics or equivalent tags.
View detected cookies
Functional
0 detected • 0 known
Remembers your choices and enhances your experience (preferences, security, sessions). Disabling may degrade some features.
View detected cookies
Advertising
0 detected • 0 known
Used to measure campaigns, limit repetition, and show more relevant ads (subject to your consent).
View detected cookies
Security (always on)
Anti-abuse protection, site security
Enabled
Some strictly necessary storage may be used to protect the site (e.g. fraud prevention / security).
Unknown / Other
0 detected
Info
Cookies that don't match any known category. These may come from browser extensions,
third-party scripts, or services not yet classified. Their origin is shown when possible.
View detected cookies
Third-Party Services
0 detected on page
Scan
Third-party scripts and services loaded on this page. These may set their own cookies
which are not readable via document.cookie due to browser security.