DBase

AndroidIRCX vs mIRC Scripting: Translating Classic Automation

AndroidIRCX vs mIRC Scripting: Translating Classic Automation

AndroidIRCX vs mIRC Scripting: Translating Classic Automation

• Sep 25, 2026 • 4 views

A detailed concept-by-concept guide for moving classic mIRC automation to AndroidIRCX JavaScript.

AndroidIRCX vs mIRC Scripting: Translating Classic Automation to Mobile JavaScript

mIRC helped make client-side IRC automation mainstream. AndroidIRCX follows the same broad idea—events, commands, timers, state and UI helpers—but uses sandboxed JavaScript modules and an asynchronous mobile API. It is a conceptual migration, not syntax compatibility: there is no supported promise that an .mrc file can be imported unchanged.

Use the AndroidIRCX Scripting wiki as the authority for available hooks and method signatures.

The mental mapping

mIRC idea AndroidIRCX equivalent
on *:TEXT: exported onMessage(msg) hook
alias api.registerCommand(...)
/echo api.echo(...)
/msg api.sendMessage(...)
/me api.sendAction(...)
raw command api.sendCommand(...)
timer api.setTimer(...) and onTimer(...)
hash-table state script storage/table APIs
$comchan api.getSharedChannels(...)
$mask api.banMask(...)
$read-style lists managed list APIs
popup/menu item api.addMenuItem(...)

The table is a translation guide, not a claim that edge cases behave identically.

Event syntax becomes exported functions

A mIRC handler combines the event, match and action in a compact line. AndroidIRCX exports named hooks and uses ordinary JavaScript for conditions:

module.exports = {
  onMessage(msg) {
    const text = api.strip(msg.text).trim();
    if (text === '!ping') api.echo(msg.channel, `Ping from ${msg.from}`);
  },
};

That is more verbose than classic mIRC syntax, but it gives you functions, arrays, promises, structured objects and familiar JavaScript tooling.

Local output and network output are different

api.echo is the safe equivalent of writing to your own client window. api.sendMessage, api.sendNotice, api.sendAction and api.sendCommand affect the network. During migration, replace outgoing actions with echo, verify matching logic, and only then restore sends. This catches loops and over-broad patterns before other users see them.

Async work is explicit

History reads, AI calls, files and network-backed operations may return promises. Mark the handler or command async and use await:

api.registerCommand('digest', 'Read recent messages', async (_args, ctx) => {
  const messages = await api.getRecentMessages(ctx.channel, 20, ctx.networkId);
  api.echo(ctx.channel, `Loaded ${messages.length} messages.`);
});
module.exports = {};

Do not block the event handler while waiting or assume a result is immediately available.

Storage replaces global variables and ad-hoc files

In-memory JavaScript variables disappear when a script reloads or the app process is reclaimed. Store durable settings and counters through the script storage APIs. Use network and channel identifiers in keys, validate values after reading, and never store passwords in ordinary storage. AndroidIRCX provides protected secret handling for sensitive values.

Mobile changes the operating assumptions

Desktop mIRC can remain open for days. Android may place apps into Doze, restrict background execution or kill a process under memory pressure. Keep Connection Alive, battery-optimization exclusion and smart reconnect improve continuity, but no script should rely on millisecond-perfect timers while the phone sleeps. For truly continuous presence, use a bouncer such as ZNC and let AndroidIRCX reconnect to it.

Security and raw protocol access

Normal editor scripts can observe documented events and send through controlled API calls. Treat any raw-protocol automation as high risk: one malformed capability, authentication line or recursive response can break a connection. Keep authentication secrets in network/identity settings, not source code. Scripts produced by AI are still untrusted code until you review and enable them.

A practical migration sequence

  1. Inventory aliases, event handlers, timers, files and DLL/COM dependencies.
  2. Separate read-only conveniences from scripts that send or moderate.
  3. Port one small alias using registerCommand and echo.
  4. Port message matching with onMessage and api.strip.
  5. Move persistent state to managed storage.
  6. Replace desktop-only integrations with supported APIs; some cannot be ported.
  7. Add explicit network/channel scoping.
  8. Lint, save disabled and test on a private network.
  9. Enable outgoing behavior only after observing it safely.

AndroidIRCX is not “mIRC on Android.” It preserves the programmable-client philosophy while adapting it to JavaScript, Android lifecycle rules and a permission-conscious environment.

Comments (0)

Log in to leave a comment

No comments yet. Be the first to comment!

Share this post

Found this helpful? Share it with others!

Back

Cookie Consent

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept", you consent to our use of cookies in accordance with our Privacy Policy and GDPR regulations. Learn more