Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local name = "xmlogin.lua"
- local version = "1.0"
- local desc = "Simplify logging in to the xMovie IRC echo bots with this script"
- hexchat.register(name, version, desc)
- local function cmd_xmlogin(word, eol)
- if not word[2] then
- hexchat.print("Syntax: /xmlogin [password]")
- return hexchat.EAT_HEXCHAT
- end
- password = word[2]
- hexchat.command("QUOTE WHOIS xM_1")
- return hexchat.EAT_ALL
- end
- local function handle_whois(word, eol)
- if word[1] ~= "xM_1" or word[3] ~= "play.xmovieserver.com" then
- hexchat.print("Error: IRC bot credentials could not be verified. Use caution and do not login.")
- return
- end
- hexchat.command(("MSG xM_1 login %s"):format(password))
- end
- hexchat.hook_command("XMLOGIN", cmd_xmlogin)
- hexchat.hook_print("WhoIs Name Line", handle_whois)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement