I wrote a sub to log onto IRC with my character name, relevant sections below:
Code: Select all
/declare INI string outer "Whatever_${Me.Name}.ini"
/declare UseIRC bool outer ${Ini[${INI},General_Options,UseIRC]}
/declare IRCServer string outer ${Ini[${INI},IRC_Settings,IRCServer]}
/declare IRCPort int outer ${Ini[${INI},IRC_Settings,IRCPort]}
/declare IRCChannel string outer ${Ini[${INI},IRC_Settings,IRCChannel]}
|### Join IRC ###
Sub JoinIRC
/if (${IRCChannel.Left[1].NotEqual[#]}) {
/echo Channel name needs to start with a #
/endmacro
}
/if (${Irc}) {
/if (${Irc.Server.NotEqual[${IRCServer}]} || ${Irc.Nick.NotEqual[${Me.Name}]}) {
/squelch /i quit
/squelch /iconnect ${IRCServer} ${IRCPort} ${IRCChannel} ${Me.Name}
} else {
| This is currently broken in the MQ2IRC plugin code, it will always re-join the channel
/if (${IRC.Channel.NotEqual[${IRCChannel}]}) {
/squelch /i part
/i join ${IRCChannel}
}
}
} else {
/squelch /iconnect ${IRCServer} ${IRCPort} ${IRCChannel} ${Me.Name}
}
/delay 3s
/return
Ini file:
Code: Select all
[General_Options]
UseIRC=1
[IRC_Settings]
IRCServer=local.irc.server
IRCPort=6667
IRCChannel=#botchan
I haven't played for a couple of months, so not sure if recent changes to IRC plugin have fixed the ${IRC.Channel} problem.